To be added to stable version to make sure we're not causing
the crashing some people report on a reload.
One could avoid having it reload all the time but where is
the fun in that?
Since setBase/addBase need a field to message errors on, its likely better to throw an exception when not able to complete the request in full (and data may not be saved).
Usage examples include writing data in other fields not being offered by the gui (for example encode data base64) or autogenerated content as default, volatile model fields can be used to make sure the hook is able to process the non-persistent data (which can still be validated separately).
1. For a floating rule with a single interface group, the interface
count and tooltip did not show when viewed from an interface rules page.
2. For a floating rule with an interface group and at least one other
interface or interface group, the entire rule did not show when viewed
from an interface rules page for which the interface is contained in one
of the interface groups.
Example usage:
<serial type="IntegerField" volatile="true"/>
The advantage of this is one can ask the user for input, validate it when offered and report back when it's not valid.
Currently only ArrayField clones fields, but since we removed the constraint to support structures inside these types (5715d82a7f), deeper structures need to be cloned as well to prevent accessing the original (template) node in the clone.
* show dynamic interface properties when received. To prevent additional call overhead only parse the files ifctl leaves behind in /tmp/
(merge ipv4 and ipv6 properties into the same field as the address itself should be clear enough.)
* Since we rather keeo a single link type in the overview, fallback to ipv6 when ipv4 is not offered.
ref: https://forum.opnsense.org/index.php?topic=38223.msg191234
To use the upload, create a button offering a dialog title and endpoint like:
<button
id="upload"
type="button"
data-title="{{ lang._('Import') }}"
data-endpoint='/api/path/to/import_controller'
class="btn btn-xs"
><span class="fa fa-fw fa-table"></span></button>
and hook functionality using:
$("#upload").SimpleFileUploadDlg();
Adds a spurious gateway due to presence of <gateways><gateway_item/></gateways>
but it it also begs the question why we go into legacy mode when we only have
automatic gateways so none are stored in the MVC model, which is kind of a standard
case.
Since @swhite2 was asking to make a generalized pattern I played
with the layout a bit and ended up just moving the form below so
it actually holds more settings if it has. This way the base_form
could be extended to only show a subset of settings (like enable)
but also show the full set if more settings are coming in.
While here adjust the menu structure and remove the ordering of
the VPN types since they order naturally.