diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index 3d581c7..c3f3655 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -560,6 +560,7 @@ def timeseries_panel( grid, *, unit="none", + max_value=None, legend=None, legend_display="table", legend_placement="bottom", @@ -584,6 +585,8 @@ def timeseries_panel( "tooltip": {"mode": "multi"}, }, } + if max_value is not None: + panel["fieldConfig"]["defaults"]["max"] = max_value if legend: panel["targets"][0]["legendFormat"] = legend if legend_calcs: @@ -742,6 +745,7 @@ def bargauge_panel( thresholds=None, decimals=None, instant=False, + overrides=None, ): """Return a bar gauge panel with label-aware reduction.""" panel = { @@ -786,6 +790,8 @@ def bargauge_panel( }, }, } + if overrides: + panel["fieldConfig"]["overrides"].extend(overrides) if decimals is not None: panel["fieldConfig"]["defaults"]["decimals"] = decimals if links: @@ -1197,6 +1203,7 @@ def build_overview(): ARIADNE_TEST_SUCCESS_RATE, {"h": 6, "w": 6, "x": 12, "y": 14}, unit="percent", + max_value=100, legend=None, legend_display="list", ) @@ -1210,6 +1217,16 @@ def build_overview(): unit="none", instant=True, legend="{{result}}", + overrides=[ + { + "matcher": {"id": "byName", "options": "error"}, + "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "yellow"}}], + }, + { + "matcher": {"id": "byName", "options": "failed"}, + "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}], + }, + ], thresholds={ "mode": "absolute", "steps": [ @@ -2462,7 +2479,6 @@ def build_jobs_dashboard(): instant=True, legend="{{task}}", thresholds=recent_error_thresholds, - sort_order="asc", decimals=2, ) ) diff --git a/services/monitoring/dashboards/atlas-jobs.json b/services/monitoring/dashboards/atlas-jobs.json index c70e9c0..810b3b3 100644 --- a/services/monitoring/dashboards/atlas-jobs.json +++ b/services/monitoring/dashboards/atlas-jobs.json @@ -675,7 +675,7 @@ "fields": [ "Value" ], - "order": "asc" + "order": "desc" } } ] diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index 5acc2a3..3feb531 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -1575,7 +1575,8 @@ ], "fieldConfig": { "defaults": { - "unit": "percent" + "unit": "percent", + "max": 100 }, "overrides": [] }, @@ -1638,7 +1639,38 @@ ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "error" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "fixed", + "fixedColor": "yellow" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "failed" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "fixed", + "fixedColor": "red" + } + } + ] + } + ] }, "options": { "displayMode": "gradient", diff --git a/services/monitoring/grafana-dashboard-jobs.yaml b/services/monitoring/grafana-dashboard-jobs.yaml index 36c1252..279d959 100644 --- a/services/monitoring/grafana-dashboard-jobs.yaml +++ b/services/monitoring/grafana-dashboard-jobs.yaml @@ -684,7 +684,7 @@ data: "fields": [ "Value" ], - "order": "asc" + "order": "desc" } } ] diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index 55196e8..66b6da0 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -1584,7 +1584,8 @@ data: ], "fieldConfig": { "defaults": { - "unit": "percent" + "unit": "percent", + "max": 100 }, "overrides": [] }, @@ -1647,7 +1648,38 @@ data: ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "error" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "fixed", + "fixedColor": "yellow" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "failed" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "fixed", + "fixedColor": "red" + } + } + ] + } + ] }, "options": { "displayMode": "gradient",