diff --git a/app/api_topologies.go b/app/api_topologies.go index 5d442f6a5d..69b5d5f4da 100644 --- a/app/api_topologies.go +++ b/app/api_topologies.go @@ -51,8 +51,8 @@ var ( ID: "storage", Default: "hide", Options: []APITopologyOption{ - {Value: "show", Label: "Show Storage", filter: render.IsVolumesComponent, filterPseudo: false}, - {Value: "hide", Label: "Hide Storage", filter: render.IsPodComponent, filterPseudo: false}, + {Value: "show", Label: "Show storage", filter: nil, filterPseudo: false}, + {Value: "hide", Label: "Hide storage", filter: render.IsPodComponent, filterPseudo: false}, }, } ) diff --git a/probe/kubernetes/reporter.go b/probe/kubernetes/reporter.go index 19cdd1ce7a..8dfe1785c1 100644 --- a/probe/kubernetes/reporter.go +++ b/probe/kubernetes/reporter.go @@ -108,9 +108,9 @@ var ( PersistentVolumeMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, - VolumeClaim: {ID: VolumeClaim, Label: "Volume Claim", From: report.FromLatest, Priority: 2}, - StorageClassName: {ID: StorageClassName, Label: "Storage Class", From: report.FromLatest, Priority: 3}, - AccessModes: {ID: AccessModes, Label: "Access Modes", From: report.FromLatest, Priority: 5}, + VolumeClaim: {ID: VolumeClaim, Label: "Volume claim", From: report.FromLatest, Priority: 2}, + StorageClassName: {ID: StorageClassName, Label: "Storage class", From: report.FromLatest, Priority: 3}, + AccessModes: {ID: AccessModes, Label: "Access modes", From: report.FromLatest, Priority: 5}, Status: {ID: Status, Label: "Status", From: report.FromLatest, Priority: 6}, } @@ -119,7 +119,7 @@ var ( Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2}, Status: {ID: Status, Label: "Status", From: report.FromLatest, Priority: 3}, VolumeName: {ID: VolumeName, Label: "Volume", From: report.FromLatest, Priority: 4}, - StorageClassName: {ID: StorageClassName, Label: "Storage Class", From: report.FromLatest, Priority: 5}, + StorageClassName: {ID: StorageClassName, Label: "Storage class", From: report.FromLatest, Priority: 5}, } StorageClassMetadataTemplates = report.MetadataTemplates{ diff --git a/render/filters.go b/render/filters.go index 385f8f21c2..eb682ee1ee 100644 --- a/render/filters.go +++ b/render/filters.go @@ -128,25 +128,6 @@ func IsConnected(node report.Node) bool { return ok } -// IsVolumesComponent check whether given node is PV, PVC, SC or not -func IsVolumesComponent(node report.Node) bool { - var storageComponent bool - if node.Topology == "persistent_volume" || node.Topology == "persistent_volume_claim" || node.Topology == "storage_class" { - storageComponent = true - } - if node.Topology == "pod" { - volumeClaim, ok := node.Latest.Lookup(kubernetes.VolumeClaim) - if !ok { - storageComponent = false - } else if volumeClaim == "" { - storageComponent = false - } else { - storageComponent = true - } - } - return storageComponent -} - // IsPodComponent check whether given node is everything but PV, PVC, SC func IsPodComponent(node report.Node) bool { var ok bool