icingaweb2 icon indicating copy to clipboard operation
icingaweb2 copied to clipboard

about/index.php: Add message if database connection fail

Open JolienTrog opened this issue 8 months ago • 2 comments

fixes #5155

JolienTrog avatar Apr 23 '25 14:04 JolienTrog

Seems like this was already in part addressed by #5236, which hid the stacktrace completely. You're now re-introducing it, but with a different message, even though I said to not show a stacktrace anymore!

But anyway, let's start from scratch here. Please do the following:

  • Drop the option config_resource (Section global) from /etc/icingaweb2/config.ini This will simulate the case that no configuration database has been configured
  • Note down the cases where migrations are checked Utilize PHPStorm's Find Usages for this
  • Visit the routes that will trigger a check and see how they cope with a missing/invalid resource We know already that the about page will suppress the error, but others might not

Then, depending on the individual case, please propose a solution how it can be improved. In case of the about page, a message at the location where pending migrations are usually shown for example. (Above loaded libraries)

nilmerg avatar Apr 24 '25 13:04 nilmerg

@nilmerg : I talked to @flourish86 and he suggested adding a notification similar to the health check and integrating it into the footer. Compared to a regular warning message, this notification is persistent and doesn’t disappear after a short time. That’s why I didn’t use the regular warning notification, but instead displayed the message at the top of the page. However, this approach is not consistent with the overall UI/UX. The disadvantage would be that the existing development would basically have to be completely reworked. So, aside from the learning effect for me, a lot of development work would be wasted.

What do you think? Should I keep it like this or use the HealthHook instead?

Workaround version: image

HealthHook verson: image

JolienTrog avatar Oct 13 '25 12:10 JolienTrog