Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard: point index page to new dashboard #7529

Closed
wants to merge 7 commits into from
Closed

Conversation

swhite2
Copy link
Member

@swhite2 swhite2 commented Jun 14, 2024

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
  • TODO: match ACLs with current existing components e.g. firewall live log ACL implies dashboard firewall widget access as well.

@swhite2 swhite2 requested a review from fichtner June 14, 2024 14:24
@swhite2 swhite2 self-assigned this Jun 14, 2024
@AdSchellevis
Copy link
Member

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

$url = $acl->getLandingPage($_SESSION['Username']);

@AdSchellevis AdSchellevis self-requested a review June 14, 2024 15:54
@swhite2 swhite2 marked this pull request as ready for review July 1, 2024 13:01
@swhite2
Copy link
Member Author

swhite2 commented Jul 1, 2024

f74eaee matches ACLs from a user perspective based on what is logically allowed given the current ACL configuration:

The following widgets are allowed based on existing ACLs:

  • Announcements: api/core/dashboard/product_info_feed. Implies page-system-login-logout.
  • Interfaces: /api/interfaces/overview/interfacesInfo. Implies page-status-interfaces.
  • InterfaceStatistics: /api/interfaces/statistics/*. Implies page-status-trafficgraph.
  • Traffic: /api/diagnostics/traffic/*. Implies page-status-traffic-graph.
  • Firewall: /api/diagnostics/firewall/streamLog and /api/diagnostics/interface/getInterfaceNames. Implies page-diagnostics-logs-firewall-dynamic. NOTE: Added /api/diagnostics/firewall/streamLog to ACL.
  • CARP: /api/diagnostics/interface/get_vip_status. Implies page-status-carp.
  • Gateways: /api/routes/gateway/status. Added api/routes/gateway/status to page-system-gateways.
  • Monit: /api/monit/status/get/xml. Implies page-services-monit.
  • LiveLog: /api/diagnostics/log/core/*. Implies page-diagnostics-logs-system.
  • IPsecLeases: /api/ipsec/*. Implies page-status-ipsec-leases and page-vpn-ipsec-connections.
  • IPsecTunnels: /api/ipsec/*. Implies page-status-ipsec and page-vpn-ipsec-connections.

The following widgets get a separate ACL as they are the only consumers:

  • SystemInformation: api/core/system/systemInformation.
  • CPU: /api/diagnostics/cpu_usage/*.
  • Memory: /api/diagnostics/system/systemResources.
  • Disk: /api/diagnostics/system/systemDisk.
  • FirewallStates: /api/diagnostics/firewall/pf_states.
  • MBUF: /api/diagnostics/system/system_mbuf.
  • Swap: /api/diagnostics/system/system_swap.
  • ThermalSensors: /api/diagnostics/system/systemTemperature.

This commit also moves the functions developed for the widgets in /api/core/system/* to /api/diagnostics/system/* as the namespace is more logical.

temporary disable some ACL's to collect feedback about their usefulness
@AdSchellevis
Copy link
Member

I've temporary disabled the additional ACL's (1557a4c) as I'm unsure these bring anything to the table, when needed we can re-enable them easily or merge them into another one later on.

PR is merged in cff24b7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants