Commit Graph

28 Commits

Author SHA1 Message Date
James E. Blair 25c948d2a0 Linger on auth_callback page until login is complete
Verifying the auth token and obtaining user metadata involves some
async HTTP requests in the background.  If we remove the auth callback
information from the window location too soon, then the UserManager
will not complete the login process.  This currently generally works
because this process tends to complete before the /info and /tenant/info
calls to Zuul.  However, future changes to support a read-only
authentication requirement will need to alter this sequence.

This approach is more robust and easier to follow.  Essentially the
sequence is:
* Return from IdP to /auth_callback
* If /auth_callback is in our location, short-circuit normal rendering
  and render only the AuthCallbackPage
* When background processing is complete, onSignIn will be called and
  we will set the user.redirect property in redux.
* AuthCallbackPage has an effect callback on user.redirect which will
  cause it to perform the redirect away from auth_callback once
  signin is complete.

This process leaves the AuthCallbackPage on the screen a little longer,
so this change updates it to use the newer EmptyPage and Spinner elements
that we have been using elsewhere, so if users see it, it appears more
intentional.

Change-Id: I206c020626c7fd73e58efc29dd50376203679721
2022-10-25 20:19:40 -07: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
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 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 7c6af60a5d UI: Add components page
This adds a new page /components that lists all components which are
retieved from the /components API endpoint.

For the look and feel this page has a similar design like the builds and
buildsets pages.

Change-Id: I38b3a9b456b71e49f02712b63417a905a0aa1397
2021-10-26 14:50:08 -07:00
Ian Wienand 072bf45ff8
PF4: Rework of log viewer page
I think the log-viewer page could do with some PF4-ness.

This incorporates the previous log-viewer page into the builds page.
When selecting a logfile from the listing in the logs tab, the log will
directly show inside the tab rather than on a new page. Breadcrumbs are
used to show the path to the current log file relative to the logs
directory.

Additionally, this change improves the state handling of log files in
redux and allows multiple log files to be stored in the redux state.
This enables fast switching between different logfiles without always
downloading them again.

To remove some boilerplate code, the LogFile component is changed into a
functional component rather than a class component.

The filters are moved from jammed-together links into a button
toggle-group, which is a mutually-exclusive set perfect for this
interface.  This component requires the latest release of PF4, which
is why the packages have been updated.

Change-Id: Ibcbc2bd9497f1d8b75acd9e4979a289173d014b2
2020-11-04 09:19:07 +01:00
Felix Edel 23e2d6a13a
Revert "Revert PF4 build page"
The original change was reverted to fix a scrolling bug that was introduced by a different change. Using this commit in combination with [1] should restore the old behaviour.

Applying [2] on top of them should finally get rid of the scrolling issues.

[1]: https://review.opendev.org/#/c/750361/
[2]: https://review.opendev.org/#/c/750322/

This reverts commit b4b5b9fd58.

Change-Id: Icd498314762a8edca751413b7ee07b9b72317c5b
2020-09-14 14:47:49 +02:00
James E. Blair b4b5b9fd58 Revert PF4 build page
This reverts commits:

 04fa7c4989
 35572d2057
 7d78448ec5

Long log lines cause the tabs to be wider than the browser window
which make them virtually inacessible.  Revert this change until
we work out how to handle that.

Change-Id: I22fd8ef859b7ef3af4fadc95074fbceb30fae9a2
Story: 2008096
2020-08-31 11:45:25 -07:00
Felix Edel 7d78448ec5
PF4: Update build result page layout
Following up on the patterns used for the buildset result page this now
updates the layout of the build result page in the same manner.

The "Summary" part is now always shown above the tabs (Logs, Console,
...) and the first tab is split into two (Results and Artifacts).

The contents of the Logs and Console tabs are unchanged.

Change-Id: If04b65596f189c343cda05a4a8fb3e1b740a0be2
2020-07-16 08:43:14 +02:00
Felix Edel 8fec6cc703
Consolidate summary, logs and console on a single build page
So far, these three tabs were split up in three different Pages to allow
each page being reachable via a different URL (rather than a #<tab>
anchor which is usually used for tabs). This makes changing the builds
page much more difficult as we have keep all three files in sync.

React-router allows a Route to pass custom props to the component that
is rendered when the Route matches a certain URL. We can use this
functionality to provide the active tab via a property for each route
using to the BuildPage component.

This change keeps the way the tabs are working, but maps all three URLs
to a single component with different props to show the activate tab.

Change-Id: Icb5729d759bafdfc396ea3642c8c6c71b3461d00
2020-07-15 09:06:04 +02:00
Tristan Cacqueray 5049023d41 web: add buildset page
This change adds a new page to display a single buildset with its
associated builds.

Change-Id: I664d0db06456c906cfabb6a2b1da613d9aebf419
2019-08-08 22:20:39 +00:00
James E. Blair 53df072eb0 Refactor build page tabs
Instead of having a single page with tabs selected by the URL
hash (eg "uuid#console"), make each "tab" its own page routed with
the URL path (eg "uuid/console").  The "tabs" look and behave the
same, but the change in URL format will allow us to later use
the hash for items on the pages themselves.  For example, we
may be able to deep-link to a task in the console log using the
hash.

This refactoring should also make it easier for us to rearrange
these components in the future.

Change-Id: Ib8174d9b39be3c63ef63cbcbf8682c195ac80c91
2019-08-07 18:37:12 -07:00
James E. Blair 17811a2798 Rename view to logfile
This is a more user-friendly name.  More importantly, the URL
.../build/UUID/log/PATH  makes more sense.

Change-Id: Iff4aaa0b945b0f3674b24db2a4a9fe579204cfc7
2019-07-26 13:24:36 -07: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 84fefd146d web: add buildsets page
This change adds a new page to display a buildsets table
similar to the builds page.

Change-Id: I795dc47149bfc3e4104183fd1838d5f0b05852c2
2019-02-21 03:31:01 +00:00
Tristan Cacqueray 17ecc46d44 web: add nodes page
This changes adds a new dashboard page to display nodes status.

Depends-On: https://review.openstack.org/553998
Change-Id: If17ddc2788e8e62f9860c405ad401b04bdf4502b
2018-12-14 08:33:48 +00:00
Tristan Cacqueray 8f8658a3fe web: add labels page
This changes adds a new dashboard page to display available labels.

Depends-On: https://review.openstack.org/553979
Change-Id: I1d028fc1bea80cca37811ced72ceaa5100b558ea
2018-12-14 08:33:48 +00:00
Tristan Cacqueray d3d0a08eb7 web: add project page
This change adds a /project/{project_name} web interface.

Change-Id: Ie7e49806d14378aeedbaba02eb5c49d59971b9ae
2018-12-14 08:33:44 +00:00
Tristan Cacqueray c3ca052777 web: add projects page
This change adds a /projects web interface to list the projects.

Change-Id: Ic0c539cfaa756b3cdf5c7f07da94ec6ffd202d55
2018-12-14 05:36:21 +00:00
Tristan Cacqueray f61e19900f web: add change status page
This change adds a ChangeStatus page to display the status of a single
change and updates the Change component to link the icon to the new
page.

Change-Id: I265f7a390fde33721624a0da7fe5bd1cde32dc37
2018-12-14 05:36:11 +00:00
Tristan Cacqueray 35734e4d3c web: add config-errors notifications drawer
This change adds a Notification drawer to display the config errors and
a dedicated config-errors web interface.

Change-Id: I5cfc608219e26848a20f14e6c99bdb166ac67121
2018-10-11 03:02:30 +00:00
Tristan Cacqueray 6cb6b73615 web: add job page
This change adds a /job/{job_name} web interface.

Change-Id: Idbeae3a11ec4180a193923def7dc7f9c53dc9043
2018-10-11 02:58:06 +00:00
Tristan Cacqueray 99c38c9375 web: add build page
This change adds a /build/{build_uuid} web interface.

Depends-On: https://review.openstack.org/592225
Change-Id: I4c4b3dc028b7be9f11e959bfca37867eafa9ca3f
2018-10-11 02:57:52 +00:00
Tristan Cacqueray 68d1189871
Revert "Revert "web: rewrite interface in react""
This reverts commit 3dba813c64.

Change-Id: I233797a9b4e3485491c49675da2c2efbdba59449
2018-10-06 10:42:31 -05:00
James E. Blair 3dba813c64 Revert "web: rewrite interface in react"
Revert "Fix publish-openstack-javascript-content"

This reverts commit ca199eb9db.
This reverts commit 1082faae95.

This appears to remove the tarball publishing system that we rely on.

Change-Id: Id746fb826dfc01b157c5b772adc1d2991ddcd93a
2018-09-29 11:51:43 -07:00
Tristan Cacqueray 1082faae95 web: rewrite interface in react
This change rewrites the web interface using React:
http://lists.zuul-ci.org/pipermail/zuul-discuss/2018-August/000528.html

Depends-On: https://review.openstack.org/591964
Change-Id: Ic6c33102ac3da69ebd0b8e9c6c8b431d51f3cfd4
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Co-Authored-By: James E. Blair <jeblair@redhat.com>
2018-09-27 02:14:46 +00:00