Improve Cluster Dashboard Timeline #1

Merged
tu merged 6 commits from feature/check-whether-works-as-pwa into master 2026-04-19 13:08:57 +00:00
2 changed files with 6 additions and 4 deletions
Showing only changes of commit 985cd39b2a - Show all commits

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
<?php <?php
define('APP_NAME', 'hyprcrd'); define('APP_NAME', 'hyprcrd');
define('APP_VERSION', '2.0.15'); define('APP_VERSION', '2.0.16');
// APP_DEBUG: gates verbose error responses (curl traces, upstream bodies). // APP_DEBUG: gates verbose error responses (curl traces, upstream bodies).
// Off by default; enable via env for local troubleshooting only. // Off by default; enable via env for local troubleshooting only.
@@ -295,8 +295,10 @@ function dominantSev(events) {
* workload ended up after the cluster, not the worst thing that * workload ended up after the cluster, not the worst thing that
* happened inside it — so a cluster that ends in "-> healthy" shows a * happened inside it — so a cluster that ends in "-> healthy" shows a
* green dot even if it contains degraded/warning events along the way. * green dot even if it contains degraded/warning events along the way.
* Returns null when no state-change event is present; callers fall * A cluster without any state transition (rollouts or image changes
* back to dominantSev in that case (e.g. rollout-only clusters). */ * that didn't flip state) counts as "uneventful" → also green, since
* the absence of a transition means the workload stayed in whatever
* state it was in. */
function clusterOutcomeSev(events) { function clusterOutcomeSev(events) {
for (const e of events) { for (const e of events) {
const m = /->\s*(\w+)\s*$/.exec(e.message || ''); const m = /->\s*(\w+)\s*$/.exec(e.message || '');
@@ -307,7 +309,7 @@ function clusterOutcomeSev(events) {
case 'unavailable': return 'error'; case 'unavailable': return 'error';
} }
} }
return null; return 'recovered';
} }
function sameDay(a, b) { function sameDay(a, b) {