Favicon color to reflect status

Issue #541 resolved
Former user created an issue

It'd be handy if the favicon changed to reflect the overall status of M/Monit.

Ie: Green if all is Good, Orange for warning, Red for error.

Gary.

Comments (4)

  1. Tildeslash repo owner

    I wish it was possible. Unfortunately browsers cache favicon and it is not possible to change at runtime. Unless something has changed since we last investigated this.

  2. Ryan Mulligan

    It is possible to change the title and favicon with JavaScript. This must be possible because all the chat programs do it reliably.

  3. Tildeslash repo owner

    Thanks for the suggestion and the reminder

    Updated in M/Monit and will be part of the next release. The favicon is updated to reflect the overall system status. That is; if any hosts are in an error state, the icon is changed to a red square, if some hosts have errors the icon is changed to a yellow triangle. Green circle if no hosts have errors. Grey square if all hosts are in ignored or inactive state.

    Comes with the following caveats. Does not work with Safari. Only implemented for dashboard for now; whenever the dashboard page is visited the favicon updates or when the background timer updates the dashboard.

  4. Ulrich Windl

    On “Unfortunately browsers cache favicon and it is not possible to change at runtime.”:

    But the display refreshes every 120 seconds anyway. So I guess a new page load may have a new favicon.

    Also while changing the favicon’s color: Why not change the title accordingly?

    Currently it says “Monit: $HOST”; why not “Monit: $HOST [$STATUS]” where $STATUS reflects the color of the favicon?

    Finally I made the experiment (after seeing that it’s created from BASE64) to convert the “.ico” to “.png”, and it’s only half of the size then. My guess is that any browser not older then 10 years can handle PNG favicons as well.

  5. Log in to comment