Merge "Add an icon next to result buttons on the console log"

This commit is contained in:
Zuul 2020-07-21 21:25:38 +00:00 committed by Gerrit Code Review
commit 425172cf39
2 changed files with 27 additions and 3 deletions

View File

@ -24,6 +24,11 @@ import {
Col, Col,
Modal, Modal,
} from 'patternfly-react' } from 'patternfly-react'
import {
ContainerNodeIcon,
InfoCircleIcon,
SearchPlusIcon,
} from '@patternfly/react-icons'
import { import {
hasInterestingKeys, hasInterestingKeys,
@ -181,30 +186,42 @@ class HostTask extends React.Component {
if (this.state.failed) { if (this.state.failed) {
ai.push( ai.push(
<ListView.InfoItem key="failed" title="Click for details"> <ListView.InfoItem key="failed" title="Click for details">
<span className="task-details-icon" onClick={this.open}>
<SearchPlusIcon />
</span>
<span className="task-failed" onClick={this.open}>FAILED</span> <span className="task-failed" onClick={this.open}>FAILED</span>
</ListView.InfoItem>) </ListView.InfoItem>)
} else if (this.state.changed) { } else if (this.state.changed) {
ai.push( ai.push(
<ListView.InfoItem key="changed" title="Click for details"> <ListView.InfoItem key="changed" title="Click for details">
<span className="task-details-icon" onClick={this.open}>
<SearchPlusIcon />
</span>
<span className="task-changed" onClick={this.open}>CHANGED</span> <span className="task-changed" onClick={this.open}>CHANGED</span>
</ListView.InfoItem>) </ListView.InfoItem>)
} else if (this.state.skipped) { } else if (this.state.skipped) {
ai.push( ai.push(
<ListView.InfoItem key="skipped" title="Click for details"> <ListView.InfoItem key="skipped" title="Click for details">
<span className="task-details-icon" onClick={this.open}>
<SearchPlusIcon />
</span>
<span className="task-skipped" onClick={this.open}>SKIPPED</span> <span className="task-skipped" onClick={this.open}>SKIPPED</span>
</ListView.InfoItem>) </ListView.InfoItem>)
} else if (this.state.ok) { } else if (this.state.ok) {
ai.push( ai.push(
<ListView.InfoItem key="ok" title="Click for details"> <ListView.InfoItem key="ok" title="Click for details">
<span className="task-details-icon" onClick={this.open}>
<SearchPlusIcon />
</span>
<span className="task-ok" onClick={this.open}>OK</span> <span className="task-ok" onClick={this.open}>OK</span>
</ListView.InfoItem>) </ListView.InfoItem>)
} }
ai.push( ai.push(
<ListView.InfoItem key="hostname"> <ListView.InfoItem key="hostname">
<span className="additionalinfo-icon"> <span className="additionalinfo-icon">
<Icon type='pf' name='container-node' /> <ContainerNodeIcon />
{hostname}
</span> </span>
{hostname}
</ListView.InfoItem> </ListView.InfoItem>
) )
@ -304,8 +321,9 @@ class PlayBook extends React.Component {
ai.push( ai.push(
<ListView.InfoItem key="trusted" title="This playbook runs in a trusted execution context, which permits executing code on the Zuul executor and allows access to all Ansible features."> <ListView.InfoItem key="trusted" title="This playbook runs in a trusted execution context, which permits executing code on the Zuul executor and allows access to all Ansible features.">
<span className="additionalinfo-icon"> <span className="additionalinfo-icon">
<Icon type='pf' name='info' /> Trusted <InfoCircleIcon />
</span> </span>
Trusted
</ListView.InfoItem> </ListView.InfoItem>
) )
} }

View File

@ -276,6 +276,12 @@ pre.version {
.zuul-console .additionalinfo-icon .zuul-console .additionalinfo-icon
{ {
cursor: default; cursor: default;
margin-right: 8px;
}
.zuul-console .task-details-icon
{
cursor: pointer;
margin-right: 8px;
} }
.zuul-console-modal-header-link .zuul-console-modal-header-link
{ {