91 Commits

Author SHA1 Message Date
Ad Schellevis
484753b2ab Lobby: Dashboard - fix data cleansing issue in column_count and sequences. 2023-09-19 19:46:28 +02:00
Franco Fichtner
dad04cac72 system: show booting banner on dashboard; closes #6108 2022-10-27 16:34:06 +02:00
Franco Fichtner
af9e9b48b7 system: wrap $g handling into a singleton
Adds a bit of code on the initialization but allows to trace the
information without magic globals.

Has been on the wishlist forever, but nowadays it's simple enough
to replace the few instances using it.
2022-09-27 11:07:49 +02:00
Franco Fichtner
cc6a7947fe system: cleanup 2022-08-12 13:18:49 +02:00
Stephan de Wit
f8650c76aa
System Status: replace old notices system with a global one (#5875)
* MVC / System status: first draft for backend implementation

* fix copyright

* fix permissions

* MVC / System Status: modify backend implementation and setup front-end

* MVC / System Status: minor cleanup, ACL check and fix reporting in production mode

* MVC / System Status: copy status sytem to legacy as well, remove the notices system, finish up front-end work

* MVC / System Status: remove useless constructor

* fix plist

* System Status: shorten previous

* System Status: add ACL check

* System Status: also remove legacy part

* System Status: also clean up on legacy page

* System Status: ACL check on dismiss action as well

* System Status: add readonly privilege check to dismiss action

* System Status: do not trust input

* System Status: address security concerns

* add default return

* System Status: move js code to separate script and make sure a logLocation is always provided

* System Status: clean up callout in both legacy page and volt template

After dismissing a message and closing the dialog, the old message was still bound to the dialog instance. re-registering the onclick callback solves this.

* System Status: adjust log location and kick off status system on alias errors

* System Status: let's hold off on throwing notifications for aliases for now

* System Status: add ACL entry for the dismiss API call, adjust to new deployment situation

Without the ACL entry, /api/core/system/dismissStatus calls are rejected for non-root users even when they should have rights to dismiss.

Also do a minor consistency improvement and also adjust to the new situation of production & development deployment types. We need to account for the possibility of 'deployment' being empty in the configuration, therefore a direct check of the 'development' type seems most fitting as this is unlikely to change or be subjected to any additions.

* System Status: also error out when unable to write new rules

* System Status: account for users without permissions

* System Status: name collision in FirmwareController

* System Status: replace old notices system with a global one (https://github.com/opnsense/core/pull/5875)

Review feedback / modifications in this commit:

o filter.inc

-- remove wedged message, when locked during parallel reloads it likely doesn't help to disable/enable
-- flush message to error trigger file

o SystemStatus.php
-- str_contains --> strpos; eases testing on OPNsense 22.1.x as str_contains is php 8 only

o Status collectors
-- simplify logic and propagate messages received from status file

o CrashReporterStatus
- the existence of a /tmp/PHP_errors.log  file should be enough to know some process signaled the crash reporter
- remove shell exec

o FirewallStatus
-- as only /tmp/rules.error remains, remove loop to read for non existing files

o opnsense_status.js
-- add opn-status-group class to container and point css modifications in that single direction to prevent other objects from being affected by our status popup modifications
-- windows file endings replaced (^M)

o css:
keep menu_messages container to ease migration for theme developers

NOTE : ** get_crash_report() could likely be simplified as well

* filter: change to mwexec, redirection is implied

* System Status: handle potential undefined array key

seems to be a one-off error: Exception: Error at /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/SystemController.php:90 - Undefined array key 0 (errno=2) in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php:159

Co-authored-by: Ad Schellevis <ad@opnsense.org>
2022-07-28 09:50:06 +02:00
kulikov-a
3274620a83
traffic_graphs.widget: start when widgets is visible (#4801) 2021-03-11 15:35:08 +01:00
Franco Fichtner
9dce54991b system: small tweaks for #4795 2021-03-10 19:38:42 +01:00
Ad Schellevis
45199e3452 Bugfix dashboard widget headers, partly revert and explain f67e242eaa. closes https://github.com/opnsense/core/issues/4795 2021-03-10 14:18:45 +01:00
kulikov-a
405395264f
index.php: strip scripts from widgets before move (#4752) 2021-03-08 19:45:00 +01:00
Franco Fichtner
f67e242eaa www: fix $$ weirdness loosely related to typo in #4702 2021-02-24 16:23:02 +01:00
Ad Schellevis
a373d411f6 wizard: minor style fix, better logo contrast in index.php?wizard_done= (new logo on white background ) 2019-07-14 19:37:53 +02:00
Franco Fichtner
aa9c83571f dashboard: use cache_safe() for last unprotected logo instance
Placement is debatable here, but for the sake of consistency
do it like all the other spots already do.  It's cool.
2019-05-14 08:52:55 +02:00
Franco Fichtner
f0495cdedc system: only show crash reports to admins
We could check admin or page access rights, but in the end we just
want to avoid showing a banner that links to a page that is not
accessible in 99% of the cases if specific dashboard access was
granted.
2019-05-11 10:40:23 +02:00
Franco Fichtner
8bc683d295 system: typo in previous 2019-04-09 08:19:14 +02:00
Franco Fichtner
cedd87763b dashboard: only accept post from dashboard
Login form resubmit would not login but rather post to dashboard
which leaves all settings empty.

PR: https://forum.opnsense.org/index.php?topic=12328.0
2019-04-09 08:11:46 +02:00
Michael Steenbeek
97645093c3 Fix missing semicolons 2019-01-11 16:44:23 +01:00
Franco Fichtner
446c68157f wizard: hint at updates; closes #3056 2018-12-30 11:03:10 +00:00
Michael Steenbeek
71774ab376 Fix implicit Javascript global variable assignments (#2945) 2018-12-03 13:17:02 +01:00
Franco Fichtner
27b3ba0441 src: additional cache_safe() usage 2018-09-16 11:36:29 +02:00
Ad Schellevis
186836af29 dashboard, widgets and selectpicker. our default selectpicker has a timing issue on the dashboard which makes it behaviour a bit wobbly, hook ours in after page load. see https://github.com/opnsense/core/pull/2649 2018-09-06 22:18:36 +02:00
Franco Fichtner
893e9cf0f4 dashboard: add a 6 columns option
5 doesn't work because bootstrap works on layouts based
on 12, so we can only have 1, 2, 3, 4, 6, 12...
2018-07-14 08:41:23 +00:00
Ad Schellevis
ee87e1a7a6 small wizard style cleanups, mentioned 553d16ee18 2018-05-06 13:52:57 +02:00
Ad Schellevis
c1f7d7725f theme, add svg support for legacy pages. for https://github.com/opnsense/core/issues/2379 2018-04-27 16:37:31 +02:00
Franco Fichtner
46861ae113 www: better layouting for fa switch on btn-xs 2018-03-04 17:53:06 +00:00
NOYB
83993afaf6 Widget Sort Handle - Be consistent with class naming convention (s/_/-/). 2018-01-28 12:27:12 +01:00
NOYB
68499b04c1 Widget Sort Handle - Delay and distance not needed now that the sort handle does not overlap the controls (title link and buttons). 2018-01-28 12:27:12 +01:00
NOYB
201c62d60c Widgets Controls on Touch Screen - Update (Chrome)
This works with both Android and Desktop Chrome (v63) as well as IE 11.
exception: there is apparently an incompatibility between Chrome and JQuery sortable.  So drag/drop sort doesn't work in Chrome.

This is a modification of the previous:
3f7ee41b53

Touch events not working with the widget controls (link, buttons, drag/drop sort).
Add distance, delay and touch-action css for the widget controls to work with touch screen input.

Widget controls not working correctly with touch screen input
https://github.com/opnsense/core/issues/2092
2018-01-27 12:03:11 +01:00
NOYB
6ef9a127ff HTML Compliance - Attribute "type" on Element <script>
Warning: The type attribute is unnecessary for JavaScript resources.

HTML5: Edition for Web Authors
http://www.w3.org/TR/2014/REC-html5-20141028/scripting-1.html
The default, which is used if the attribute is absent, is "text/javascript".

The Script element
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.
2018-01-22 19:13:34 +01:00
NOYB
3f7ee41b53 Widgets Controls on Touch Screen
Touch events not working with the widget controls (link, buttons, drag/drop sort).
Add distance, delay and touch-action css for the widget controls to work with touch screen input.

Widget controls not working correctly with touch screen input
https://github.com/opnsense/core/issues/2092
2018-01-17 07:54:31 +01:00
Franco Fichtner
c5d4002541 src: add Scott's e-mail everywhere 2017-08-05 20:57:29 +02:00
Franco Fichtner
b0aa1be38d www: more cleanups possible for #1733 2017-07-22 16:52:50 +02:00
Franco Fichtner
1f3458ecac wizard: tweak previous 2017-02-13 09:44:00 +01:00
Franco Fichtner
7b6ab76964 wizard: somewhat restyle and improve UX 2017-02-13 09:21:06 +01:00
Franco Fichtner
597adf4f4c wizard: more explicit redirects 2017-02-11 14:58:27 +01:00
Franco Fichtner
6801b20c06 src: use the opportunity to scrub supurious ";;" spots 2017-01-07 10:46:06 +01:00
Franco Fichtner
d3376f7f10 src: webConfigurator -> web GUI 2016-12-19 07:16:08 +01:00
Franco Fichtner
22928ac86a dashboard: url_safe() for #1168 2016-09-25 10:41:27 +02:00
Franco Fichtner
5120905f1c dashboard: advertise LiveCD mode and SSH choices 2016-09-23 09:40:43 +02:00
Franco Fichtner
5585e10967 src: strip gettext() from write_config(); closes #1158 2016-08-29 09:18:17 +02:00
Franco Fichtner
0cdad62a63 dashboard: fix crash report 2016-08-05 07:51:57 +02:00
Ad Schellevis
5076ad1918 dashboard, only unset when set 2016-07-02 19:53:56 +02:00
Franco Fichtner
d376cfdf5c dashboard: default to empty, allow empy save; closes #1048
We do have a config.xml default, and we don't need a second default
that pops up every time the old layout is cleared.  On top of that
the old layout could never be cleared again, so it only dealt with
an empty config.xml scenario which we don't have.
2016-07-02 09:44:57 +02:00
Franco Fichtner
51ad932cc1 src: remove a few spurious ini_set() calls 2016-06-21 20:15:55 +02:00
Ad Schellevis
eeca188147 (dashboard) on small screens, all widgets most move to force a repaint... 2016-05-27 14:10:00 +02:00
Ad Schellevis
a5952c4c6a style 2016-05-09 19:14:30 +02:00
Ad Schellevis
9fb121e21d (dashboard) move crashreport message up 2016-05-09 18:58:27 +02:00
Franco Fichtner
0c35dbebfa dashboard: minor fixes for consistency and style
Log widget has a problem with config section unhide.
2016-05-09 18:23:12 +02:00
Ad Schellevis
80d2d03900 (dashboard) remove javascript hook, set timeout, change widget load text 2016-05-09 18:07:33 +02:00
Ad Schellevis
3605792897 (dashboard) improve drag&drop and new widget dialog 2016-05-09 13:35:01 +02:00
Ad Schellevis
a8f5cf5087 (dashboard) remove some legacy files 2016-05-09 09:15:58 +02:00