Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Commit 3ce41e4

Browse files
authored
Merge pull request #363 from netdata/fix-mount-points
Moved disk inodes and space under mount points.
2 parents 90fd6a8 + 5f90fde commit 3ce41e4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/domains/charts/getChartMenu.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default (
66
const subMenuId = family || "all"
77
const clusterId = hasKubernetes && chartLabels?.k8s_cluster_id?.[0]
88

9-
const [type] = id.split(".")
9+
const [type, typeB] = id.split(".")
1010
const parts = type.split("_")
1111
const [part1, part2] = parts
1212

@@ -34,7 +34,6 @@ export default (
3434
switch (part1) {
3535
case "ap":
3636
case "net":
37-
case "disk":
3837
case "powersupply":
3938
case "statsd":
4039
return emit({ menu: part1 })
@@ -57,6 +56,15 @@ export default (
5756
case "anomaly":
5857
return emit({})
5958

59+
case "disk": {
60+
if (/(inodes|space)/.test(typeB) || /(inodes|space)/.test(part2))
61+
return emit({ menu: "mount" })
62+
return emit({ menu: part1 })
63+
}
64+
case "mount": {
65+
return emit({ menu: part1 })
66+
}
67+
6068
case "cgroup": {
6169
const menuPattern =
6270
id.match(/.*[._/-:]qemu[._/-:]*/) || id.match(/.*[._/-:]kvm[._/-:]*/) ? "cgqemu" : "cgroup"

0 commit comments

Comments
 (0)