opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.07k stars 700 forks source link

Dashboard: point index page to new dashboard #7529

Open swhite2 opened 1 week ago

swhite2 commented 1 week ago

PR to discuss the following points:

  1. How the ACLs for the new widgets should be structured. For now I've bulked them into the core ACL file and allowed configurability of each. Each widget ACL implies access to /api/core/dashboard/saveWidgets.
  2. Pointing the default page to the new dashboard. This PR has attempted backwards compatibility, but I may have missed things.

In this PR, the wizard prompt/completion remains in index.php with the unconditional include of authgui.inc providing access to all previous GET parameters. Redirection occurs through

header('Location: /ui/core/dashboard');
exit;

TODO: rm -rf /usr/core/src/www/widgets

AdSchellevis commented 1 week ago

Haven’t reviewed it yet, but the default landing page likely needs another default as well.

https://github.com/opnsense/core/blob/0487802a4b9255bd3084eaffc993ad30c050d9ff/src/www/authgui.inc#L204

https://github.com/opnsense/core/blob/34cafe3e9835cb48c41ad063d2aba2700e7f701a/src/opnsense/mvc/app/models/OPNsense/Core/ACL.php#L366