about/index.php: Add message if database connection fail
fixes #5155
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(Sectionglobal) from/etc/icingaweb2/config.iniThis will simulate the case that no configuration database has been configured - Note down the cases where migrations are checked
Utilize PHPStorm's
Find Usagesfor 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 : 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:
HealthHook verson: