Make namespace plurality table non-filterable
This commit is contained in:
parent
a4b3273bab
commit
4fcc7c84f2
@ -527,12 +527,14 @@ def table_panel(
|
||||
transformations=None,
|
||||
instant=False,
|
||||
options=None,
|
||||
filterable=True,
|
||||
):
|
||||
"""Return a Grafana table panel definition."""
|
||||
# Optional PromQL subquery helpers in expr: share(), etc.
|
||||
panel_options = {"showHeader": True, "columnFilters": False}
|
||||
if options:
|
||||
panel_options.update(options)
|
||||
field_defaults = {"unit": unit, "custom": {"filterable": filterable}}
|
||||
panel = {
|
||||
"id": panel_id,
|
||||
"type": "table",
|
||||
@ -540,7 +542,7 @@ def table_panel(
|
||||
"datasource": PROM_DS,
|
||||
"gridPos": grid,
|
||||
"targets": [{"expr": expr, "refId": "A", **({"instant": True} if instant else {})}],
|
||||
"fieldConfig": {"defaults": {"unit": unit}, "overrides": []},
|
||||
"fieldConfig": {"defaults": field_defaults, "overrides": []},
|
||||
"options": panel_options,
|
||||
}
|
||||
if transformations:
|
||||
@ -1196,7 +1198,7 @@ def build_pods_dashboard():
|
||||
panels.append(
|
||||
table_panel(
|
||||
10,
|
||||
"Namespace Plurality by Node v19",
|
||||
"Namespace Plurality by Node v20",
|
||||
(
|
||||
f"{share_expr} * on(namespace,node) group_left() "
|
||||
f"({mask_expr}) * on(namespace,node) group_left() ({nonzero_expr})"
|
||||
@ -1210,6 +1212,7 @@ def build_pods_dashboard():
|
||||
],
|
||||
instant=True,
|
||||
options={"showColumnFilters": False},
|
||||
filterable=False,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@ -266,7 +266,10 @@
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
"unit": "s",
|
||||
"custom": {
|
||||
"filterable": true
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@ -303,7 +306,10 @@
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
"unit": "s",
|
||||
"custom": {
|
||||
"filterable": true
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@ -340,7 +346,10 @@
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
"unit": "s",
|
||||
"custom": {
|
||||
"filterable": true
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@ -498,7 +507,7 @@
|
||||
{
|
||||
"id": 10,
|
||||
"type": "table",
|
||||
"title": "Namespace Plurality by Node v19",
|
||||
"title": "Namespace Plurality by Node v20",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "atlas-vm"
|
||||
@ -518,7 +527,10 @@
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent"
|
||||
"unit": "percent",
|
||||
"custom": {
|
||||
"filterable": false
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
|
||||
@ -275,7 +275,10 @@ data:
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
"unit": "s",
|
||||
"custom": {
|
||||
"filterable": true
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@ -312,7 +315,10 @@ data:
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
"unit": "s",
|
||||
"custom": {
|
||||
"filterable": true
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@ -349,7 +355,10 @@ data:
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
"unit": "s",
|
||||
"custom": {
|
||||
"filterable": true
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@ -507,7 +516,7 @@ data:
|
||||
{
|
||||
"id": 10,
|
||||
"type": "table",
|
||||
"title": "Namespace Plurality by Node v19",
|
||||
"title": "Namespace Plurality by Node v20",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "atlas-vm"
|
||||
@ -527,7 +536,10 @@ data:
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent"
|
||||
"unit": "percent",
|
||||
"custom": {
|
||||
"filterable": false
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user