Added another function for plugin authors to utilize (currently available if CA version 2020.01.18+ is installed, but will soon issue a PR for it to be included in the base OS)
Currently, any notifications that the server must be rebooted are not consistent when switching back and forth between pages (with the exception of notices because the OS was updated, any notification gets lost when leaving the page - including some built-in pages within unRaid). With this function, a plugin author can easily throw up a Reboot is necessary message and have that survive from page to page in the GUI until the user actually reboots.
if (typeof addRebootNotice === "function") {
addRebootNotice();
}
will toss up a banner warning on all GUI pages "A reboot is required for the changes to take effect"
You can also customize the message (recommended)
if (typeof addRebootNotice === "function") {
addRebootNotice("Disable Security Mitigations: A Reboot Is Required For Changes To Take Effect");
}
For complete backwards compatibility with previous versions of CA / unRaid, change the code to be something akin to this:
if (typeof addRebootNotice === "function") {
addRebootNotice("Disable Security Mitigations: A Reboot Is Required For Changes To Take Effect");
} else {
if (typeof addBannerWarning === "function") {
addBannerWarning("A Reboot Is Required For Changes To Take Effect");
}
}
The fallback of addBannerWarning will however only display on the current page within the GUI