summaryrefslogtreecommitdiff
path: root/web/src/containers/job/JobVariant.jsx
Commit message (Collapse)AuthorAgeFilesLines
* web: add dark mode and theme selectionTobias Urdin2023-04-211-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a theme selection in the preferences in the config modal and adds a new dark theme. Removes the line.png image and instead uses CSS linear-gradient that is available in all browsers since around 2018, also fixes the 15 pixels spacing issue that is there today. You can select between three different themes. Auto will use your system preference to choose either the light or dark theme, changes dynamically based on your system preference. Light is the current theme. Dark is the theme added by this patch series. The UX this changes is that if somebody has their system preferences set to dark, for example in Mac OS X that is in System Settings -> Appearance -> Dark the user will get the Zuul web UI in dark by default and same for the opposite. This uses a poor man's dark mode for swagger-ui as per the comment in [1]. [1] https://github.com/swagger-api/swagger-ui/issues/5327#issuecomment-742375520 Change-Id: I01cf32f3decdb885307a76eb79d644667bbbf9a3
* Add nodeset alternativesJames E. Blair2022-09-081-2/+11
| | | | | | | | | | | | This feature instructs Zuul to attempt a second or more node request with a different node configuration (ie, possibly different labels) if the first one fails. It is intended to address the case where a cloud provider is unable to supply specialized high-performance nodes, and the user would like the job to proceed anyway on lower-performance nodes. Change-Id: Idede4244eaa3b21a34c20099214fda6ecdc992df
* Fix Job page error when semaphores is not emptyDong Zhang2022-02-111-0/+12
| | | | | | | Web UI was broken when semaphores is not empty. Fixed by showing it as json structure. Change-Id: Ib9a8d3cdc0efc843f17e406167542817e89a3931
* web: JobVariant : pull description into a cardIan Wienand2021-12-161-18/+20
| | | | | | | The job description (if it exists) is considered important enough to pull into a separate card. Change-Id: I315d338d8ebbb991bb3771238de0f43c59348510
* web: JobVariant : convert to DescriptionListIan Wienand2021-08-171-18/+22
| | | | | | | | This page fits more naturally into the DescriptionList component, which is meant for showing terms with their corresponding descriptions. Change-Id: Ida94abe346166a3c168a06a8b5579ed87aaac7f7
* web: JobVariant: add iconsIan Wienand2021-08-161-26/+37
| | | | | | | | | | | Similar to the build page, add icons next to the terms. I would agree the layout of these is not absolutely consistent; I have filed [1] to allow icons on DescriptionListTerm items, which I think would be the best solution. [1] https://github.com/patternfly/patternfly/issues/4298 Change-Id: Ic72cda3253337ad9501d5c0732a321b0d096c946
* web: JobVariant: visual cleanupsIan Wienand2021-08-161-13/+56
| | | | | | | | | | | | | | | | * Add human descriptions to the table * Put in a few icons, use plain lists, etc. to make look more consistent. * Roll up the job variables by default to reduce space usage * Fix a bug showing jobs on only one branch * s/context/source_context to fix displaying the location the job is defined. Change-Id: I15357c1da642929dd84c9e310f368df36a447766
* web: JobVariant: use @patternfly/react-tableIan Wienand2021-08-161-10/+14
| | | | | | | | | | | | | | Update this to use @patternfly/react-table; apparently the new hotness is TableComposable so use that. There is no option in this table component for vertical dividers. To maintain a visual difference between heading and data, and for consistency with the build page, we bold the description column. This includes the results of a 'yarn upgrade @patternfly/react-table --latest' run for good measure. Change-Id: I2f28d49ba1dee6b8d487cf7c5b1043b42f649c9f
* web: JobVariant: update to @patternfly/react-iconsIan Wienand2021-08-131-13/+18
| | | | | | | Update this page to use @patternfly/react-icons. Convert the list to a PF4 icon-based list. Change-Id: Ic2c3a60a35504c45ec040b65126356057f2aac1a
* web: Job: remove height setting for job pageIan Wienand2021-08-131-16/+2
| | | | | | | | | | | | | This has been in since the original change Idbeae3a11ec4180a193923def7dc7f9c53dc9043 but I couldn't trigger anything that seemed to mess up the height on the display page. This removes it to make the following changes that refactor this page to PF4 compontents a bit easier to follow. These changes introduce new tables components, etc. and I haven't seen any need for adusting the height. Change-Id: I5fcc8c9ebc1da8b37526fe2c4be630ef8f1945ad
* Support multiple semaphoresJames E. Blair2021-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | This allows jobs to request multiple semaphores. Zuul will wait until all are available before acquiring them* and will not start a job unless all have been acquired. This is useful for jobs which require access to mulitple limited resources (especially if other jobs require access to a subset or superset of those same resources). * Implementation note: for efficiency, we actually do acquire them one-by-one but then release any which have been acquired if they are not all available. This all happens very quickly within a single attempt to start a job. We don't hold semaphores while we wait for others as that could cause deadlocks. To be consistent with other job attributes which accept lists, this deprecates job.semaphore and replaces it with job.semaphores. Change-Id: I295a891a2d02b904820d8f60afe8ef862693b75d
* Consolidate js/jsx indentationSorin Sbarnea2020-11-201-10/+10
| | | | | | | | | | | | | 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
* Improve display of stdout/stderr task errorsSorin Sbarnea2020-04-161-2/+2
| | | | | | | | | | | | | Improves navigation on results page by assuring that browser does wrap long lines in results <pre> blocks. Trackpad users are most affected by this because when they scroll a page vertically, the browser will attempt to also do some horizontal scrolling of the <pre> block. The previous experience was relatively similar to the old iframes. Change-Id: I970c421997b01c27a8f5da431115a3a811499dd8
* Don't run jobs if only their file matchers are updatedJames E. Blair2020-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, if a change is made to a job configuration, we want to ignore the file matchers and run the job so that we can see the update in practice. However, we don't want to do so if the *only* change to the job configuration is the file matchers. The result is no different than before, and running the job tells us nothing about the value of the change. This behavior was already the case, but due to a bug. This change both fixes the bug and intentionally restores the behavior. The bug that is corrected is that when variants were applied, the actual file matchers attached to the frozen job were updated, but not their string/list representation (stored in the '_files' and '_irrelevant_files' attributes). This change moves those attributes to the list of context attributes (which are automatically copied on inheritance) -- the same as the actual matcher attributes. We also do the same for the '_branches' attribute (the text version of the branch matcher). These changes make the serialized form of the frozen job (which is returned by the web api) more accurate. And in the case of the files matchers, causes Zuul to correctly detect that the job has changed when they are updated. To restore the current (accidental but desired) behavior, we now pop the files and irrelevant-files keys from the serialized representation of the job before comparison when deciding whether to run the job during a config update. This means that it will only run if something other than a files matcher is changed. This change also removes the _implied_branch job attribute because it is no longer used anywhere (implied branches now arrive via projects and project templates). Change-Id: Id1d595873fe87ca980b2f33832f55542f9e5d496
* Merge "Correctly handle noop on job page"Zuul2020-01-231-1/+1
|\
| * Correctly handle noop on job pageTobias Henkel2020-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | The noop job is a special builtin job that doesn't have a source context. This isn't being handled on the job page which crashes the page when trying to render the source context. Fix this by also checking for a valid source context before rendering it. Change-Id: I483be253ace26bd9a1b7063b2b0ac9480faafa81 Story: 2004757 Task: 38168
* | Add job.override-checkout to rest apiTobias Henkel2020-01-181-1/+1
|/ | | | | | | | | | The override-checkout property of a job is currently not exposed via the rest api. Add that to the job serialization and display it in the job tab in the ui. Change-Id: Ia7b7d85095c771f94cddcbb360f1028f77892e0c Story: 2005518 Task: 30637
* Handle jobs with dependencies on job pageTobias Henkel2020-01-171-0/+6
| | | | | | | | | | | | Currently when displaying a job that has dependencies set the web ui just displays the text 'Something went wrong'. The reason is that the web ui still treats job dependencies as a simple list which is not true anymore since we added support for soft dependencies. Fix that by adding a special handling of the dependencies label. Change-Id: Iaba5af7c3757c5fbe7ea95012430f585583119f4 Story: 2006501 Task: 36473
* Hide "root" variable in job web pageJames E. Blair2019-08-081-0/+1
| | | | | | | | | | When displaying a job variant's variables, the web page shows they are all descended from a variable named "root". This is misleading, and can be avoided by passing this parameter to ReactJson. This causes the root of the hierarchy to be an unnamed dict. Change-Id: I4f123507f21539221da47ebf5372a93b52ebf70b
* Add link to builds in job pageTobias Henkel2019-04-011-1/+8
| | | | | | | | | | Since the introduction of the tree view of the jobs there is no workflow anymore to directly get to the build results of this job. Especially when working with periodic jobs it's now more cumbersome to get to these result. Thus add a link to the build results on the job page. Change-Id: Ia5c9dcbf91bb606ce0bab0cfaea1f406e95c8630
* web: add job pageTristan Cacqueray2018-10-111-0/+200
This change adds a /job/{job_name} web interface. Change-Id: Idbeae3a11ec4180a193923def7dc7f9c53dc9043