From aead5adcc5e0cf008dc915eb22254cda29f19327 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Mon, 16 Aug 2021 14:54:36 +1000 Subject: web: JobVariant: add icons 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/src/containers/job/JobVariant.jsx | 63 ++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 26 deletions(-) (limited to 'web/src/containers/job/JobVariant.jsx') diff --git a/web/src/containers/job/JobVariant.jsx b/web/src/containers/job/JobVariant.jsx index bec543afb..bb515bb8b 100644 --- a/web/src/containers/job/JobVariant.jsx +++ b/web/src/containers/job/JobVariant.jsx @@ -23,12 +23,25 @@ import { ListVariant, } from '@patternfly/react-core' import { - ExternalLinkAltIcon, - LockedIcon, - InfrastructureIcon, + AnsibleTowerIcon, + BanIcon, + CatalogIcon, + ClipboardCheckIcon, + ClusterIcon, + CodeBranchIcon, + CodeIcon, ConnectedIcon, DisconnectedIcon, - OutlinedClockIcon + ExternalLinkAltIcon, + FlagIcon, + HistoryIcon, + InfrastructureIcon, + LockIcon, + LockedIcon, + OutlinedClockIcon, + PackageIcon, + RedoIcon, + WrenchIcon } from '@patternfly/react-icons' import { TableComposable, @@ -109,7 +122,7 @@ class JobVariant extends React.Component { context={variant.source_context} showBranch={true}/> ) - nice_label = 'Defined at' + nice_label = ( Defined at) } if (label === 'builds') { value = ( @@ -117,11 +130,11 @@ class JobVariant extends React.Component {  {variant.name} ) - nice_label = 'Build history' + nice_label = ( Build history) } if (label === 'status') { value = this.renderStatus(variant) - nice_label = 'Job flags' + nice_label = ( Job flags) } if (!value) { @@ -129,30 +142,26 @@ class JobVariant extends React.Component { } if (label === 'attempts') { - nice_label = 'Retry attempts' + nice_label = ( Retry attempts) } if (label === 'timeout') { - value = ( - - {value} seconds - - ) - nice_label = 'Timeout' + value = ({value} seconds) + nice_label = ( Timeout) } if (label === 'semaphores') { - nice_label = 'Semaphores required' if (value.length === 0) { value = (none) } + nice_label = ( Semaphores required) } if (label === 'nodeset') { value = ( ) - nice_label = 'Required nodes' + nice_label = ( Required nodes) } if (label === 'parent') { @@ -161,7 +170,7 @@ class JobVariant extends React.Component {  {value} ) - nice_label = 'Parent' + nice_label = ( Parent) } if (label === 'variables') { value = ( @@ -175,17 +184,19 @@ class JobVariant extends React.Component { displayDataTypes={false}/> ) - nice_label = 'Job variables' + nice_label = ( Job variables) } if (label === 'description') { value = ( -
- {value} -
+
+ {value} +
) - nice_label = 'Description' + nice_label = ( Description) } + rows.push({label: nice_label, value: value}) + }) const jobInfosList = [ 'required_projects', 'dependencies', 'files', 'irrelevant_files', 'roles' @@ -206,20 +217,20 @@ class JobVariant extends React.Component { nice_label = 'Required Projects' item = } else if (label === 'roles') { - nice_label = 'Uses roles from' + nice_label = ( Uses roles from) item = } else if (label === 'dependencies') { - nice_label = 'Job dependencies' + nice_label = ( Job dependencies) if (value['soft']) { item = value['name'] + ' (soft)' } else { item = value['name'] } } else if (label === 'irrelevant_files') { - nice_label = 'Irrelevant files matchers' + nice_label = ( Irrelevant files matchers) item = value } else if (label === 'files') { - nice_label = 'Files matchers' + nice_label = (Files matchers) item = value } else { item = value -- cgit v1.2.1