monitoring(overview): replace jenkins tables with stat lists and fix links/colors

This commit is contained in:
Brad Stein 2026-04-13 22:07:24 -03:00
parent 2db8e1423d
commit 8db72c9475
5 changed files with 316 additions and 410 deletions

View File

@ -1464,7 +1464,7 @@ def jenkins_weather_bargauge_panel(
"links": [ "links": [
{ {
"title": "Open Jenkins job", "title": "Open Jenkins job",
"url": "${__field.labels.job_url}", "url": "https://ci.bstein.dev/job/${__field.labels.exported_job}/",
"targetBlank": True, "targetBlank": True,
} }
], ],
@ -1480,11 +1480,11 @@ def jenkins_weather_bargauge_panel(
}, },
{ {
"matcher": {"id": "byFrameRefID", "options": "C"}, "matcher": {"id": "byFrameRefID", "options": "C"},
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "yellow"}}], "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}],
}, },
{ {
"matcher": {"id": "byFrameRefID", "options": "D"}, "matcher": {"id": "byFrameRefID", "options": "D"},
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "gray"}}], "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}],
}, },
], ],
}, },
@ -1563,7 +1563,7 @@ def jenkins_weather_statlist_panel(
"links": [ "links": [
{ {
"title": "Open Jenkins job", "title": "Open Jenkins job",
"url": "${__field.labels.job_url}", "url": "https://ci.bstein.dev/job/${__field.labels.exported_job}/",
"targetBlank": True, "targetBlank": True,
} }
], ],
@ -1579,11 +1579,11 @@ def jenkins_weather_statlist_panel(
}, },
{ {
"matcher": {"id": "byFrameRefID", "options": "C"}, "matcher": {"id": "byFrameRefID", "options": "C"},
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "yellow"}}], "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}],
}, },
{ {
"matcher": {"id": "byFrameRefID", "options": "D"}, "matcher": {"id": "byFrameRefID", "options": "D"},
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "gray"}}], "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}],
}, },
], ],
}, },
@ -2289,7 +2289,7 @@ def build_overview():
) )
panels.append(test_success) panels.append(test_success)
panels.append( panels.append(
jenkins_weather_scroll_table_panel( jenkins_weather_statlist_panel(
142, 142,
"Jenkins Last Success (h, newest first)", "Jenkins Last Success (h, newest first)",
JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS_BY_JOB, JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS_BY_JOB,
@ -2297,15 +2297,18 @@ def build_overview():
unit="h", unit="h",
decimals=1, decimals=1,
sort_order="asc", sort_order="asc",
limit=None,
title_size=11,
value_size=11,
links=link_to("atlas-jobs"), links=link_to("atlas-jobs"),
description=( description=(
"Scrollable list of all Jenkins jobs ordered by age since most recent successful run " "List of Jenkins jobs ordered by age since most recent successful run (newest first). "
"(newest first)." "Green means last run succeeded; red means last run did not succeed."
), ),
) )
) )
panels.append( panels.append(
jenkins_weather_scroll_table_panel( jenkins_weather_statlist_panel(
243, 243,
"Jenkins Last Failure (h, newest first)", "Jenkins Last Failure (h, newest first)",
JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS_BY_JOB, JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS_BY_JOB,
@ -2313,10 +2316,13 @@ def build_overview():
unit="h", unit="h",
decimals=1, decimals=1,
sort_order="asc", sort_order="asc",
limit=None,
title_size=11,
value_size=11,
links=link_to("atlas-jobs"), links=link_to("atlas-jobs"),
description=( description=(
"Scrollable list of all Jenkins jobs ordered by age since most recent failed run " "List of Jenkins jobs ordered by age since most recent failed run (newest first). "
"(newest first)." "Green means last run succeeded; red means last run did not succeed."
), ),
) )
) )

View File

@ -1582,7 +1582,7 @@
"links": [ "links": [
{ {
"title": "Open Jenkins job", "title": "Open Jenkins job",
"url": "${__field.labels.job_url}", "url": "https://ci.bstein.dev/job/${__field.labels.exported_job}/",
"targetBlank": true "targetBlank": true
} }
] ]
@ -1628,7 +1628,7 @@
"id": "color", "id": "color",
"value": { "value": {
"mode": "fixed", "mode": "fixed",
"fixedColor": "yellow" "fixedColor": "red"
} }
} }
] ]
@ -1643,7 +1643,7 @@
"id": "color", "id": "color",
"value": { "value": {
"mode": "fixed", "mode": "fixed",
"fixedColor": "gray" "fixedColor": "red"
} }
} }
] ]

View File

@ -2283,7 +2283,7 @@
}, },
{ {
"id": 142, "id": 142,
"type": "table", "type": "stat",
"title": "Jenkins Last Success (h, newest first)", "title": "Jenkins Last Success (h, newest first)",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@ -2299,88 +2299,42 @@
{ {
"refId": "A", "refId": "A",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)", "expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)",
"instant": true, "legendFormat": "{{weather_icon}} {{exported_job}}",
"format": "table" "instant": true
}, },
{ {
"refId": "B", "refId": "B",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) != 1)", "expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 0)",
"instant": true, "legendFormat": "{{weather_icon}} {{exported_job}}",
"format": "table" "instant": true
},
{
"refId": "C",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 2)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "D",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) < 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "h", "unit": "h",
"custom": { "decimals": 1,
"filterable": false "min": 0,
} "links": [
{
"title": "Open Jenkins job",
"url": "https://ci.bstein.dev/job/${__field.labels.exported_job}/",
"targetBlank": true
}
]
}, },
"overrides": [ "overrides": [
{
"matcher": {
"id": "byName",
"options": "weather_icon"
},
"properties": [
{
"id": "custom.width",
"value": 26
},
{
"id": "custom.align",
"value": "center"
}
]
},
{
"matcher": {
"id": "byName",
"options": "exported_job"
},
"properties": [
{
"id": "custom.width",
"value": 190
},
{
"id": "links",
"value": [
{
"title": "Open Jenkins job",
"url": "https://ci.bstein.dev/job/${__value.raw}/",
"targetBlank": true
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Value"
},
"properties": [
{
"id": "decimals",
"value": 1
},
{
"id": "custom.width",
"value": 74
},
{
"id": "custom.align",
"value": "right"
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
}
]
},
{ {
"matcher": { "matcher": {
"id": "byFrameRefID", "id": "byFrameRefID",
@ -2410,24 +2364,59 @@
} }
} }
] ]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "C"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "D"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
} }
] ]
}, },
"options": { "options": {
"showHeader": false, "colorMode": "value",
"columnFilters": false, "graphMode": "none",
"cellHeight": "sm", "justifyMode": "left",
"footer": { "orientation": "horizontal",
"show": false, "wideLayout": true,
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"calcs": [] "values": false
},
"textMode": "name_and_value",
"text": {
"titleSize": 11,
"valueSize": 11
} }
}, },
"transformations": [ "transformations": [
{
"id": "labelsToFields",
"options": {}
},
{ {
"id": "sortBy", "id": "sortBy",
"options": { "options": {
@ -2436,20 +2425,6 @@
], ],
"order": "asc" "order": "asc"
} }
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"job_url": true
},
"renameByName": {
"weather_icon": "",
"exported_job": "Job",
"Value": "h"
}
}
} }
], ],
"links": [ "links": [
@ -2459,11 +2434,11 @@
"targetBlank": true "targetBlank": true
} }
], ],
"description": "Scrollable list of all Jenkins jobs ordered by age since most recent successful run (newest first)." "description": "List of Jenkins jobs ordered by age since most recent successful run (newest first). Green means last run succeeded; red means last run did not succeed."
}, },
{ {
"id": 243, "id": 243,
"type": "table", "type": "stat",
"title": "Jenkins Last Failure (h, newest first)", "title": "Jenkins Last Failure (h, newest first)",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@ -2479,88 +2454,42 @@
{ {
"refId": "A", "refId": "A",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)", "expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)",
"instant": true, "legendFormat": "{{weather_icon}} {{exported_job}}",
"format": "table" "instant": true
}, },
{ {
"refId": "B", "refId": "B",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) != 1)", "expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 0)",
"instant": true, "legendFormat": "{{weather_icon}} {{exported_job}}",
"format": "table" "instant": true
},
{
"refId": "C",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 2)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "D",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) < 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "h", "unit": "h",
"custom": { "decimals": 1,
"filterable": false "min": 0,
} "links": [
{
"title": "Open Jenkins job",
"url": "https://ci.bstein.dev/job/${__field.labels.exported_job}/",
"targetBlank": true
}
]
}, },
"overrides": [ "overrides": [
{
"matcher": {
"id": "byName",
"options": "weather_icon"
},
"properties": [
{
"id": "custom.width",
"value": 26
},
{
"id": "custom.align",
"value": "center"
}
]
},
{
"matcher": {
"id": "byName",
"options": "exported_job"
},
"properties": [
{
"id": "custom.width",
"value": 190
},
{
"id": "links",
"value": [
{
"title": "Open Jenkins job",
"url": "https://ci.bstein.dev/job/${__value.raw}/",
"targetBlank": true
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Value"
},
"properties": [
{
"id": "decimals",
"value": 1
},
{
"id": "custom.width",
"value": 74
},
{
"id": "custom.align",
"value": "right"
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
}
]
},
{ {
"matcher": { "matcher": {
"id": "byFrameRefID", "id": "byFrameRefID",
@ -2590,24 +2519,59 @@
} }
} }
] ]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "C"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "D"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
} }
] ]
}, },
"options": { "options": {
"showHeader": false, "colorMode": "value",
"columnFilters": false, "graphMode": "none",
"cellHeight": "sm", "justifyMode": "left",
"footer": { "orientation": "horizontal",
"show": false, "wideLayout": true,
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"calcs": [] "values": false
},
"textMode": "name_and_value",
"text": {
"titleSize": 11,
"valueSize": 11
} }
}, },
"transformations": [ "transformations": [
{
"id": "labelsToFields",
"options": {}
},
{ {
"id": "sortBy", "id": "sortBy",
"options": { "options": {
@ -2616,20 +2580,6 @@
], ],
"order": "asc" "order": "asc"
} }
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"job_url": true
},
"renameByName": {
"weather_icon": "",
"exported_job": "Job",
"Value": "h"
}
}
} }
], ],
"links": [ "links": [
@ -2639,7 +2589,7 @@
"targetBlank": true "targetBlank": true
} }
], ],
"description": "Scrollable list of all Jenkins jobs ordered by age since most recent failed run (newest first)." "description": "List of Jenkins jobs ordered by age since most recent failed run (newest first). Green means last run succeeded; red means last run did not succeed."
}, },
{ {
"id": 47, "id": 47,

View File

@ -1591,7 +1591,7 @@ data:
"links": [ "links": [
{ {
"title": "Open Jenkins job", "title": "Open Jenkins job",
"url": "${__field.labels.job_url}", "url": "https://ci.bstein.dev/job/${__field.labels.exported_job}/",
"targetBlank": true "targetBlank": true
} }
] ]
@ -1637,7 +1637,7 @@ data:
"id": "color", "id": "color",
"value": { "value": {
"mode": "fixed", "mode": "fixed",
"fixedColor": "yellow" "fixedColor": "red"
} }
} }
] ]
@ -1652,7 +1652,7 @@ data:
"id": "color", "id": "color",
"value": { "value": {
"mode": "fixed", "mode": "fixed",
"fixedColor": "gray" "fixedColor": "red"
} }
} }
] ]

View File

@ -2292,7 +2292,7 @@ data:
}, },
{ {
"id": 142, "id": 142,
"type": "table", "type": "stat",
"title": "Jenkins Last Success (h, newest first)", "title": "Jenkins Last Success (h, newest first)",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@ -2308,88 +2308,42 @@ data:
{ {
"refId": "A", "refId": "A",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)", "expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)",
"instant": true, "legendFormat": "{{weather_icon}} {{exported_job}}",
"format": "table" "instant": true
}, },
{ {
"refId": "B", "refId": "B",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) != 1)", "expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 0)",
"instant": true, "legendFormat": "{{weather_icon}} {{exported_job}}",
"format": "table" "instant": true
},
{
"refId": "C",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 2)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "D",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) < 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "h", "unit": "h",
"custom": { "decimals": 1,
"filterable": false "min": 0,
} "links": [
{
"title": "Open Jenkins job",
"url": "https://ci.bstein.dev/job/${__field.labels.exported_job}/",
"targetBlank": true
}
]
}, },
"overrides": [ "overrides": [
{
"matcher": {
"id": "byName",
"options": "weather_icon"
},
"properties": [
{
"id": "custom.width",
"value": 26
},
{
"id": "custom.align",
"value": "center"
}
]
},
{
"matcher": {
"id": "byName",
"options": "exported_job"
},
"properties": [
{
"id": "custom.width",
"value": 190
},
{
"id": "links",
"value": [
{
"title": "Open Jenkins job",
"url": "https://ci.bstein.dev/job/${__value.raw}/",
"targetBlank": true
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Value"
},
"properties": [
{
"id": "decimals",
"value": 1
},
{
"id": "custom.width",
"value": 74
},
{
"id": "custom.align",
"value": "right"
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
}
]
},
{ {
"matcher": { "matcher": {
"id": "byFrameRefID", "id": "byFrameRefID",
@ -2419,24 +2373,59 @@ data:
} }
} }
] ]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "C"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "D"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
} }
] ]
}, },
"options": { "options": {
"showHeader": false, "colorMode": "value",
"columnFilters": false, "graphMode": "none",
"cellHeight": "sm", "justifyMode": "left",
"footer": { "orientation": "horizontal",
"show": false, "wideLayout": true,
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"calcs": [] "values": false
},
"textMode": "name_and_value",
"text": {
"titleSize": 11,
"valueSize": 11
} }
}, },
"transformations": [ "transformations": [
{
"id": "labelsToFields",
"options": {}
},
{ {
"id": "sortBy", "id": "sortBy",
"options": { "options": {
@ -2445,20 +2434,6 @@ data:
], ],
"order": "asc" "order": "asc"
} }
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"job_url": true
},
"renameByName": {
"weather_icon": "",
"exported_job": "Job",
"Value": "h"
}
}
} }
], ],
"links": [ "links": [
@ -2468,11 +2443,11 @@ data:
"targetBlank": true "targetBlank": true
} }
], ],
"description": "Scrollable list of all Jenkins jobs ordered by age since most recent successful run (newest first)." "description": "List of Jenkins jobs ordered by age since most recent successful run (newest first). Green means last run succeeded; red means last run did not succeed."
}, },
{ {
"id": 243, "id": 243,
"type": "table", "type": "stat",
"title": "Jenkins Last Failure (h, newest first)", "title": "Jenkins Last Failure (h, newest first)",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
@ -2488,88 +2463,42 @@ data:
{ {
"refId": "A", "refId": "A",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)", "expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)",
"instant": true, "legendFormat": "{{weather_icon}} {{exported_job}}",
"format": "table" "instant": true
}, },
{ {
"refId": "B", "refId": "B",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) != 1)", "expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 0)",
"instant": true, "legendFormat": "{{weather_icon}} {{exported_job}}",
"format": "table" "instant": true
},
{
"refId": "C",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 2)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "D",
"expr": "(min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) < 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
} }
], ],
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"unit": "h", "unit": "h",
"custom": { "decimals": 1,
"filterable": false "min": 0,
} "links": [
{
"title": "Open Jenkins job",
"url": "https://ci.bstein.dev/job/${__field.labels.exported_job}/",
"targetBlank": true
}
]
}, },
"overrides": [ "overrides": [
{
"matcher": {
"id": "byName",
"options": "weather_icon"
},
"properties": [
{
"id": "custom.width",
"value": 26
},
{
"id": "custom.align",
"value": "center"
}
]
},
{
"matcher": {
"id": "byName",
"options": "exported_job"
},
"properties": [
{
"id": "custom.width",
"value": 190
},
{
"id": "links",
"value": [
{
"title": "Open Jenkins job",
"url": "https://ci.bstein.dev/job/${__value.raw}/",
"targetBlank": true
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Value"
},
"properties": [
{
"id": "decimals",
"value": 1
},
{
"id": "custom.width",
"value": 74
},
{
"id": "custom.align",
"value": "right"
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
}
]
},
{ {
"matcher": { "matcher": {
"id": "byFrameRefID", "id": "byFrameRefID",
@ -2599,24 +2528,59 @@ data:
} }
} }
] ]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "C"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "D"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
} }
] ]
}, },
"options": { "options": {
"showHeader": false, "colorMode": "value",
"columnFilters": false, "graphMode": "none",
"cellHeight": "sm", "justifyMode": "left",
"footer": { "orientation": "horizontal",
"show": false, "wideLayout": true,
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "", "fields": "",
"calcs": [] "values": false
},
"textMode": "name_and_value",
"text": {
"titleSize": 11,
"valueSize": 11
} }
}, },
"transformations": [ "transformations": [
{
"id": "labelsToFields",
"options": {}
},
{ {
"id": "sortBy", "id": "sortBy",
"options": { "options": {
@ -2625,20 +2589,6 @@ data:
], ],
"order": "asc" "order": "asc"
} }
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"job_url": true
},
"renameByName": {
"weather_icon": "",
"exported_job": "Job",
"Value": "h"
}
}
} }
], ],
"links": [ "links": [
@ -2648,7 +2598,7 @@ data:
"targetBlank": true "targetBlank": true
} }
], ],
"description": "Scrollable list of all Jenkins jobs ordered by age since most recent failed run (newest first)." "description": "List of Jenkins jobs ordered by age since most recent failed run (newest first). Green means last run succeeded; red means last run did not succeed."
}, },
{ {
"id": 47, "id": 47,