summaryrefslogtreecommitdiff
path: root/web/src/containers/status
Commit message (Collapse)AuthorAgeFilesLines
* Support authz for read-only web accessJames E. Blair2022-10-251-5/+5
| | | | | | | | | | | | | | | 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
* Hide skipped jobs in status/reportsJames E. Blair2022-07-212-11/+66
| | | | | | | | | | | | | | | | | | | | | | | For heavy users of "dispatch jobs" (where many jobs are declared as dependencies of a single job which then mutates the child_jobs return value to indicate which few of those should be run), there may be large numbers of "SKIPPED" jobs in the status page and in the final job report, which reduces the usability of both of those. Yet it is important for users to be able to see skipped jobs since they may represent an error (they may be inadvertently skipped). To address this, we remove "SKIPPED" jobs from the status page by default, but add a button at the bottom of the change box which can toggle their display. We remove "SKIPPED" jobs from the report, but add a note at the bottom which says "Skipped X jobs". Users can follow the buildset link to see which ones were skipped. The buildset page will continue to show all the jobs for the buildset. Change-Id: Ie297168cdf5b39d1d6f219e9b2efc44c01e87f35
* Make promote work for any pipeline managerJames E. Blair2022-03-101-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | This alters the behavior of the promote event handler so that it does something useful in independent pipelines as well as dependent. It not only re-orders changes within a pipeline's shared queue (the old behavior), but it also re-orders the shared queue within the pipeline. When used in an independent pipeline, this will give the item an advantage when requesting nodes or semaphores, or starting jobs. This behavior applies to dependent pipelines as well -- the behavior is the same for every pipeline. Restarting jobs for changes in independent pipelines would be counter-productive (and even in dependent pipelines we may have restarted more jobs than necessary if the change at the head wasn't being altered), so it has been altered to only dequeue/enqueue items when necessary to achieve the requested order. The event argument to addChange within the promote method has been changed from the promote event to the original item enqueue event. Methods within the pipeline manager assume that event type is a TriggerEvent rather than a ManagementEvent and could throw some (non-fatal) errors when reporting. Change-Id: Ib4ab855cff27bf8e96aa852333fb4ace656235b4
* Calculate elapsed and remaining times in javascriptJames E. Blair2022-02-261-10/+50
| | | | | | | | | | | | | | The scheduler may now skip pipeline processing if there are no pending events. And we only write the status JSON to ZK when we process pipelines. That means that the JSON received by the web app may be very old. Everything in it should still be correct except for the calculated values such as elapsed and remaining time. This means that if a tenant is less active, the times and progress bars may appear frozen. To mitigate this, use the absolute timestamps and calculate the relative times on the client. Change-Id: Ia2bf8bb3b5495e3db13723f81c44186e5ca6ff53
* Add waiting status to queuedJames E. Blair2022-02-231-1/+7
| | | | | | | | | | | | | | | | | We currently supply no "waiting status" information (which would appear in the mouseover text on the status page) for jobs that are queued. This represents jobs for which we have submitted a node request but the build has not started. This change adds two new "waiting_status" values: the node request id for the period between node request submission and executor build request submission, and the string "executor" for the period between executor build request submission and build start. This updates the status page to display waiting_status as mouseover text for the "queued" status label. Change-Id: Ic1151944f4a8da8d1ab0a3ae96efb0877f86aebd
* Put pipeline icon to the left of the nameJames E. Blair2021-12-021-2/+1
| | | | | | | | This better matches our use of icons elsewhere (example: build list table column header). It also separates the icon from the queue length indicator which reads sort of like an icon as well. Change-Id: Ib460826e657ab3c9d36e7f2734c620f5afe43486
* web UI: allow a privileged user to promote a changeMatthieu Huin2021-11-234-11/+82
| | | | | | | | | Add a "promote" button in the actions menu of a change, if the currently logged in user is an admin on the tenant and if the pipeline is dependent. Clicking the button opens a modal, so that the user can confirm her decision. Change-Id: I8262888aef9ba1a106e0b321cc4cf2e14465b90c
* Web UI: Show pipeline types as iconsMatthieu Huin2021-11-231-5/+72
| | | | | | | | | | | | | | | | Add specific icons next to pipelines names on the tenant status page to help differentiate their characteristics. A mouseover text provides a brief summary for each type of pipeline. Type <-> Icon mapping: * independent: FlaskIcon (it is for experiments) * dependent: CodeBranchIcon (integration pipeline) * serial: SortAmountDownIcon (deploy all and in order) * supercedent: BundleIcon (deploy latest) * default: StreamIcon (icon used for pipelines in the build/buildset page) Change-Id: Ia16993af70d133f15aad9a212737805c3623b76e
* Web UI: allow a privileged user to request autoholdMatthieu Huin2021-11-181-1/+1
| | | | | | | | | 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
* web UI: allow a privileged user to re-enqueue a changeMatthieu Huin2021-11-181-3/+4
| | | | | | | | | | | | 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
* web UI: allow a privileged user to dequeue a changeMatthieu Huin2021-11-182-17/+154
| | | | | | | | | | | | Add a togglable "Actions" kebab menu on the right of a change, if the currently logged in user is an admin on the tenant. Show available actions (currently "dequeue" only) when toggled. Clicking the "Dequeue" item opens a modal, so that the user can confirm her decision. Change-Id: I7c97509d62ef167ee5904a816998049d88c6b3cb
* Upgrade react-router-domJames E. Blair2021-11-181-14/+13
| | | | | | | | | | | | | | | | This updates react-router-dom to not quite the latest version, but a new enough version that it supports hooks. This also changes how React Refs are handled in such a way that it breaks some tests which rely on on reaching through the redux store into child nodes. To resolve this, some tests are updated to use the react-test-renderer instead. The tests in App.test.jsx were not asserting anything past the initial toEqual assertion in the path, which is why they are only now being updated to match links added since the test inception. Change-Id: Ia80fbfe3cf2d2d275fd8422111ec193c467bf606
* Merge "Remove pf-c-content CSS class from status page"Zuul2021-11-141-4/+4
|\
| * Remove pf-c-content CSS class from status pageFelix Edel2021-11-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an old PF3 CSS rule which seems to conflict with some of the PF4 rules. As a result, the styles for the h3 headings (used for the pipeline names) are styled differently than the other headings used in zuul-web. Especially the margin is set to 0 which makes the headings look a little "broken" and the containers for the different pipelines are crushed together. This is the only occurrence of this rule, so I just removed it and adapted the "broken" heading to a PF4 Title. Those are small changes, but the overall result should look much cleaner and more PF4-like. Change-Id: I226149588f2f3b6ee5d09aa43e1b8c085390ece1
* | Adjust spacing on status pageJames E. Blair2021-10-301-2/+2
|/ | | | | | | | Apparently PF sets <small> to display:block which adds too much vertical space to the status page boxes. Switch those back to display:inline. Change-Id: Ib096fa1de9f5c7678584009fbee51e09794c0b81
* Treat 'waiting' jobs same as 'queued' in buildset progress barAndrii Ostapenko2021-09-201-28/+27
| | | | | | | | | | Currently 'waiting' jobs are marked the same color as 'running' in buildset progress bar that is counterintuitive. Also refactors function for better readability. Change-Id: Id580b843f9c9fd06468bcdc31c9a0677a132ccc2 Signed-off-by: Andrii Ostapenko <aostapenko@stackalytics.io>
* Display branch of queue in status pageDong Zhang2021-07-131-2/+6
| | | | | | | | To have an overall idea of the status of a queue, if the queue is defined as "per-branch", it would be useful to display the branch name together with the queue name in status page. Change-Id: I2e9c18a716c5f5ba70081193ccb2c1ce0615055a
* Merge "Use ordinal rules for retries"Zuul2021-06-051-1/+8
|\
| * Use ordinal rules for retriesIan Wienand2021-06-021-1/+8
| | | | | | | | | | | | | | | | | | Make the retries read a little better by using correct ordinal rules. Apparently, this is the way to do it with modern javascript. [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules/PluralRules Change-Id: I6e38d27fb5a96ed846ad8ab611ef4890c0014c3f
* | Show pipeline event queue lengths in Zuul webSimon Westphahl2021-06-021-0/+12
|/ | | | | | | | With I876c3634b5616b6fc88f3ee529958b32f2ceda43 we have the length of the pipeline event queues in the status JSON and can display those in the web UI. Change-Id: I8a437a288736ce5b3c892129bca9bbee6fefb98a
* Add waiting status to status pageJames E. Blair2021-04-291-5/+11
| | | | | | | If a job is "waiting", add a tooltip so users can find out upon what the job is waiting. Change-Id: I94ec3bb6bfc8c0cb828f9dab8999e8df5a60aea9
* Consolidate js/jsx indentationSorin Sbarnea2020-11-204-11/+11
| | | | | | | | | | | | | Previously indentation was not checked at all and in order to avoid reviewers time with style checks, we can enforce it with eslint. Current js/jsx changes were made by: yarn lint-fix Note this this change can easily become outdated so we need to coordinate and merge it quickly as each rebase would loose previous votes. Change-Id: I85883fc8db924ad4ce9acad5acdd42aed7e4d0e4
* Configure redux for developmentFelix Edel2020-10-141-1/+3
| | | | | | | | | | | | | | This enables the redux developer tools for the browser. To make use of this, one must also install the Redux DevTools extension which is available for various browsers. The extension visualize all state transitions in the redux store and also allows changing them manually to see the effects. Additionally, this change makes use of the third-party library called "redux-immutable-state-invariant", which throws exception in development mode whenever a state is mutated directly within an action or reducer. Change-Id: I8a8588cd7f5f1b17b247d9700a492e5c1e27f040
* UI: Highlight pipeline names on status pageFelix Edel2020-08-241-1/+3
| | | | | | | | | The status page shows a lot of content wich makes it sometimes difficult to see where a pipeline "container" (in terms of UI) starts or ends. This change emphasizes the pipeline names a little, so the beginning of a new pipeline container is easier to spot. Change-Id: I4201b935abb9b1365b3a570f3e00a0b492240bf8
* Round width of change progress bar to 2 decimalsPaul Belanger2020-07-141-1/+1
| | | | | | | | | It is possible for a gap in the progress bar to remain empty due to how we round the width to no decimals. This should allow us to properly fill the progress bar closer to 100%. Change-Id: I2fb11660b00abb741dc6b973e449efe05cb5bc9f Signed-off-by: Paul Belanger <pabelanger@redhat.com>
* Introduce Patternfly 4Felix Edel2020-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Since Patternfly 4 (PF4) is a complete rewrite of the framework that doesn't require bootstrap and comes with a new npm package, it's possible to include both side-by-side in a project. This change includes the necessary PF4 packages and updates the header, navbar, drawer (shows the config errors) and global page layout with PF4 components. Once this is done, we should be able to update the other components step by step to PF4. Points to keep in mind for the migration phase: 1. Some Patternfly 3 CSS rules are overridden by Patternfly 4 wildcards, mostly (re)setting the padding and margin of various elements to 0. To fix this unwanted behaviour, there is a pf4-migration.css file included were we can keep track on those rules and ensure that the old padding and margin values are re-applied after Patternfly 4 is imported. Change-Id: I77b81fa0f97fe718207ba5a506cee300371c693b
* Update to create-react-app 3.4.1Monty Taylor2020-05-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | While trying to figure out why the ansi patch wouldn't build it emerged that we're now 2 major releases behind on create-react-app. Update create-react-app to the latest 3.4.1. This also updates react to 16.13, and updates eslint globals processing so that we don't have to declare globals in headers when we've declared them already in the eslint file. Finally, although this doesn't do it, create-react-app 3 has support for typescript, so if we want we can start migrating files to .ts or .tsx extensions and start doing typing in them. Pin nanoid to v2 until such a time as create-react-app can be updated to 3.4.2 which is needed ot handle .cjs extensions being used by nanoid. Change-Id: Ibc69bef605a62e4fdd2ebba33d9d1b822e7dfeba
* Render buildset progress bar correctlySimon Westphahl2020-04-021-20/+24
| | | | | | | | | | | The buildset progress bar was not rendered using the same colors as the job statuses itself. This happened because the job results were interpreted differently for the job status and the progress bar. There is now a common jobStrResult() function to have the same result string in both cases. Missing result cases were added as needed. Change-Id: I202959766e193efacd00b0dc85bf5160f8412a24
* ui: convert all spaces to commas for filterMohammed Naser2020-02-211-1/+1
| | | | | | | | | | | We replace all spaces by commas when filtering the status page, however, due to the fact we don't use the `g` flag, it only splits the first value and stops after the first one. This patch adds the `g` flag to the regex so that all of the spaces are replaced by commas when filtering. Change-Id: I9b9cd33a7067fd00415e2ae1634e340a6df46749
* web: humanize time durationsAntoine Musso2020-02-041-61/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At a lot of place, the duration for an item shows the raw value. It lacks an indication of the unit (ms, s or minutes??) and is not very human friendly. `480` is better understood as `8 minutes`. The `moment-duration-format` package enhance moment duration objects to ease formatting. It has better options than moment.duration.humanize(), notably it does not truncate value and trim extra tokens when they are not needed. The package does not have any extra dependencies. https://www.npmjs.com/package/moment-duration-format Format duration on the pages build, buildset and on the build summary. The Change panel had custom logic to workaround moment.duration.humanize over rounding (so that 100 minutes became '1 hour'). The new package does not have such behavior and offers tuning for all the features we had: * `largest: 2`, to only keep the two most significants token. 100 minutes and 30 seconds would thus render as '1 hour 40 minutes', stripping the extra '30 seconds'. * `minValue: 1`, based on the least significant token which is minute, it means any value less than one minute is rendered as: < 1 minute * `usePLural: false`, to disable pluralization since that was not handled previously. That reverts https://review.opendev.org/#/c/704191/ Make class="time" to not wrap, they would wrap on the Status page since the box containing is not large enough. In the Console, show the duration for each tasks, rounding to 1 second resolution. Would ease finding potential slowdown in a play execution. The tasks do not have a duration property, use moment to compute it based on start and end times. Since hostname length might vary, the duration spans might be misaligned. Use a flex to have them vertically aligned, credits to mcoker@github: https://github.com/patternfly/patternfly-react/issues/1393#issuecomment-515202640 Thanks to Tristan Cacqueray for the React guidances! Change-Id: I955583713778911a8e50f08dc6d077594da4ae44
* Be more specific with remaining timeClark Boylan2020-01-271-3/+30
| | | | | | | | | | | | | | | With the old code using humaized time it appears to always round down. This means a job that will run for an hour and 45 minutes is estimated to complete in an hour. With these sorts of estimates it is my experience that it is better to over rather than under estimate as people will get frustrated if it takes twice as long to get their results as is stated. To address this we can provide a more specific estimate. We can say "One hour 45 minutes" instead of "an hour". This gives users a much better indication of when they can expect results. Change-Id: I705a636cd2483cdd2b880093747b720f91e6f0e3
* Add estimated time remaining tooltip to UIPaul Belanger2020-01-241-1/+7
| | | | | | | | | With help from TristanC, this should create a tooltip when users hover over the status bar of a running job, that displays the estimated time left. Change-Id: I8d386ea9dce81088eb09293e4d9643ce448434f4 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
* Don't expand change panel on middle clickTobias Henkel2020-01-171-1/+5
| | | | | | | | | | When middle clicking on the link to the change a user typically doesn't want the item to expand/contract. Instead it should not react on this event. Change-Id: I663732887d0b7b6e13fe38da555e5a092d49f05f Story: 2005895 Task: 33754
* Change colors of various "negative" results in UIFelix Schmidt2019-10-291-0/+3
| | | | | | | | | | | | | Some job results like RETRY_LIMIT, NODE_FAILURE and POST_FAILURE are often indicators for problems regarding infrastructure, network or node provisioning via OpenStack. Unfortunately, they are not that visible on the zuul status page and often get lost between those PAUSED, QUEUED and WAITING jobs. To still differentiate from FAILED builds, I used the orange color instead of red. Change-Id: Icbd22a373e4355d3555759214605ab07918cd39b
* Improve visualization retry attempts in UIFelix Schmidt2019-08-231-1/+1
| | | | | | | | As a follow-up on https://review.opendev.org/#/c/660960/, this will add the keyword 'attempt' to the number of retries to clarify the meaning of the number in the brackets. Change-Id: Ib8f2492bc91b418eb27b956ed8867282e72a9474
* Merge "Differentiate between queued and waiting jobs in zuul web UI"Zuul2019-06-261-2/+6
|\
| * Differentiate between queued and waiting jobs in zuul web UIFelix Schmidt2019-06-201-2/+6
| | | | | | | | | | | | | | | | | | | | | | When working with job dependencies, the zuul web UI does not differentiate between jobs that are able to run and those that are waiting for another job to finish before they can actually run. As both are marked as 'queued', this often leads to confusion and people are wondering why the queuing takes so long. To better differentiate between these states, this change introduces a new state 'waiting' in zuul web. Change-Id: Id0e85dc2db9660925209dc3cee365aa5c1241190
* | Merge "Return store object instead of a function"Zuul2019-06-261-3/+1
|\ \ | |/ |/|
| * Return store object instead of a functionGuillaume Vincent2019-06-171-3/+1
| | | | | | | | | | | | | | | | ES6 modules are evaluated only once on first import. They behave like singleton. Some redux librairies except the store to be a singleton. Returning a function and invoking it remove this behavior. Change-Id: I74ff516567d4b7bcf5f1e2d3004eb4617817f117
* | Merge "Show retry attempts in UI"Zuul2019-06-171-4/+8
|\ \ | |/ |/|
| * Show retry attempts in UIFelix Schmidt2019-05-231-4/+8
| | | | | | | | | | | | | | | | Currently, it's not visible in the Zuul UI if a job runs for the first time or had already a retry. This change adds the number of tries to the job name if the job had a least one retry. Change-Id: I75f400b7eec1e623045b600a7bd93846a6ac3090
* | Update axios version and yarn.lockClark Boylan2019-06-061-1/+1
|/ | | | | | | | | | | Axios <= 0.18.0 should apparently not be used any longer. Bump this to 0.19.0 and regenerate the yarn lock. This does update all the other packages too because that is how yarn.lock works. Note we have to fix the linter errors in the process (and clear out an annoying warning). Change-Id: Iabf5171ce8e0ccfabbebc7784da3299b2fd04693
* Tiny cleanup in change panel jsClark Boylan2019-04-281-1/+0
| | | | | | | We wrap this switch statement in a result !== queued check but then have a queued case. Remove this redundant case. Change-Id: I920cf2f31c10b82756957d7512b349ceb1a1ad00
* Make paused status bar blueClark Boylan2019-04-271-0/+4
| | | | | | | | | | Currently we don't set a contextual class for the progress bar when state is paused. Set it to blue to indicate the job is still running but with success. The old behavior was default grey which indicates the job is queued. Change-Id: Ie2b7d0c6f4246796c0f9d0385b4589a17418ce48 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
* Resolve todo after stream.html to stream renamingTobias Henkel2019-03-301-9/+1
| | | | | | | The change I074b3a88a893e04d504e9cf21ced14ba86efc7ec has merged months ago so we can resolve that todo now. Change-Id: I14b71bfc2c6f8ff3d0777f65e83ee65662d0bcc9
* Fix slightly smaller font of in progress jobsTobias Henkel2019-03-301-2/+2
| | | | | | | | On the status page the font of in progress jobs is slightly smaller than the font size of finished or queued jobs. This is caused by the missing class zuul-job-name when constructing the link. Change-Id: I8dee14334567227ccca74c45ef393c0e7e6e64c9
* web: support more than one job in the filterJames E. Blair2019-03-141-1/+1
| | | | | | | | | | | | | | | This allows you to enter: requirements-tox-py35-check-uc cross-cinder-py35 In the job filter and see the common ancestry in the tree view. The status page filter is also updated to support multiple spaces between items. Both filters now support this in order to deal with common copy/paste errors. Depends-On: https://review.openstack.org/643397 Change-Id: I38cc6cdc8b5373dc8f29804f5bb35e9594a000bf
* Show animated progress bar in preparation phaseSimon Westphahl2019-02-191-2/+11
| | | | | | | | | | | Show an animated progress bar in the web UI during the preparation phase. In this phase the job already has a log URL but no 'elapsedTime' or 'remainingTime', leading to an empty progress bar. E.g. with large repos the prep phase can take a while during which there is no visible feedback to the user. Change-Id: Ia1e25e662f38f2d469eb65a16dd127dbb0414c3c
* Switch back to three columns for mid sized screensTobias Henkel2019-01-021-1/+1
| | | | | | | | Screens with 1280x1024 seem to fall into the large category in bootstrap. However four columns seem to be too much for these screens. Instead use four columns only for extra large screens. Change-Id: I3fc90b70ce9cb7820162e8425918705a6eb364ff
* Merge "web: add change status page"Zuul2018-12-311-5/+18
|\