Services: Kea: DHCPv4/6: Add type system with validation and encoding for supported DHCP options (#9995)
* Services: Kea: DHCPv4/6: Add type system with validation and encoding for supported DHCP options
This adds a type framework using MAPS extracted from data inside the KEA documentation.
Most flat options have a validator and encoder added. Users are guided via validation messages which types are correct choices for each code selection.
Advanced options (structured, nested, encapsulated) do not have an own validator or encoder yet, they fall back to hex.
Unknown options that are valid in the IANA lists, but maybe not inside KEA yet, also fallback to hex.
The user can always bail out of the type system and always use hex instead for any option.
* CodeSource was missing, preventing match_code and code to be evaluated independently upon instantiation of the field type
* Clean up some failguards since if those conditions would be true I don't want to fail silently
* Turn encoding into a map so the code is easier readable, add missing uint length validation
* Do not hide this error silently
[33 lines not shown]
bootgrid: set visibility hidden for base_bootgrid_table
Since the structure is used to initialize the bootgrid, we shouldn't render
the original structure possibly causing a flash of content.
Services: Dnsmasq DNS & DHCP: Since client-id is a valid IPv4 reservation type as well, ensure the lease view handles it correctly (#10003)
Remove some of the heuristics with the adding lease button. We cannot assume what the user want, so just offer both mac and hwaddr for any add lease command. The dnsmasq GUI we built has no constraints regarding this, and the application below renders both if given since there is no logic constraint here either.
bootgrid: automatic grid height calculation (#10011)
Grids will now fill all available screen space (if the amount of data allows), minus a margin. The margin may also include a user-supplied element or selector, of which the dimensions are used to subtract the grid height to leave space for said element. By default this element is .grid-bottom-reserve, as on most pages the base_apply_button is used below the grid.
Remove some of the heuristics with the adding lease button. We cannot assume what the user want, so just offer both mac and hwaddr for any add lease command. The dnsmasq GUI we built has no constraints regarding this, and the application below renders both if given since there is no logic constraint here either.
Services: Dnsmasq DNS & DHCP: Since client-id is a valid IPv4 reservation type as well, ensure the lease view handles it correctly. The same is also true for MAC address as IPv6 reservation type.
dashboard: firewall: add semantic groups coloring option (#9907)
* firewall.js should keep coloring after reload, use sematic groups block = red
* fixes for review, hash simplification, color palette, action matching
* action is string, include interface, add default color
* Use color schema for chart colors, vary by shades
* fix blocks
* make color schema configurable for widet, defaults to contrast uses Classic10
* changed from select_multi to select, contrast mode matches the old behavior
* use options.colorscheme, fix color cycling bug
* Update src/opnsense/www/js/widgets/Firewall.js
[15 lines not shown]