Commit Graph

24 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 fa590a9f50 Add semaphore support to web UI
This updates the OpenAPI docs to include the semaphores endpoint,
and adds a Semaphores tab to the web UI to show information about
semaphores within a tenant.

Change-Id: If78b27131ac76aff93c47a986fce6eae3e068668
2022-09-21 06:50:12 -07:00
James E. Blair 2111c7cf96 Add freeze job to web UI
This adds a freeze-job page to the web UI.  It can be navigated to
by clicking a job in a job graph.

Change-Id: Ibd07449314a9454295bc97f8d654347f09dc504c
2022-08-02 08:03:31 -07:00
James E. Blair 97376adc21 Add job graph support to web UI
This adds the ability to display the frozen job graph for a project.

It adds a toolbar to the Project page that allows a user to enter
a pipeline and branch.  Hit the button and it will use the API
to freeze the job graph and then display it with graphviz (there
is a webassembly build of the graphviz libray).

Change-Id: Ieb5899a63a4c85eb5d445fa69dd1e85ddc11575d
2022-08-02 08:03:30 -07:00
Matthieu Huin 491cf439fa Web UI: add Autoholds, Autohold page
A user can list active autoholds for a given tenant. If the user is a
tenant admin, she can also discard a autohold request from the autoholds
page.
Add a autohold page holding information about a single autohold request,
in particular links to held builds if any.

Change-Id: I4f5f2cfdf8e46ce8fb7ac69e330d6e51bd8b19fe
2021-11-18 16:41:23 +00:00
Matthieu Huin c82619174c web UI: allow a privileged user to re-enqueue a change
Add a "re-enqueue" action command on a Buildset page, displayed only
if the currently logged in user is an admin on the tenant. By
clicking this command, the user can re-enqueue the change with
the same parameters as the buildset.

Redux: turned the API error notifications into a more generic
notification system, that can now include success notifications.

Change-Id: I05b6b3deb912b121df8de207944d9ec26e7c92d1
2021-11-18 16:40:47 +00:00
Matthieu Huin b13ff51dda web UI: user login with OpenID Connect
Under the hood, this uses AuthProvider as supplied by oidc-react.
Most of the theory is explained in the comment in ZuulAuthProvider.jsx

The benefit of doing this is that we allow the AuthProvider and
userManager to handle the callback logic, so we don't need to
handle the callback logic ourselves.  A callback page is still required
though in order to deal with the parameters passed in a successful
redirection from the Identity Provider.

The challenge in using these classes as-is is that our authority
endpoints (eg, the IDP itself) may change from one tenant to
the next; these classes aren't set up for that.  So we need to be
careful about how and when we change those authority URLs.

In terms of functionalities: if the default realm's authentication driver
is set to "OpenIDConnect", display a "Sign in" button. If the the user
is logged in, redirect to the last page visited prior to logging in;
fetch user authorizations and add them to the redux store; display the
user's preferred username in the upper right corner. Clicking on the
user icon in the right corner displays a modal with user information
such as the user's zuul-client configuration, and a sign out button.

Clicking on the sign out button removes user information from the
store (note that it does not log the user out from the Identity Provider).

Add some basic documentation explaining how to configure Zuul with
Google's authentication, and with a Keycloak server.

(This squashes https://review.opendev.org/c/zuul/zuul/+/816208 into
https://review.opendev.org/c/zuul/zuul/+/734082 )

Co-authored-by: James E. Blair <jim@acmegating.com>

Change-Id: I31e71f2795f3f7c4253d0d5b8ed309bfd7d4f98e
2021-11-18 16:39:17 +01:00
Felix Edel 495418c350 UI: Add actions and reducers to retrieve components
This implements the necessay async functions to retrieve the components
from the new /components API endpoint.

Change-Id: I709467f4a23b0082e8362e69aaa84421a7ac7c36
2021-10-20 17:17:02 +02:00
Sorin Sbarnea 1ecbe58474 Add user preferences dialog
In order to avoid cluttering Zuul UI with user preferences in various
places, we introduce a simple config dialog.

This moves "auto reload" option to the preferences panel.

Change-Id: I7201d9e021c99f8e5a936dc98efe3c9d563fbcbc
Co-Authored-By: James E. Blair <jeblair@redhat.com>
2020-07-30 13:51:09 +01:00
Andy Ladjadj 86eba8b05d Add new timezone selector in web interface
- the default value keep UTC
 - the timezone is saved in cookie in zuul_timezone_string
 - the render format is YYYY-MM-DD HH:mm:ss

Change-Id: Ib4ac2af4194ac2722c5574577661f4ddda8cc398
2020-05-20 16:54:54 -05:00
James E. Blair 8fdc387c83 Add log browsing to build page
This looks for a zuul_manifest artifact, and if it is present,
it fetches it and shows a tree view of logs.  Text logs are
displayed in-app with some basic line anchoring.

Part of the implementation of
https://zuul-ci.org/docs/zuul/developer/specs/logs.html

es6 added to .eslint to allow use of Promise.

Change-Id: Ib04d013b4118005ba66a91d2bec0b0c429d12863
2019-07-24 09:25:13 -07:00
Tristan Cacqueray 85616c4c09 web: add OpenAPI documentation
This change adds a swagger description of the REST API. The description is
rendered in the sphinx user documentations and in the web interface.

Change-Id: I753524f40a09874dab5952f14ab17025525bbab9
2019-06-12 22:35:13 +02:00
Tristan Cacqueray 342c29c994 web: refactor build page to use a reducer
This change updates the build page component to dispatch reducer
action instead of direct axios call. This enables using the generic
error reducers as well as keeping the builds in the store to avoid
repeated query.

Change-Id: I705514e5fa32ec2d81a5b0ca9c5ebb7d8ac6ac2a
2018-12-14 08:33:48 +00:00
Tristan Cacqueray d061c33415 web: refactor nodes page to use a reducer
This change updates the nodes page to dispatch reducer action instead
of direct axios call. This enables using the generic error reducers as
well as keeping the nodes in the store to avoid repeated query.

Change-Id: I452c2ea50ae036ba059c18a4973914d100f2a07f
2018-12-14 08:33:48 +00:00
Tristan Cacqueray 4b32dda707 web: refactor labels page to use a reducer
This change updates the labels page to dispatch reducer action instead
of direct axios call. This enables using the generic error reducers as
well as keeping the tenant labels in the store to avoid repeated query.

Change-Id: I6f8d63a710155b9df3abe3cdbd1271f7b3e02ac2
2018-12-14 08:33:48 +00:00
Tristan Cacqueray f4b774957f web: refactor job page to use a reducer
This change updates the project page component to dispatch reducer
action instead of direct axios call. This enables using the generic
error reducers as well as keeping the tenant projects in the store to
avoid repeated query.

Change-Id: Ib91e0f338fd87c57534a90d7168f0dab98f2df62
2018-12-14 08:33:48 +00:00
Tristan Cacqueray 753d79c13a web: refactor projects page to use a reducer
This change updates the projects page to dispatch reducer action
instead of direct axios call. This enables using the generic
error reducers  as well as keeping the jobs list in the store to
avoid repeated query.

Change-Id: Ie9d5694649df515388f2f5e606887451ccdcf769
2018-12-14 05:36:22 +00:00
Tristan Cacqueray e5da1e1149 web: refactor change page to use a reducer
This change updates the change page component to dispatch reducer
action instead of direct axios call. This enables using the generic
error reducers.

Change-Id: If5fedff89e55eddfd08ea224c0124f3b2f9255c4
2018-12-14 05:36:21 +00:00
Tristan Cacqueray ac4a293207 web: refactor tenants page to use a reducer
This change updates the tenants page component to dispatch reducer
action instead of direct axios call. This enables using the generic
error reducers as well as keeping the tenants list in the store to
avoid repeated query.

Change-Id: Ie1e16ce417f4ba6785b2f9efceddd2004e2203b0
2018-12-06 08:06:06 +00:00
Tristan Cacqueray 51e5259477 web: refactor job page to use a reducer
This change updates the job page component to dispatch reducer
action instead of direct axios call. This enables using the generic
error reducers as well as keeping the tenant jobs in the store to
avoid repeated query.

Change-Id: I142493c3a89379a75d97d247fbe1fcc0858e9723
2018-12-06 07:42:32 +00:00
Tristan Cacqueray 839fe0cceb web: refactor jobs page to use a reducer
This change updates the jobs page component to dispatch reducer
action instead of direct axios call. This enables using the generic
error reducers as well as keeping the jobs list in the store to
avoid repeated query. This change also refactor the Job list into
a container and extends the common refresh component.

Change-Id: I7f44e83d6bea8ee915c81d7ba9afd6d9a4c89d38
2018-12-06 07:21:37 +00:00
Tristan Cacqueray 833dbd257b web: refactor status page to use a reducer
This change updates the status page component to use a fetchStatusAction
instead of direct axios call. This enables using the generic error reducers.
This change also refactors the refresh button into a parent component to
enable re-use on the other pages.

Change-Id: Iac8a317263f84f14f28d2ea015f918268b903407
2018-12-02 09:55:37 +00:00
Tristan Cacqueray f312f68ec6 web: add error reducer and info toast notification
This change adds a new error reducer to manage error from API calls.
The info actions retries failed info request after 5 seconds.

Change-Id: Ieb2b66a2847650788d9bf68080ab208855941f24
2018-12-02 05:56:38 +00: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