Add empty string as fallback for category color, and do not render the style in frontend if color is empty, that way fa-tag default style can be used here
Firewall: Categories - Prevent seperator char from being used in names, closes https://github.com/opnsense/core/issues/9845
Usually we would opt for a change in the consumer here, but since some pages (legacy and migrated legacy) use names instead of uuids, we can't fix this differently at the moment.
At the plus side, commas seem to be hardly used until now as this issue has existed for many years already.
I did look briefly in fixing getCategoryColors() to feed both color and labels, which works nicely for the newest pages, but can't be fixed for the just migrated DNAT page for example
(cherry picked from commit 06ecd4c9e221f781a92a98e84dd7b2ea0eb437fb)
UI: restore canvas state in health graph (#9827)
Fixed health graph bug on Firefox causing graph to shrink after hovering over it for an extended amount of time. The problem was caused by ctx.save() being called repeatedly during hovering. This caused a rendering degradation, because Firefox is stricter about canvas state stack growth. Added ctx.restore() so every save state gets restored and removed from the stack so the canvas doesn't accumulate state. Graph behaves properly on Chrome and Firefox now.
Fixes #9528
(cherry picked from commit b88621a3d86b79bd4f8ffc15782e15e15e1e700d)
Firewall: Categories - Prevent seperator char from being used in names, closes https://github.com/opnsense/core/issues/9845
Usually we would opt for a change in the consumer here, but since some pages (legacy and migrated legacy) use names instead of uuids, we can't fix this differently at the moment.
At the plus side, commas seem to be hardly used until now as this issue has existed for many years already.
I did look briefly in fixing getCategoryColors() to feed both color and labels, which works nicely for the newest pages, but can't be fixed for the just migrated DNAT page for example
VPN: OpenVPN: Instances - debounce learn-address calls so we limit the number of alias updates to a minimum.
When a lot of clients connect at the exact same time, it doesn't really make sense to keep calling the alias update procedure as logically we are only interested in the last one.
This change simply opens a file, keeps track of its modification stamp and if another updated it after us, assume that caller is responsible for making the magic happen.
Although there is a small downside to this (clients connecting constantly, nobody resposible for accounting), the gain is likely much bigger as it prevents these calls from floodin the system in all cases (saving a lot of load).
VPN: OpenVPN: Instances - debounce learn-address calls so we limit the number of alias updates to a minimum.
When a lot of clients connect at the exact same time, it doesn't really make sense to keep calling the alias update procedure as logically we are only interested in the last one.
This change simply opens a file, keeps track of its modification stamp and if another updated it after us, assume that caller is responsible for making the magic happen.
Although there is a small downside to this (clients connecting constantly, nobody resposible for accounting), the gain is likely much bigger as it prevents these calls from floodin the system in all cases (saving a lot of load).
mvc: BaseListField: shared implementation of $internalStaticOptionList, proof of concept for https://github.com/opnsense/core/issues/9816 (#9839)
Wrap static access in protected functions which ensures content is static per inherited class:
hasStaticOptions()
getStaticOptions()
setStaticOptions(array)
resetStaticOptions()
UI: restore canvas state in health graph (#9827)
Fixed health graph bug on Firefox causing graph to shrink after hovering over it for an extended amount of time. The problem was caused by ctx.save() being called repeatedly during hovering. This caused a rendering degradation, because Firefox is stricter about canvas state stack growth. Added ctx.restore() so every save state gets restored and removed from the stack so the canvas doesn't accumulate state. Graph behaves properly on Chrome and Firefox now.
Fixes #9528
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.