Hide filters on namespace plurality table
This commit is contained in:
parent
134a4ad001
commit
13eb02c19b
@ -526,9 +526,13 @@ def table_panel(
|
|||||||
unit="none",
|
unit="none",
|
||||||
transformations=None,
|
transformations=None,
|
||||||
instant=False,
|
instant=False,
|
||||||
|
options=None,
|
||||||
):
|
):
|
||||||
"""Return a Grafana table panel definition."""
|
"""Return a Grafana table panel definition."""
|
||||||
# Optional PromQL subquery helpers in expr: share(), etc.
|
# Optional PromQL subquery helpers in expr: share(), etc.
|
||||||
|
panel_options = {"showHeader": True}
|
||||||
|
if options:
|
||||||
|
panel_options.update(options)
|
||||||
panel = {
|
panel = {
|
||||||
"id": panel_id,
|
"id": panel_id,
|
||||||
"type": "table",
|
"type": "table",
|
||||||
@ -537,7 +541,7 @@ def table_panel(
|
|||||||
"gridPos": grid,
|
"gridPos": grid,
|
||||||
"targets": [{"expr": expr, "refId": "A", **({"instant": True} if instant else {})}],
|
"targets": [{"expr": expr, "refId": "A", **({"instant": True} if instant else {})}],
|
||||||
"fieldConfig": {"defaults": {"unit": unit}, "overrides": []},
|
"fieldConfig": {"defaults": {"unit": unit}, "overrides": []},
|
||||||
"options": {"showHeader": True},
|
"options": panel_options,
|
||||||
}
|
}
|
||||||
if transformations:
|
if transformations:
|
||||||
panel["transformations"] = transformations
|
panel["transformations"] = transformations
|
||||||
@ -1191,7 +1195,7 @@ def build_pods_dashboard():
|
|||||||
panels.append(
|
panels.append(
|
||||||
table_panel(
|
table_panel(
|
||||||
10,
|
10,
|
||||||
"Namespace Plurality by Node v16",
|
"Namespace Plurality by Node v17",
|
||||||
(
|
(
|
||||||
f"{share_expr} * on(namespace,node) group_left() "
|
f"{share_expr} * on(namespace,node) group_left() "
|
||||||
f"({mask_expr})"
|
f"({mask_expr})"
|
||||||
@ -1205,6 +1209,7 @@ def build_pods_dashboard():
|
|||||||
{"id": "sortBy", "options": {"fields": ["node", "Value"], "order": "asc"}},
|
{"id": "sortBy", "options": {"fields": ["node", "Value"], "order": "asc"}},
|
||||||
],
|
],
|
||||||
instant=True,
|
instant=True,
|
||||||
|
options={"showColumnFilters": False},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -495,7 +495,7 @@
|
|||||||
{
|
{
|
||||||
"id": 10,
|
"id": 10,
|
||||||
"type": "table",
|
"type": "table",
|
||||||
"title": "Namespace Plurality by Node v16",
|
"title": "Namespace Plurality by Node v17",
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
"uid": "atlas-vm"
|
"uid": "atlas-vm"
|
||||||
@ -520,7 +520,8 @@
|
|||||||
"overrides": []
|
"overrides": []
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"showHeader": true
|
"showHeader": true,
|
||||||
|
"showColumnFilters": false
|
||||||
},
|
},
|
||||||
"transformations": [
|
"transformations": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -504,7 +504,7 @@ data:
|
|||||||
{
|
{
|
||||||
"id": 10,
|
"id": 10,
|
||||||
"type": "table",
|
"type": "table",
|
||||||
"title": "Namespace Plurality by Node v16",
|
"title": "Namespace Plurality by Node v17",
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
"uid": "atlas-vm"
|
"uid": "atlas-vm"
|
||||||
@ -529,7 +529,8 @@ data:
|
|||||||
"overrides": []
|
"overrides": []
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"showHeader": true
|
"showHeader": true,
|
||||||
|
"showColumnFilters": false
|
||||||
},
|
},
|
||||||
"transformations": [
|
"transformations": [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user