Instead of having to return a single string, controllers should
ideally return an array for rows where multiple string values may
occupy a cell. This spares the frontend from having to split
these values up, as well as keeping the controller output parseable
This may have been going on ever since we moved a separate CORE_ABI
in the business edition. Fixed community mirror to accomodate for
23.4 and 23.10 for now as the bogons are the same anyway.
PR: https://forum.opnsense.org/index.php?topic=36886.0
Since pluginctl tells us which plugins are hooking into the
configure facilities allow us to select the plugin directly
like so:
# pluginctl vpn:wireguard
We use the delimiter ":" here as the configure already uses
it in the function end and it's unlikely used in a file name.
Both plugins_configure() and plugctl have no room to stuff
an optional argument somewhere, but the good thing is pluginctl
does not even need support for this and the PHP code could
use it too.
Make sure nobody gets the idea to do path traversal so strip
all "." and "/" characters.
Our current default (legacy) scenario is to use the configured interface addresss as gateway and primary dns, but since we don't want to complicate the templates and make the choice explicit, we're adding an option to auto-collect and persist on configuration save/apply.
This commit auto updates selected option data fields on request with the first matching address for the requested subnet found in ifconfig.
This commit moves the default logic into the model so we can reflect current values into virtual fields.
For all relevant "dpinger" fields, we reflect the current value in a field named current_$field, which means we can always query the active value without touching the stored one. Determination of current is as easy as `!empty(model_value) ? model_value : default`.
Refactor the dpinger process to use the current_ fields, since "dpinger_status()" retrieves all instances including the ones not stored, safeguard the config properties to exclude status determination (as loss and latency fields don't exist).
Previously the validation messages seemed to miss some gettext(), re-add these as well and cleanup validation. By calling isFieldChanged() on the array type, we know the gateway object has changed, but not exactly which field, this might lead to some noise, but if we implement a fix for https://github.com/opnsense/core/issues/6978 , we should be able to avoid real issues with the bonus of needing less code.
The calculateCurrent() on the GatewayField ensures we can insert/update the current values after an update as these are nog aware of modifications automatically.
Finally, respect the 120 character screen limit.