16761 Commits

Author SHA1 Message Date
Stephan de Wit
f075d2d3db dashboard: properly remove charts on widget close action 2024-05-15 13:23:02 +02:00
Franco Fichtner
83fc436065 src: a couple more style updates 2024-05-14 13:40:29 +02:00
Franco Fichtner
ba435bbe5a mvc: style 2024-05-14 13:24:58 +02:00
Franco Fichtner
e12a306b54 mvc: whitespace 2024-05-14 13:21:58 +02:00
Ad Schellevis
cf03557581 System: Gateways: Configuration - prevent out of memory on migrations 2024-05-14 11:52:55 +02:00
Franco Fichtner
6a0da2725a ipsec: fix faulty "-" usage in URIs 2024-05-14 09:12:32 +02:00
Franco Fichtner
7a3e55a863 mvc: more stype updates 2024-05-14 08:20:28 +02:00
Franco Fichtner
4f7ad06b76 tests: missing copyright header 2024-05-14 08:10:31 +02:00
Franco Fichtner
590dc5c9d2 mvc: style updates 2024-05-14 08:08:55 +02:00
Franco Fichtner
112edfa525 mvc: add missing copyright header 2024-05-14 08:04:39 +02:00
Franco Fichtner
93f8e74109 src: style updates 2024-05-14 08:02:30 +02:00
Franco Fichtner
bca7574fab mvc: fix undefined $e 2024-05-13 22:52:58 +02:00
Franco Fichtner
83e73c5825 src: style sweep 2024-05-13 22:48:11 +02:00
Ad Schellevis
cf7300e230 mvc - Response add setRawHeader for backwards compatibility (for https://github.com/opnsense/core/issues/6389) 2024-05-13 22:11:20 +02:00
Ad Schellevis
908d2840ea mvc/routing - fix case sensitivity issues (e.g. /ui/ipsec/connections not reachable). implements https://github.com/opnsense/core/commit/cad494cd80 combined with a quick check if the exact expected directory name does exist (which is the case for most of our namespaces).
cc @fichtner
2024-05-13 18:42:52 +02:00
Ad Schellevis
6a0e88e7e1 mvc/api - reorganize exception handling in api handler, make sure we only send headers when not already sent and move set_error_handler() ==> Exception into api.php 2024-05-13 18:26:43 +02:00
Ad Schellevis
ef9e377fde mvc/api - improve stream handling and prevent "headers already sent" errors from being thrown.
This commit moves the output handling from the action to the Response object for stream types, which also ensures headers are being sent in the right order.
2024-05-13 18:04:31 +02:00
Stephan de Wit
ae2b376885 dashboard: firewall: add popover to event label as well 2024-05-13 16:19:03 +02:00
Stephan de Wit
706f0ccd77 dashboard: firewall: display placeholder text if no data available yet 2024-05-13 15:59:10 +02:00
Stephan de Wit
fc13a9b34e dashboard: disk widget: be more consistent with labels 2024-05-13 15:06:17 +02:00
Stephan de Wit
189fb51496 dashboard: allow widgets to force a grid update 2024-05-13 14:49:14 +02:00
Franco Fichtner
588105433e dashboard: style sweep 2024-05-13 14:29:43 +02:00
Franco Fichtner
7077e7c182 mvc: fix routing default 2024-05-13 14:14:59 +02:00
Stephan de Wit
2785cb641f dashboard: add firewall widget, change BaseTableWidget accordingly
The BaseTableWidget now contains some more rudimentary options to update
existing rows and sort on a specific column index.

The firewall widget counts events live as they happen and populates a
table in a larger view, or a doughnut chart in a smaller view as
data comes in.
2024-05-13 12:08:40 +02:00
Franco Fichtner
0a45505611 mvc: a few more manual style updates, missing copyright and updates 2024-05-13 11:22:57 +02:00
Franco Fichtner
38dad806fb mvc: style sweep, plist 2024-05-13 10:42:29 +02:00
Ad Schellevis
0a239dd688 mvc - larger overhaul replacing Phalcon Application (https://github.com/opnsense/core/issues/6389)
This removes most phalcon code currently being used on our end, except the Volt templates (which are re-wrapped) and a translation class we can easily replace later in a separate commit.
Consumers of our controller classes shouldn't notice a difference as the used objects and methods are named the same.

The most notable changes are the following ones:

* Exceptions about not being able to find a requested path now break down into different exceptions inheriting from DispatchException, which makes it easier from the entrypoint (api.php, index.php) to catch and handle accordingly.
* When not in development mode, raw exceptions are not being returned anymore, which increases security
* The Dispatcher class is reponsible for object construction and mapping validation (valid uri, but no object found)
* The Router class replaces previous Application class, it disects offered uri's into namespaces, classnames and methods to call.

In the long run there should be a seperate controller for controllers using volt templates or api calls, but as the existing ones don't distinct between this and the output handling is different now, we can park this for a later moment in time (the performance penalty should be rather low).

Some unused functionality has been removed, for example support for the  X-HTTP-Method-Override header in Request->getMethod() (see 44243c0765/phalcon/Http/Request.zep (L599-L609)).
2024-05-13 10:38:38 +02:00
Ad Schellevis
2e010a77de mvc-ui - rework paste behavior introduced in 388d99cf6f to make it less aggresive. for https://github.com/opnsense/core/issues/7456
To some degree I think always trimming the data isn't the issue, but not being able to paste at cursor position is impractical. this commit re-wires the paste action after trimming the clipboard data (in stead of overwriting the target field).
2024-05-13 09:48:01 +02:00
Ad Schellevis
d86142927e Lobby: Dashboard [new] - remove more spurious json_encode's cc @swhite2 2024-05-12 11:20:47 +02:00
Ad Schellevis
4bb594ba81 Lobby: Dashboard [new] - return data as array and let ApiMutableModelControllerBase->afterExecuteRoute() handle the conversion 2024-05-11 18:43:13 +02:00
Ad Schellevis
1738224fca core/xmlrpc - add google drive as migration / backup target.
The primary use for this is to restore these settings in System/Configuration/Backups now they share the same metadata.
2024-05-10 18:27:17 +02:00
Franco Fichtner
1c8677656e firmware: dump TLS infrmation for firmware server(s) in use
Will make it easier to identify proxy isses.
2024-05-08 12:29:35 +02:00
Franco Fichtner
80284fb281 interfaces: for consistency 2024-05-07 11:29:10 +02:00
Franco Fichtner
e37514e6f6
interfaces: tweak wording in interface gateway selection (#7445) 2024-05-07 11:17:31 +02:00
Ad Schellevis
1b4cb9f229 Services: Kea DHCP: Kea DHCPv4 - rename code to dhcp option. (https://github.com/opnsense/core/pull/7361) 2024-05-07 11:14:33 +02:00
Ad Schellevis
56b3a44d5f legacy/csrf - move csrf check code from d1962f8ed5 into legacy scope.
The original intend was to be able to reuse the Csrf class, but as this requires direct access to the session object, it's likely not a good idea for the goals of https://github.com/opnsense/core/issues/6389
Since the legacy pages need a lock on session anyway,  keeping it doesn't make a difference.
2024-05-07 11:08:55 +02:00
Franco Fichtner
24f36bf332 system: as a POC move this security setting to the automatic sysctls #7440
This might not work for all values as we would maybe like the have the
FreeBSD default itself to work its magic.  For security relevant things
bootstrapping the value is useful, but for buffer sizes it might not be.
2024-05-06 22:20:13 +02:00
Franco Fichtner
86778657ea interfaces: remove unused imports from sockstat list 2024-05-06 15:09:59 +02:00
Franco Fichtner
f978103395 backend: change docs for template helper 2024-05-06 15:05:04 +02:00
Franco Fichtner
e5c4cb0ce8 src: style sweep 2024-05-06 09:04:09 +02:00
Ad Schellevis
20a8006b67 mvc - replace Phalcon autoloader with simplified version of our own. for https://github.com/opnsense/core/issues/6389 2024-05-04 20:34:19 +02:00
Ad Schellevis
ab76fb03c9 mvc - cleanups for https://github.com/opnsense/core/issues/6389
* remove unused FactoryDefault() in tests
* refactor FactoryDefault() config access to new AppConfig class
* remove unused code in afterExecuteRoute() `$this->response->getHeaders()->get("Status")` will never be null
2024-05-04 20:26:40 +02:00
Ad Schellevis
3c17903ecb mvc-Backend: remove unused $timeout parameter in configdStream() and implement simulate_mode for testing purposes (ui_devtools) 2024-05-04 15:13:40 +02:00
Stephan de Wit
fdde2f9063 dashboard: add widget CSS grid implementation for tables with top headers 2024-05-03 17:09:49 +02:00
Simon Roberts
66c684b2c6
fix typo in message about "outboud nat rule" (#7429)
* fix typo in message about "outboud nat rule"

* Removed unused $unqiue_addrs (with typo)

* Restore and fix typo $unique_addrs
2024-05-03 10:19:00 +02:00
Stephan de Wit
a36b700ec5 system: regression in 7f6f55814f, wrong parameter for configd action 2024-05-03 08:37:06 +02:00
Franco Fichtner
886ee0623b system: disable userspace core dumps by default
Was suggested by @lattera on 93e0d1474.
2024-05-02 19:05:16 +02:00
Ad Schellevis
94263becc7 config: cleanup non existing load_balancer section. 2024-05-02 15:52:06 +02:00
Franco Fichtner
c9012301fe src: style sweep 2024-05-02 08:00:05 +02:00
Franco Fichtner
eea9c5c58e system: adjust log levels in google drive backup; closes #7427 2024-05-02 07:58:27 +02:00