rajnandan1 / kener

Kener is a Modern Self hosted Status Page, batteries included
https://kener.ing/
MIT License
2.2k stars 83 forks source link

Show "Status OK" in Green after the outage is resolved #53

Open rayjanoka opened 4 months ago

rayjanoka commented 4 months ago

Is your feature request related to a problem? Please describe.

If there has been >=1 minute of downtime today the main status description will show Down for N minutes in red all day, even if we are currently back UP until it rolls to the next day.

I think it should be more clear that we are back UP so like it to say Status OK in green again if we are back UP, but continue show today's bar as red. Then the user can still mouse over the red bar to see how many minutes we were down today.

Describe the solution you'd like

Currently: image image

Preferred: image image

Describe alternatives you've considered

None

Additional context

I hacked this in my system by looking for the last update and forcing it to green.

I did something like this in ninety.js but there is probably a better solution.

in getDayData() I added:

    // modified to show green if we are up right now
    const last = day0[Object.keys(day0)[Object.keys(day0).length-1]].status
    if (last === "UP") {
        cssClass = StatusObj.UP;
        message = "Status OK";
    }