system: more natural cron escaping for command #10075
Changes command output from
/usr/local/sbin/configctl -d -- 'system remote backup'
to
/usr/local/sbin/configctl -d -- system remote backup
which is actually correct and needed since c491376.
Not sure what "\n" had to do with it but in the case of the
command it should be a normal string and risk of injection
is lower than parameter (but still mitigated properly).
MVC: add support for pluggable dynamic menu items and move some existing parts out of the MenuSystem class
In most cases we use static menu registartions, but there are exceptions which depend on interfaces for example.
While looking at https://github.com/opnsense/core/pull/10033, a longer standing wish came up again, which is the reason to add this support right now. It also helps in removing some legacy components for good via plugins.
To register new menu items, the following pattern may be used:
* In your model, derive a Menu class from MenuContainer
* implement a method collect() which should add new menu items via the appendItem() {bound to appendItem in MenuSystem}
Always try to minimize the amount of code inside these plugins as this code will be executed on each page load.
ui: use space in apply box for the apply reminder
We could extend this a bit if we want to go this way.
It's the best way to use existing space and move the
message to where it matters most -- the apply button
itself.
I'm not entirely sure about coloring. We could instead
make the whole box change color similar to what alerts
are doing.