Skip to content

Commit 034d99e

Browse files
committed
Change ordering of workload type and workload in Compute Resources / Workload
Prior to this change, `Compute Resources / Workload` dashboard had `namespace > workload > type` as filters where `type` mearly used as a label rather a filter. This commit brings a change in the UX, now the filtering order has changed to `namespace > type > workload` and all of those filters are actually functions like a filter. For example, from now on the user should able to select namespace, then select the type of workload and finally the actual workload. Signed-off-by: Arunprasad Rajkumar <[email protected]>
1 parent cca0b52 commit 034d99e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dashboards/resources/workload.libsonnet

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@ local template = grafana.template;
2929
sort=1
3030
),
3131

32-
local workloadTemplate =
32+
local workloadTypeTemplate =
3333
template.new(
34-
name='workload',
34+
name='type',
3535
datasource='$datasource',
36-
query='label_values(namespace_workload_pod:kube_pod_owner:relabel{%(clusterLabel)s="$cluster", namespace="$namespace"}, workload)' % $._config.clusterLabel,
36+
query='label_values(namespace_workload_pod:kube_pod_owner:relabel{%(clusterLabel)s="$cluster", namespace="$namespace"}, workload_type)' % $._config.clusterLabel,
3737
current='',
3838
hide='',
3939
refresh=2,
4040
includeAll=false,
4141
sort=1
4242
),
4343

44-
local workloadTypeTemplate =
44+
local workloadTemplate =
4545
template.new(
46-
name='type',
46+
name='workload',
4747
datasource='$datasource',
48-
query='label_values(namespace_workload_pod:kube_pod_owner:relabel{%(clusterLabel)s="$cluster", namespace="$namespace", workload="$workload"}, workload_type)' % $._config.clusterLabel,
48+
query='label_values(namespace_workload_pod:kube_pod_owner:relabel{%(clusterLabel)s="$cluster", namespace="$namespace", workload_type="$type"}, workload)' % $._config.clusterLabel,
4949
current='',
5050
hide='',
5151
refresh=2,
@@ -315,7 +315,7 @@ local template = grafana.template;
315315
)
316316
) + {
317317
templating+: {
318-
list+: [clusterTemplate, namespaceTemplate, workloadTemplate, workloadTypeTemplate],
318+
list+: [clusterTemplate, namespaceTemplate, workloadTypeTemplate, workloadTemplate],
319319
},
320320
},
321321
},

0 commit comments

Comments
 (0)