monitoring: fix overview fan and gate timelines
This commit is contained in:
parent
5eef2e9ba3
commit
3492b6026e
@ -1834,14 +1834,17 @@ def build_overview():
|
|||||||
fan_intensity_thresholds = {
|
fan_intensity_thresholds = {
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{"color": dark_blue, "value": None},
|
{"color": "#1f60c4", "value": None},
|
||||||
{"color": "semi-dark-blue", "value": 1},
|
{"color": "#2870b8", "value": 1},
|
||||||
{"color": dark_green, "value": 2},
|
{"color": "#2f8599", "value": 2},
|
||||||
{"color": "semi-dark-green", "value": 4},
|
{"color": "#2f9e44", "value": 3},
|
||||||
{"color": dark_yellow, "value": 5},
|
{"color": "#76a935", "value": 4},
|
||||||
{"color": dark_orange, "value": 7},
|
{"color": "#d4b106", "value": 5},
|
||||||
{"color": "semi-dark-red", "value": 9},
|
{"color": "#d69605", "value": 6},
|
||||||
{"color": dark_red, "value": 10},
|
{"color": "#e06c00", "value": 7},
|
||||||
|
{"color": "#d95718", "value": 8},
|
||||||
|
{"color": "#c92a2a", "value": 9},
|
||||||
|
{"color": "#8f1d1d", "value": 10},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
fan_intensity_expr = (
|
fan_intensity_expr = (
|
||||||
@ -2112,7 +2115,7 @@ def build_overview():
|
|||||||
links=overview_link("atlas-power"),
|
links=overview_link("atlas-power"),
|
||||||
description="Fan intensity lanes on the 0-10 controller scale. Cooler colors are quiet/low intensity; warmer colors mean the enclosure is pushing harder.",
|
description="Fan intensity lanes on the 0-10 controller scale. Cooler colors are quiet/low intensity; warmer colors mean the enclosure is pushing harder.",
|
||||||
)
|
)
|
||||||
fan_panel["options"]["legend"] = {"displayMode": "table", "placement": "right"}
|
fan_panel["options"]["legend"] = {"displayMode": "hidden", "placement": "bottom"}
|
||||||
fan_panel["options"]["tooltip"] = {"mode": "multi", "sort": "none"}
|
fan_panel["options"]["tooltip"] = {"mode": "multi", "sort": "none"}
|
||||||
panels.append(fan_panel)
|
panels.append(fan_panel)
|
||||||
flux_source = stat_panel(
|
flux_source = stat_panel(
|
||||||
@ -2230,7 +2233,6 @@ def build_overview():
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
panels[-1]["options"]["legend"] = {"displayMode": "hidden", "placement": "bottom"}
|
panels[-1]["options"]["legend"] = {"displayMode": "hidden", "placement": "bottom"}
|
||||||
panels[-1]["options"]["rowHeight"] = 0.95
|
|
||||||
for panel_id, title, metric, x_pos, description in [
|
for panel_id, title, metric, x_pos, description in [
|
||||||
(
|
(
|
||||||
142,
|
142,
|
||||||
|
|||||||
@ -100,9 +100,11 @@ def test_overview_uses_readable_quality_power_and_gitops_panels():
|
|||||||
assert panels_by_title["Fan Intensity History"]["fieldConfig"]["defaults"]["max"] == 10
|
assert panels_by_title["Fan Intensity History"]["fieldConfig"]["defaults"]["max"] == 10
|
||||||
assert panels_by_title["Fan Intensity History"]["targets"][0]["legendFormat"] == "{{fan}}"
|
assert panels_by_title["Fan Intensity History"]["targets"][0]["legendFormat"] == "{{fan}}"
|
||||||
fan_steps = panels_by_title["Fan Intensity History"]["fieldConfig"]["defaults"]["thresholds"]["steps"]
|
fan_steps = panels_by_title["Fan Intensity History"]["fieldConfig"]["defaults"]["thresholds"]["steps"]
|
||||||
assert {"color": "semi-dark-blue", "value": 1} in fan_steps
|
assert [step["value"] for step in fan_steps] == [None, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||||
assert {"color": "semi-dark-green", "value": 4} in fan_steps
|
assert fan_steps[0]["color"] == "#1f60c4"
|
||||||
assert {"color": "semi-dark-red", "value": 9} in fan_steps
|
assert fan_steps[5]["color"] == "#d4b106"
|
||||||
|
assert fan_steps[-1]["color"] == "#8f1d1d"
|
||||||
|
assert panels_by_title["Fan Intensity History"]["options"]["legend"]["displayMode"] == "hidden"
|
||||||
|
|
||||||
assert panels_by_title["Flux Source"]["type"] == "stat"
|
assert panels_by_title["Flux Source"]["type"] == "stat"
|
||||||
assert panels_by_title["Flux Source"]["gridPos"] == {"h": 2, "w": 3, "x": 21, "y": 7}
|
assert panels_by_title["Flux Source"]["gridPos"] == {"h": 2, "w": 3, "x": 21, "y": 7}
|
||||||
@ -116,7 +118,7 @@ def test_overview_uses_readable_quality_power_and_gitops_panels():
|
|||||||
assert "Kustomizations Not Suspended" in gitops_expr
|
assert "Kustomizations Not Suspended" in gitops_expr
|
||||||
assert "HelmReleases Not Suspended" in gitops_expr
|
assert "HelmReleases Not Suspended" in gitops_expr
|
||||||
assert panels_by_title["Gate Checks Passing by Suite"]["options"]["legend"]["displayMode"] == "hidden"
|
assert panels_by_title["Gate Checks Passing by Suite"]["options"]["legend"]["displayMode"] == "hidden"
|
||||||
assert panels_by_title["Gate Checks Passing by Suite"]["options"]["rowHeight"] == 0.95
|
assert "rowHeight" not in panels_by_title["Gate Checks Passing by Suite"]["options"]
|
||||||
|
|
||||||
pvc_backup_expr = panels_by_title["PVC Backup Health / Age"]["targets"][0]["expr"]
|
pvc_backup_expr = panels_by_title["PVC Backup Health / Age"]["targets"][0]["expr"]
|
||||||
assert "backup-telemetry-missing" in pvc_backup_expr
|
assert "backup-telemetry-missing" in pvc_backup_expr
|
||||||
|
|||||||
@ -1909,35 +1909,47 @@
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "dark-blue",
|
"color": "#1f60c4",
|
||||||
"value": null
|
"value": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "semi-dark-blue",
|
"color": "#2870b8",
|
||||||
"value": 1
|
"value": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "dark-green",
|
"color": "#2f8599",
|
||||||
"value": 2
|
"value": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "semi-dark-green",
|
"color": "#2f9e44",
|
||||||
|
"value": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#76a935",
|
||||||
"value": 4
|
"value": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "dark-yellow",
|
"color": "#d4b106",
|
||||||
"value": 5
|
"value": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "dark-orange",
|
"color": "#d69605",
|
||||||
|
"value": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#e06c00",
|
||||||
"value": 7
|
"value": 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "semi-dark-red",
|
"color": "#d95718",
|
||||||
|
"value": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#c92a2a",
|
||||||
"value": 9
|
"value": 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "dark-red",
|
"color": "#8f1d1d",
|
||||||
"value": 10
|
"value": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -1956,8 +1968,8 @@
|
|||||||
"mergeValues": true,
|
"mergeValues": true,
|
||||||
"showValue": "never",
|
"showValue": "never",
|
||||||
"legend": {
|
"legend": {
|
||||||
"displayMode": "table",
|
"displayMode": "hidden",
|
||||||
"placement": "right"
|
"placement": "bottom"
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "multi",
|
"mode": "multi",
|
||||||
@ -2793,8 +2805,7 @@
|
|||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "single",
|
"mode": "single",
|
||||||
"sort": "none"
|
"sort": "none"
|
||||||
},
|
}
|
||||||
"rowHeight": 0.95
|
|
||||||
},
|
},
|
||||||
"links": [
|
"links": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1918,35 +1918,47 @@ data:
|
|||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"color": "dark-blue",
|
"color": "#1f60c4",
|
||||||
"value": null
|
"value": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "semi-dark-blue",
|
"color": "#2870b8",
|
||||||
"value": 1
|
"value": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "dark-green",
|
"color": "#2f8599",
|
||||||
"value": 2
|
"value": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "semi-dark-green",
|
"color": "#2f9e44",
|
||||||
|
"value": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#76a935",
|
||||||
"value": 4
|
"value": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "dark-yellow",
|
"color": "#d4b106",
|
||||||
"value": 5
|
"value": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "dark-orange",
|
"color": "#d69605",
|
||||||
|
"value": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#e06c00",
|
||||||
"value": 7
|
"value": 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "semi-dark-red",
|
"color": "#d95718",
|
||||||
|
"value": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#c92a2a",
|
||||||
"value": 9
|
"value": 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"color": "dark-red",
|
"color": "#8f1d1d",
|
||||||
"value": 10
|
"value": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -1965,8 +1977,8 @@ data:
|
|||||||
"mergeValues": true,
|
"mergeValues": true,
|
||||||
"showValue": "never",
|
"showValue": "never",
|
||||||
"legend": {
|
"legend": {
|
||||||
"displayMode": "table",
|
"displayMode": "hidden",
|
||||||
"placement": "right"
|
"placement": "bottom"
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "multi",
|
"mode": "multi",
|
||||||
@ -2802,8 +2814,7 @@ data:
|
|||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "single",
|
"mode": "single",
|
||||||
"sort": "none"
|
"sort": "none"
|
||||||
},
|
}
|
||||||
"rowHeight": 0.95
|
|
||||||
},
|
},
|
||||||
"links": [
|
"links": [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user