Commit Graph

4 Commits

Author SHA1 Message Date
James E. Blair a9688d6185 Use tenant-status endpoint to show the bell
We currently fetch all of the config errors in order to decide whether or
not to show the bell icon in the web ui (which indicates that there are
errors).  We recently added a tenant-status endpoint which returns a simple
error count instead of the entire data structure.  Use that to decide
whether to show the bell instead.

This builds on the previous change that fetches the config errors on-demand
rather than storing them in the redux store.  With that change and this
combined, we no longer need to store the errors in redux.  Instead we will
store the error count in redux so we only have to fetch it once when
switching tenants.

Change-Id: I3dfd911af9ba55dd55ca3649ee5ecf6edaa3581a
2023-11-28 09:47:14 -08:00
James E. Blair e429a90722 Load config errors less often
If we encounter network delays loading the config errors endpoint
(which is likely if it's large), then we can end up issuing multiple
outstanding GET requests for the same endpoint.  Avoid that by using
the isFetching pattern used by other members of the store.

Also, store the tenant name for the most recent fetch so that we
*can* have multiple outstanding requests for different tenants, but
we only accept the most recent one.

Change-Id: Ic49027e137b8c30004d43059db259d10c5443812
2023-09-22 07:05:09 -07:00
James E. Blair 9d2e1339ff Support authz for read-only web access
This updates the web UI to support the requirement for authn/z
for read-only access.

If authz is required for read access, we will automatically redirect.
If we return and still aren't authorized, we will display an
"Authorization required" page (rather than continuing and popping up
API error notifications).

The API methods are updated to send an authorization token whenever
one is present.

Change-Id: I31c13c943d05819b4122fcbcf2eaf41515c5b1d9
2022-10-25 20:22:42 -07:00
Tristan Cacqueray 76867ca14a web: break the reducers module into logical units
This change applies best practices to split the current reducers module
in logical unit. Each reducer and its actions are moved into different
modules to ease further refactor and follow-up tests.

Change-Id: I75cc41ca3d31a61046868aafbc84505de661a99d
2018-12-02 01:05:02 +00:00