This updates the web ui to handle multiple changes per item. It
is compatible with the current data output as well as the upcoming
API.
Change-Id: I536967e51b22b60c8ff7baa46b902a36d1ea44dd
After updating to the latest version of moment, many pages in the
Zuul web dashboard are observed to raise a TypeError about
"ne.utc(...).tz is not a function" which seems to correspond to the
recent moment library update in change
Id9d0cdec6d6a39542e8248c8690d8a94018296b5. Apparently, use of tz
needs explicit importing of moment from the separate moment-timezone
library, so the prior working state of these scripts likely had
something to do with global state and import order.
The moment-timezone library does not provide a duration method, so
use the plain moment library for that.
Change-Id: Ib75eb65cc29261f010df8c9ab8c15d6491205079
Co-Authored-By: James E. Blair <jim@acmegating.com>
If the site has configured zuul manifest generation with
"index_links" set to true, they have indicated that the zuul web
ui needs to append "index.html" to all of the directory entries
listed in the zuul manifest when generating the "Logs" tab.
The same is almost certainly true for the raw link to the log
location (appearing as "View log" in the summary area), so once
we retrieve the manifest, if index_links is set there, then
set the "View log" link to also include an index.html.
If the manifest is missing, then we will fall back to returning
just the raw URL (and seeing the actual URL returned to Zuul may
be preferable when debugging log failures anyway). For most users,
most of the time, this should produce a reasonable "View log" link.
Change-Id: Ia63943742a7a20bbf271a4de692dd41f2fe0016d
I am currently getting the below error in my console about the type
passed to AutoholdModal. Convert the change to a string.
Warning: Failed prop type: Invalid prop `change` of type `number` \
supplied to `AutoholdModal`, expected `string`.
in AutoholdModal (created by ConnectFunction)
in ConnectFunction (at Build.jsx:273)
in Build (created by ConnectFunction)
in ConnectFunction (at Build.jsx:254)
in section (created by PageSection)
< .. and so on ..>
Change-Id: I9c9a5edfa18f0344ac4a50c62c798a5d4e404c18
Add a "create autohold request" button on the autoholds page for admin
users.
Refactor autohold form modal so that it can be reused in autoholds and
build pages.
Improve error messages when using admin actions: if the API call returns
an error description, display it in the toast. Otherwise return the HTTP
error code.
Change-Id: I9d1cc8a1d751e7b4ce32e7abecc2ad9f3e96f676
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
Add a "autohold" command on a build page, displayed only if the currently
logged in user is an admin on the tenant. By clicking the command, the
user can display a form and set custom parameters for an autohold
request.
Change-Id: I0f9f069d4ad36d4961eb6925146f67fe4910cb2e
Support three new filter types: checkbox, select and ternary select.
The ternary select tool is meant to support fields that can be set to
True, False, or ignored.
Use this feature to allow filtering builds by held status (i.e. show
builds that triggered a autohold only) or by voting status (i.e. show only
voting jobs).
Selects let a user choose among predefined values. Use a select to help
a user choose a result value when searching builds and buildsets.
Build page: add a thumbtack icon next to a build's status badge if that
build triggered an autohold.
Change-Id: I40b06c83ed069e0756c7f8b00430d36a36230bfa
Both the build and buildset doesn't change once stored in the SQL
database. Thus, clicking on the refresh button just reloads the same
information again which doesn't make much sense IMHO.
Since there is no other information on the build that would change over
time, simply remove the refresh button.
Change-Id: I3fccea38824cc4ffbda9d8619f548878b0a60542
The web ui would only properly render ref_url links if build.change was
set. Set up conditions to check if build.change is set and fallback to
the build.newrev value if not. This way we render a clickable link using
the commit sha1.
Change-Id: I5eb9cb1c7cc0f64d6d7504347c01a6450ffb1507
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
This reverts commits:
04fa7c498935572d20577d78448ec5
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
When a build was triggered by a tag (e.g. release pipeline) the branch
field is not set. To avoid showing an empty branch value, we could fall
back to the ref value instead.
Change-Id: Ic73f942ef34cf5b3d66e90197b53a9d42698de50
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
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
Replace top level panel with a simple div in order to avoid an entire
extra box nesting level, one that does not add any visual help.
Nesting is useful when you display more than one element, but in our
case we never display more than one build result.
This change alone saves some precious horizontal space, so embedded
text is less likely required to wrap.
Change-Id: I76e7e7adfd27bd2eadbfe187f40b35d728ff0145
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
This makes them a little easier to pick out (which will be important
when we start using them to highlight preview builds, etc.).
Also, use a TreeView so that the metadata are hidden by default.
Change-Id: I64187af98b4c2cb3624cb20f9b622780e16b963c
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
This change updates the build page to fetch the job-output.json file
and display the failed tasks. Logserver needs to enables CORS
header for the zuul-web service.
Change-Id: Ied9d1bb6489f608bc5402a98c8ae3a24b37b91e2
This change updates the build page component to use a container
for build information rendering. This enable decoupling the network
logic from the actual rendering.
Change-Id: I8c7c03b5efa80ea884249ffdee31c7819a336bfc