tests: PortField: test well-known values against system #9835
Obsolete services have been removed which makes them error out.
Not sure if worth migrating or making the whole thing more clever.
Two appear to have been renamed.
mvc: PortField: "wins" is known as "nameserver", sort list #9835
It makes sense to test all of these values in the unittest then
before this breaks during an OS update.
firewall: fix running into error using well known protocols with "-" in them #9835
The ordering is debatable. For now just make sure that we didn't miss the
chance to look up the original one and accept it as is.
log files: fix 'go to page' edge case and row count persistence/max
The log controller defines 5000 rows as the limit to prevent OOM
issues, however, since the front-end knows nothing about this,
setting the row count to "all" will only show the first
5000 result without a way to paginate, even if there are more
log entries. Logically, if the controller defines 5000 as a limit,
the view shouldn't allow "all" as a selection, so override it here.
Furthermore, row count "all" was a boolean, which broke the "go to page"
button. While "all" isn't allowed anymore now, we should check
if the value is a boolean regardless. Also, the grid wasn't
indexing on "rnum" properly, so the grid had no idea where to scroll
to once clicked.
mvc: BaseListField: shared implementation of $internalStaticOptionList, proof of concept for https://github.com/opnsense/core/issues/9816
Wrap static access in protected functions which ensures content is static per inherited class:
hasStaticOptions()
getStaticOptions()
setStaticOptions(array)
resetStaticOptions()
bootgrid: swap order of custom commands placement making sure they participate in command binding
(cherry picked from commit 5b3b163ce0d93d41fcb141807c6d76389178ad1b)
mvc: CertificateField: same as 870692c154f
It's time to create a ticket for generalisation because now
resetStaticOptionList() is declared in two places also hinting
at a shared functionality in BaseListField.
(cherry picked from commit 104d5f02f894be47b43e4403d3a0d4f84ab740f9)
mvc: CertificateField: same as 870692c154f
It's time to create a ticket for generalisation because now
resetStaticOptionList() is declared in two places also hinting
at a shared functionality in BaseListField.
Firewall: Aliases - better focus selected alias updates to in crease performance when either --aliases or --types is used.
(cherry picked from commit df17f3ce819c498bec819e1d8d9ed63e2cb84f60)
config: add config_write_array() magic
With this we can insert new entries without the need to grab the entry
beforehand using config_read_array().
config_write_array('foo', 'bar', 'hello');
becomes
<foo>
<bar>hello</bar>
</foo>
(cherry picked from commit 8e8a70713065b0c9e82115c25c8b65b9d767ea2c)