17638 Commits

Author SHA1 Message Date
Franco Fichtner
4cbbd92eb3 src: style issue 2024-12-12 17:36:46 +01:00
Monviech
d91838ce11
UI: Improved links with automatic edit and/or search (#8115)
Fixes: #7895

- Introduces a generalized function to handle "search" and "edit" in url hashes.
- Can handle changing a tab before firing a search and/or edit.

---------

Co-authored-by: Stephan de Wit <stephan.de.wit@deciso.com>
2024-12-12 16:32:08 +01:00
Stephan de Wit
16ee2b629e system: adjust UI for persistent notification banner
Since legacy pages each define 'page-content-main', including it
in fbegin.inc is not an option anymore. Manually setting the background
to match the current one also introduces issues for themese so
instead inject it dynamically and let it inherit the background
color
2024-12-12 14:08:51 +01:00
Franco Fichtner
7d87c3b2e0 src: style sweep 2024-12-12 11:57:30 +01:00
Stephan de Wit
6f5bd00252 src: fix plist 2024-12-12 11:22:07 +01:00
Stephan de Wit
1fc5a6335e system: refactor system status mechanism, introduce persistent notifications
Also introduces better sorting with a separate priority value as well
as a refactored frontend. Includes some fixes for missing translations
as well.

To test a banner such as "the system is booting":

flock -n -o /var/run/booting cat
2024-12-12 11:20:43 +01:00
Franco Fichtner
761c364743 src: style sweep 2024-12-12 08:21:22 +01:00
Ad Schellevis
70e7695b3d model:BaseListField - memory preservation fix, closes https://github.com/opnsense/core/issues/8123
remove overhead in BaseListField by passing references to the data with a CallbackValidator.
2024-12-11 22:22:40 +01:00
Ad Schellevis
5b8f903e53 fix php warning: Undefined array key "XXX" in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/SNatRule.php on line 95 2024-12-11 20:55:14 +01:00
Ad Schellevis
002b450c40 cleanup - fix some php notices, closes https://github.com/opnsense/core/issues/8125 2024-12-11 16:15:31 +01:00
Ad Schellevis
be8841d9af util:legacy - ignore plugins_interfaces() errors in write_config() when called without sufficient imports (missing libraries in registered plugins).
Scripts like https://github.com/opnsense/core/blob/master/src/etc/rc.expireaccounts will die horribly at the moment when there's actual work to be done (although this example should likely be rmeoved for 25.1 anyway)
2024-12-11 15:54:02 +01:00
Franco Fichtner
988dbae92d interfaces: reload GUI in the background
Take our chances with SSH.  It looks like using 'early'
facility surfaced this problem that was not as trigger
happy before.  The administration page does the same.

PR: https://forum.opnsense.org/index.php?topic=43995.0
2024-12-10 13:58:29 +01:00
Ad Schellevis
2f3a012267 System: Trust: Certificates - show multiple altname entries when supplied, closes https://github.com/opnsense/core/issues/8116 2024-12-10 13:54:33 +01:00
Franco Fichtner
7082c18d02 src: style and plist 2024-12-10 08:38:43 +01:00
Ad Schellevis
8b85c0fbda ui: official OPNsense dark theme, fix some hover and contrast issues 2024-12-09 16:56:18 +01:00
Stephan de Wit
7373985f3b dashboard: make this logic explicit for the select_multiple case 2024-12-09 11:53:28 +01:00
Stephan de Wit
b52055af0b dashboard: make sure widget options are set to the default if none of the options match 2024-12-09 11:37:31 +01:00
Stephan de Wit
ecfa01b2fa dashboard: traffic widget should persist interface identifiers 2024-12-09 11:11:48 +01:00
Franco Fichtner
d6812ec2a1 mvc: style sweep 2024-12-09 09:13:27 +01:00
Ad Schellevis
0dac1d6201 Firewall: Rules - allow multiple options in source/destination address fields.
o merge src+srcmask, dst+dstmask into a single field
o remove current clunky input and re-use the same javascript hooks as in MVC
o re-use OPNsense\Firewall\Api\FilterController to list available options
2024-12-08 18:42:15 +01:00
Franco Fichtner
918ba63bb5 system: fix snapshot ACL; closes #8111 2024-12-06 21:55:48 +01:00
Ad Schellevis
1293c51187 Firewall: Automation: Filter - offer "multi-select" on source and destination addresses.
When selecting multiple source or targets, a cartesian product is created for all combinations (one defined rule turns into multiple actual rules).
In order to make this possible, we needed to refactor the base rule parsing. our generic `reader()` multiplies rules, which it already did for interfaces and ipprotocol.
When feeding lists to `pf(4)` a similar action would be performed.

The `convertAddress()` method has been renamed to `legacyMoveAddressFields()` as it now only remaps field structures into flattened fields, without validating their contents.
This is needed so we can split source/destinations without caring about their validity (yet), `mapAddressInfo()` is added next which contains the same logic as previously in `convertAddress()` but executed after splitting the fields.

The "Automation" module is more or less a reference implementation to show how the backend handles these now, 22fd0bf8763e14a5e1e7694853af0893dae585b7 is required for this to work.

All changes should be backwards compatible, but deliver a slightly different ruleset in some cases (when multiple entries are already used), e.g. the rule below would be split into two on our end now:

397a3dcdce/src/etc/inc/filter.lib.inc (L231-L237)

`pfctl -sr` already showed two before our change.
2024-12-05 15:42:22 +01:00
Ad Schellevis
4789c2a752 ui: initial plumbing to support multiple source/destinations in network alias fields.
o remove Multiple constraint from NetworkAliasField
o add "multiple" option in replaceInputWithSelector to convert selector into a multi-select
2024-12-05 15:42:22 +01:00
Monviech
397a3dcdce
dashboard: Add certificate widget that displays CAs and Certs sorted by expiration date (#8105)
* dashboard: Add certificate widget that displays CAs and Certs sorted by expiration date

* dashboard: Certificate widget, fix certificate hiding configuration, refresh immediately on config change, increase tick timeout

* dashboard: Certificate widget, different text for expired certificates

* dashboard: Certificate widget, create links that fill the search-field of the bootgrid to display the certificate directly

* dashboard: Certificate widget, search for uuid in bootgrid and call corresponding form
2024-12-05 11:31:39 +01:00
Franco Fichtner
f4b9017cd9 unbound: make this workaround permanent
This bundle file is here for general consumption and the time it
has already taken to debug this issue is not justifiable for
pursuing the matter any further.  Other approaches regarding
chroot and directory sharing are likely going to be much more
code which would make another solution more fragile as well.

While here remove a strange directory in the chroot that is not
even used.
2024-12-04 14:44:58 +01:00
Franco Fichtner
dbeed6fb7e firmware: extend this a little to run latest vs. current test
PR: https://forum.opnsense.org/index.php?topic=44438.0
2024-12-04 09:24:56 +01:00
Ad Schellevis
d55e2c55ef ui: official OPNsense dark theme, minor spacing changes (top heading / login) 2024-12-04 08:57:28 +01:00
Ad Schellevis
f271c6a3fc system: fix TOTP regression when used with LDAP, although https://github.com/opnsense/core/commit/ae97263e was the right fix, it assumes other children also implement _authenticate() 2024-12-03 21:45:29 +01:00
Franco Fichtner
419491f4c5 src: style sweep 2024-12-03 20:42:25 +01:00
Ad Schellevis
607e32a55e ui: add official OPNsense dark theme 2024-12-03 16:53:35 +01:00
Franco Fichtner
cdb8da7266 unbound: erm, point to a bundle as it will not handle /etc/ssl/certs ?
PR: https://forum.opnsense.org/index.php?topic=44414.0
2024-12-03 15:39:35 +01:00
Franco Fichtner
f06d347ae2 firmware: change this for symmetry 2024-12-03 08:39:12 +01:00
Ad Schellevis
d6c4eb255c themes/opnsense - login form button alignment and border color 2024-12-02 17:23:55 +01:00
Ad Schellevis
c7b0039233 themes/opnsense - add fa-solid when fa is used to support both. 2024-12-02 17:00:50 +01:00
Ad Schellevis
8a32434b4e ui: use fontawesome icons in bootgrid (https://github.com/opnsense/core/issues/8101) 2024-12-02 16:56:15 +01:00
Ad Schellevis
622e03ffc0 themes/opnsense - update default brand style (login form) 2024-12-02 16:16:58 +01:00
Ad Schellevis
c49a6f192a Firewall: Log Files: Live View - fix "new" template icon and replace with fa while there. 2024-12-02 15:10:41 +01:00
Franco Fichtner
1dcec96bcb mvc: fix hint display for "0"
This also displays empty hint "" but given the fact the
user supplied it we're not going to argue about it.
2024-12-02 15:08:30 +01:00
Franco Fichtner
cc97dd579c firwall: move icon, it's not as bad anymore 2024-12-02 12:08:16 +01:00
Franco Fichtner
fdac52231b mvc: style change 2024-12-02 11:57:12 +01:00
Ad Schellevis
9d6e6e5c7c ui: upgrade fontawesome icons to version 6, closes https://github.com/opnsense/core/issues/8101
to ease maintenance, move all files into assets/fontawesome and swap css includes to new location.
2024-12-02 11:40:25 +01:00
Ad Schellevis
6229c964cd System: Access: Privileges - add a safety fence to prevent accidental lockout, closes https://github.com/opnsense/core/issues/8094 2024-12-02 10:39:08 +01:00
Ad Schellevis
b26bbd34dd Mvc/Router - normalize multiple leading slashes in paths, closes https://github.com/opnsense/core/issues/7709 2024-12-02 10:32:07 +01:00
Ad Schellevis
01fc795f34 themes/opnsense - update default brand style 2024-12-01 20:11:30 +01:00
Franco Fichtner
4208db6d5f firmware: make it a bit safer still 2024-11-30 11:34:56 +01:00
Franco Fichtner
e4d452b37b firmware: make output_cmd safter regarding arguments passed
As a side effect it removes the spurious quoting around most
static arguemnts that do not need to be vetted for safety
anyway (but still are if a mistake is made).

Some arguments are passed unquoted for one of the two reasons:

1. It's a global variable pointing to a binary or directory most
   likely, especially for first argument which is the command.
2. It's an argument that is set in the script, but may be empty
   when the command runs, i.e. '-f' option.
2024-11-29 14:54:13 +01:00
Franco Fichtner
ad663adec4 firmware: to parse arguments in oupput_(cmd|text) use -o for additional output 2024-11-29 14:03:55 +01:00
Ad Schellevis
c7aacf6b13 System/Tunables - use actual defaults when reverting. 2024-11-29 11:37:58 +01:00
Franco Fichtner
89c190cea2 src: style sweep 2024-11-29 10:04:29 +01:00
Ad Schellevis
e1894435a3 ui:theme - first batch of theme source cleanups.
ease maintenance in the future by cleanup up our stylesheets, most of our styes are already a decade old and might need some love for future improvements.
This commit removes some of the unused styles and moves color defines in main.scss to its own file, also a dashboard scss file is added to use the same colorscheme.
2024-11-28 22:33:04 +01:00