16372 Commits

Author SHA1 Message Date
Ad Schellevis
a7a99fcdfe mvc: implement reusable grid template using form definitions. for https://github.com/opnsense/core/issues/8187
Although this might not be the final version, it adds the relevant metadata to the form definitions and offers a very simple template which can be used as a partial().

Example input field:

    <field>
        <id>sysctl.tunable</id>
        <label>Tunable</label>
        <type>text</type>
        <grid_view>
            <sequence>1</sequence>
        </grid_view>
    </field>

grid_view entries contain a sequence which may overwrite the default order and can overwrite any data-* attribute available, e.g. <sortable>false</sortable> would remove the sortable option from the field.
2025-01-07 17:16:38 +01:00
Ad Schellevis
970977f5bf ui:themes - unhide mobile menu button (navbar-toggle) 2025-01-07 13:37:36 +01:00
Ad Schellevis
bff8cf2be8 mvc: move Volt template from Mvc\Controller to Base\ControllerBase which is only used for ui pages. [2]
fix a comment
2025-01-07 13:00:40 +01:00
Franco Fichtner
2e4b522c3f src: style sweep 2025-01-07 12:56:54 +01:00
Ad Schellevis
a1e8429ace System: Trust: Certificates - hide "Alternative Names" for CSRs, for https://github.com/opnsense/core/issues/8190 2025-01-07 11:50:27 +01:00
Ad Schellevis
88d4203976 mvc: move Volt template from Mvc\Controller to Base\ControllerBase which is only used for ui pages. 2025-01-07 11:43:56 +01:00
Ad Schellevis
9723717fbd System: Configuration: History - add classes to diff content so theme's can overwrite colors. 2025-01-07 10:11:11 +01:00
Ad Schellevis
094804f1f0 ui: official OPNsense dark theme, make default diff font color white in System: Configuration: History 2025-01-07 10:08:29 +01:00
Franco Fichtner
c20a9ae2d5 system: remove spurious backup() so we only back up once 2025-01-07 09:11:31 +01:00
Ad Schellevis
9d592be68a System: Settings: Tunables - typo in description fieldname, ref https://github.com/opnsense/core/issues/7249 2025-01-07 08:51:21 +01:00
Franco Fichtner
75b03b4b38 mvc: description can be empty too 2025-01-07 08:29:35 +01:00
Franco Fichtner
2fef2a80b0 src: style sweep 2025-01-07 08:20:25 +01:00
Ad Schellevis
a6b0827716 mvc: extract grid field data from form definition file, for https://github.com/opnsense/core/issues/8187
Perform some small cleanups in ControllerBase and add method to extract grid fields, sample config data:

     <field>
         <id>sysctl.value</id>
         <label>Value</label>
         <type>text</type>
         <grid_view>
             <sequence>2</sequence>
         </grid_view>
     </field>

Which results in the following output:

        (
            [sequence] => 2
            [visible] => false
            [ignore] => false
            [sortable] => false
            [width] =>
            [label] => Value
            [id] => sysctl.value
            [type] => text
            [fieldname] => value
        )
2025-01-06 21:46:08 +01:00
Nikita Uvarov
4c8fee08f7
monit: wrap exec in double quotes to allow arguments (#8085) 2025-01-06 15:34:55 +01:00
Ad Schellevis
77a6b14ce6 Services: Kea DHCP: Kea DHCPv4 - add 'match-client-id' in subnet definitions, closes https://github.com/opnsense/core/issues/8183 2025-01-06 10:09:06 +01:00
Ad Schellevis
f72e066e4d Trust: add serialNumber and issuer in Store::parseX509(), requested in https://github.com/opnsense/core/issues/8141#issuecomment-2571771937
Since we map subjects, we should do the same when adding an issuer if it exists. serialNumber is just a plain simple field.
2025-01-06 09:44:57 +01:00
Ad Schellevis
e150a571de mvc:JsonKeyValueStoreField - restore support for json input data without configd callout, closes https://github.com/opnsense/core/issues/8180
partially reverts 525481c15b
2025-01-06 09:27:50 +01:00
Ben Smithurst
b962ccd3ed
dhcpd6 prefixes script can fail to restart (#8109)
* redirect sleep output to avoid it holding the pipe to daemon process open

* add comment explaining the sleep

* use daemon -m0 parameter to prevent restart failures

This was changed from a simple redirect of the sleep command after
discussion with Franco on https://github.com/opnsense/core/pull/8109
2025-01-04 20:28:31 +01:00
Ad Schellevis
4836083503 Firewall: Aliases - minor code cleanup, use volatile fields in stead of generating fields in actionPostLoadingEvent(), less code and has the advantage of being able to inspect metadata for used fields. 2025-01-04 14:47:50 +01:00
Ad Schellevis
071925da51 System: Settings: Tunables - refactor to MVC, closes https://github.com/opnsense/core/issues/7249 2025-01-04 12:42:10 +01:00
Ad Schellevis
b694c81be2 mvc:model - add Default() method to reset a model to it's factory defaults, required for https://github.com/opnsense/core/issues/7249
Sometimes its practical to be able to reset model settings to their defaults, in which case it makes sense to have a simple handle on the base model to flush all for a specific model.
Although this is a "hammer" (unable to validate referential constraints on its own), there is practical use when trying to reset a component to its factory state.
If useful, we could add a factory reset handle to the ApiMutableModelControllerBase class at some point as well to facility a "flush" in a more generic way.
2025-01-04 11:39:53 +01:00
Ad Schellevis
af2730dd36 System: Settings: Tunables - refactor to MVC for https://github.com/opnsense/core/issues/7249 (work in progress) 2025-01-01 20:14:07 +01:00
Ad Schellevis
75144ff498 Firewall: Automation: Filter - add "Max new connections", closes https://github.com/opnsense/core/issues/8143 2025-01-01 17:59:09 +01:00
Ad Schellevis
23e20aab3c Firewall: Automation: Filter - add TOS/DSCP for https://github.com/opnsense/core/issues/8143 2025-01-01 14:48:11 +01:00
Ad Schellevis
c49af7824a Firewall: Automation: Filter - add schedules for https://github.com/opnsense/core/issues/8143 2025-01-01 14:38:33 +01:00
Ad Schellevis
37a32842fd System: Routes: Configuration - add support for rfc5549, missing implementation part for https://github.com/opnsense/core/issues/8157
When specifying different protocols for target network and gateway address, add protocol prefixes to both.
2024-12-30 16:03:59 +01:00
Ad Schellevis
52255d7e46 System: Routes: Configuration - add support for rfc5549, closes https://github.com/opnsense/core/issues/8157
This change lifts the constraint for matching protocols when the next hop is ipv6 and the route advertised is an ipv4 network.

While here, also cleanup the code a bit for readability and performance reasons.
2024-12-29 12:54:28 +01:00
Ad Schellevis
752795a229 Firewall: Automation: Filter - add tcpflags1,tcpflags2 for https://github.com/opnsense/core/issues/8143 2024-12-28 19:45:07 +01:00
Ad Schellevis
c1e44bcb65 Firewall: Automation: Filter - add match prio for https://github.com/opnsense/core/issues/8143 2024-12-28 19:06:44 +01:00
Ad Schellevis
92789c5278 Firewall: Automation: Filter - add tag, tagged for https://github.com/opnsense/core/issues/8143 2024-12-28 18:59:49 +01:00
Ad Schellevis
5eaa7fc19d Firewall: Automation: Filter - add set-prio[-low] for https://github.com/opnsense/core/issues/8143 2024-12-28 18:28:38 +01:00
Ad Schellevis
70b48230e1 Firewall: Automation: Filter - add Max source connections for https://github.com/opnsense/core/issues/8143 2024-12-28 18:00:07 +01:00
Ad Schellevis
b8e3015f53 mvc:javascript:SimpleFileUploadDlg() - load csv as text to prevent encoding isssues, closes https://github.com/opnsense/core/issues/8169 2024-12-27 15:10:57 +01:00
Ad Schellevis
bbfd1f3f8b Firewall: Automation: Filter - add adaptive timeouts for https://github.com/opnsense/core/issues/8143 2024-12-26 19:26:28 +01:00
Ad Schellevis
e6440cb867 Firewall: Automation: Filter - add allowopts for https://github.com/opnsense/core/issues/8143 2024-12-24 17:28:10 +01:00
Ad Schellevis
0d9550b912 Firewall: Automation: Filter - add max (states) option for https://github.com/opnsense/core/issues/8143 2024-12-24 17:17:28 +01:00
Ad Schellevis
207d51de55 Firewall: Automation: Filter - add max-src-nodes, max-src-states options for https://github.com/opnsense/core/issues/8143 2024-12-24 17:06:41 +01:00
Ad Schellevis
d07e3c620e Firewall: Automation: Filter - add 'statetimeout' and validations for https://github.com/opnsense/core/issues/8143
Although this component is mainly used for api access, experiment a bit further with the inpu dialog as well.
2024-12-24 16:49:02 +01:00
Ad Schellevis
3cbea52267 System: High Availability - XMLRPC Client / replace file_get_contents() with curl implementation, closes https://github.com/opnsense/core/issues/7561
While here, also offer optional peer tls verification as this is/was disabled by default.
In most cases verification isn't very relevant when using a direct attached neighbor, but if someone has infrastructure in between, extra safeguards are now possible.

With this inplace, allow_url_fopen can safely be disabled on our end (which was the primary goal here).
2024-12-24 13:54:59 +01:00
Ad Schellevis
0bd12b5549 Firewall: Automation: Filter - add some fields for https://github.com/opnsense/core/issues/8143 2024-12-23 21:21:39 +01:00
Franco Fichtner
1e788857a5 system: reverse dependencies here too 2024-12-23 12:01:17 +01:00
Ad Schellevis
f16348457b System: High Availability: Status - warn about version mismatches, closes https://github.com/opnsense/core/issues/8152 2024-12-22 14:46:34 +01:00
Ad Schellevis
adecb9ddf1 auth/sync_user.php - change import order as noted in https://github.com/opnsense/core/pull/8156 2024-12-22 14:43:29 +01:00
Ad Schellevis
96a1145c3e System: Access: Users - add "system list shells" and hook to shell field, closes https://github.com/opnsense/core/issues/8155 2024-12-22 14:37:42 +01:00
Loganaden Velvindron
e0e7e0b638
Update ICANN Trust Anchor to include the new one which will be active in 2026 (#7852)
Signed-off-by: Jagveer Loky (jagveer@cyberstorm.mu)

Signed-off-by: Jagveer Loky (jagveer@cyberstorm.mu)
2024-12-21 09:25:29 +01:00
Stephan de Wit
909e945e7b System: Access: Users: add missing dashboard container 2024-12-20 11:38:30 +01:00
Ad Schellevis
514f87adb8 System: Access: Users - remove support for local passwords
Since https://github.com/opnsense/core/issues/998 we support our authenticators for all service types, for backward compatibility reasons we kept default unix authentication available, since this is hardly used anymore, after 8 years it's time to deprecate this option.
2024-12-19 12:59:54 +01:00
Franco Fichtner
6e9bcf7830 system: typo, end sentence 2024-12-19 12:41:56 +01:00
Franco Fichtner
44f5964921 src: style sweep 2024-12-19 12:13:40 +01:00
Ad Schellevis
7169b29e0b System: Access: Users - allow long usernames for non local users (without a shell account), for https://github.com/opnsense/core/issues/7904
With the new mvc code inplace, it's also a good idea to loosen the constraints for some accounts. One of the mail advantages is that we can now user email addresses as usernames for most services.
2024-12-19 12:07:30 +01:00