Merge "web: JobVariant: add icons"
This commit is contained in:
commit
43ff223745
|
@ -23,12 +23,25 @@ import {
|
||||||
ListVariant,
|
ListVariant,
|
||||||
} from '@patternfly/react-core'
|
} from '@patternfly/react-core'
|
||||||
import {
|
import {
|
||||||
ExternalLinkAltIcon,
|
AnsibleTowerIcon,
|
||||||
LockedIcon,
|
BanIcon,
|
||||||
InfrastructureIcon,
|
CatalogIcon,
|
||||||
|
ClipboardCheckIcon,
|
||||||
|
ClusterIcon,
|
||||||
|
CodeBranchIcon,
|
||||||
|
CodeIcon,
|
||||||
ConnectedIcon,
|
ConnectedIcon,
|
||||||
DisconnectedIcon,
|
DisconnectedIcon,
|
||||||
OutlinedClockIcon
|
ExternalLinkAltIcon,
|
||||||
|
FlagIcon,
|
||||||
|
HistoryIcon,
|
||||||
|
InfrastructureIcon,
|
||||||
|
LockIcon,
|
||||||
|
LockedIcon,
|
||||||
|
OutlinedClockIcon,
|
||||||
|
PackageIcon,
|
||||||
|
RedoIcon,
|
||||||
|
WrenchIcon
|
||||||
} from '@patternfly/react-icons'
|
} from '@patternfly/react-icons'
|
||||||
import {
|
import {
|
||||||
TableComposable,
|
TableComposable,
|
||||||
|
@ -109,7 +122,7 @@ class JobVariant extends React.Component {
|
||||||
context={variant.source_context}
|
context={variant.source_context}
|
||||||
showBranch={true}/>
|
showBranch={true}/>
|
||||||
)
|
)
|
||||||
nice_label = 'Defined at'
|
nice_label = (<span><PackageIcon /> Defined at</span>)
|
||||||
}
|
}
|
||||||
if (label === 'builds') {
|
if (label === 'builds') {
|
||||||
value = (
|
value = (
|
||||||
|
@ -117,11 +130,11 @@ class JobVariant extends React.Component {
|
||||||
<ExternalLinkAltIcon /> {variant.name}
|
<ExternalLinkAltIcon /> {variant.name}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
nice_label = 'Build history'
|
nice_label = (<span><HistoryIcon/> Build history</span>)
|
||||||
}
|
}
|
||||||
if (label === 'status') {
|
if (label === 'status') {
|
||||||
value = this.renderStatus(variant)
|
value = this.renderStatus(variant)
|
||||||
nice_label = 'Job flags'
|
nice_label = (<span><FlagIcon/> Job flags</span>)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
|
@ -129,30 +142,26 @@ class JobVariant extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (label === 'attempts') {
|
if (label === 'attempts') {
|
||||||
nice_label = 'Retry attempts'
|
nice_label = (<span><RedoIcon/> Retry attempts</span>)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (label === 'timeout') {
|
if (label === 'timeout') {
|
||||||
value = (
|
value = (<span>{value} seconds</span>)
|
||||||
<span>
|
nice_label = (<span><OutlinedClockIcon /> Timeout</span>)
|
||||||
<OutlinedClockIcon /> {value} seconds
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
nice_label = 'Timeout'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (label === 'semaphores') {
|
if (label === 'semaphores') {
|
||||||
nice_label = 'Semaphores required'
|
|
||||||
if (value.length === 0) {
|
if (value.length === 0) {
|
||||||
value = (<i>none</i>)
|
value = (<i>none</i>)
|
||||||
}
|
}
|
||||||
|
nice_label = (<span><LockIcon /> Semaphores required</span>)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (label === 'nodeset') {
|
if (label === 'nodeset') {
|
||||||
value = (
|
value = (
|
||||||
<Nodeset nodeset={value} />
|
<Nodeset nodeset={value} />
|
||||||
)
|
)
|
||||||
nice_label = 'Required nodes'
|
nice_label = (<span><ClusterIcon /> Required nodes</span>)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (label === 'parent') {
|
if (label === 'parent') {
|
||||||
|
@ -161,7 +170,7 @@ class JobVariant extends React.Component {
|
||||||
<ExternalLinkAltIcon /> {value}
|
<ExternalLinkAltIcon /> {value}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
nice_label = 'Parent'
|
nice_label = (<span><CodeBranchIcon /> Parent</span>)
|
||||||
}
|
}
|
||||||
if (label === 'variables') {
|
if (label === 'variables') {
|
||||||
value = (
|
value = (
|
||||||
|
@ -175,17 +184,19 @@ class JobVariant extends React.Component {
|
||||||
displayDataTypes={false}/>
|
displayDataTypes={false}/>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
nice_label = 'Job variables'
|
nice_label = (<span><CodeIcon /> Job variables</span>)
|
||||||
}
|
}
|
||||||
if (label === 'description') {
|
if (label === 'description') {
|
||||||
value = (
|
value = (
|
||||||
<div style={{whiteSpace: 'pre-wrap'}}>
|
<div style={{whiteSpace: 'pre-wrap'}}>
|
||||||
{value}
|
{value}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
nice_label = 'Description'
|
nice_label = (<span><CatalogIcon /> Description</span>)
|
||||||
}
|
}
|
||||||
|
|
||||||
rows.push({label: nice_label, value: value})
|
rows.push({label: nice_label, value: value})
|
||||||
|
|
||||||
})
|
})
|
||||||
const jobInfosList = [
|
const jobInfosList = [
|
||||||
'required_projects', 'dependencies', 'files', 'irrelevant_files', 'roles'
|
'required_projects', 'dependencies', 'files', 'irrelevant_files', 'roles'
|
||||||
|
@ -206,20 +217,20 @@ class JobVariant extends React.Component {
|
||||||
nice_label = 'Required Projects'
|
nice_label = 'Required Projects'
|
||||||
item = <JobProject project={value} />
|
item = <JobProject project={value} />
|
||||||
} else if (label === 'roles') {
|
} else if (label === 'roles') {
|
||||||
nice_label = 'Uses roles from'
|
nice_label = (<span><AnsibleTowerIcon /> Uses roles from</span>)
|
||||||
item = <Role role={value} />
|
item = <Role role={value} />
|
||||||
} else if (label === 'dependencies') {
|
} else if (label === 'dependencies') {
|
||||||
nice_label = 'Job dependencies'
|
nice_label = (<span><WrenchIcon /> Job dependencies</span>)
|
||||||
if (value['soft']) {
|
if (value['soft']) {
|
||||||
item = value['name'] + ' (soft)'
|
item = value['name'] + ' (soft)'
|
||||||
} else {
|
} else {
|
||||||
item = value['name']
|
item = value['name']
|
||||||
}
|
}
|
||||||
} else if (label === 'irrelevant_files') {
|
} else if (label === 'irrelevant_files') {
|
||||||
nice_label = 'Irrelevant files matchers'
|
nice_label = (<span><BanIcon /> Irrelevant files matchers</span>)
|
||||||
item = value
|
item = value
|
||||||
} else if (label === 'files') {
|
} else if (label === 'files') {
|
||||||
nice_label = 'Files matchers'
|
nice_label = (<span><ClipboardCheckIcon />Files matchers</span>)
|
||||||
item = value
|
item = value
|
||||||
} else {
|
} else {
|
||||||
item = value
|
item = value
|
||||||
|
|
Loading…
Reference in New Issue