Skip to content

Commit

Permalink
Merge pull request #6493 from abhinandan13jan/time-inline
Browse files Browse the repository at this point in the history
Bug 1875809: Restyle Time to inlineblock for Topology - Pipeline & Builds
  • Loading branch information
openshift-merge-robot committed Sep 11, 2020
2 parents 04b3fed + 3e0fa8b commit f988ecb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
@@ -0,0 +1,5 @@
.odc-pipeline-run-item {
&__time {
display: inline-block;
}
}
Expand Up @@ -10,6 +10,7 @@ import { PipelineRunModel } from '../../../models';
import { PipelineRun } from '../../../utils/pipeline-augment';
import LogSnippetBlock from '../../pipelineruns/logs/LogSnippetBlock';
import { getLogSnippet } from '../../pipelineruns/logs/pipelineRunLogSnippet';
import './PipelineRunItem.scss';

type PipelineRunItemProps = {
pipelineRun: PipelineRun;
Expand All @@ -27,11 +28,20 @@ const PipelineRunItem: React.FC<PipelineRunItemProps> = ({ pipelineRun }) => {
const logDetails = getLogSnippet(pipelineRun);

return (
<li className="list-group-item">
<li className="odc-pipeline-run-item list-group-item">
<Grid hasGutter>
<GridItem span={6}>
<Link to={`${path}`}>{name}</Link>
{lastUpdated && <span className="text-muted">&nbsp;({fromNow(lastUpdated)})</span>}
<div>
<Link to={`${path}`}>{name}</Link>
{lastUpdated && (
<>
{' '}
<span className="odc-pipeline-run-item__time text-muted">
({fromNow(lastUpdated)})
</span>
</>
)}
</div>
</GridItem>
<GridItem span={3}>
<Status status={pipelineRunStatus(pipelineRun) || 'Pending'} />
Expand Down
4 changes: 4 additions & 0 deletions frontend/public/components/overview/_build-overview.scss
Expand Up @@ -9,6 +9,10 @@
align-items: center;
}

.build-overview__item-time {
display: inline-block;
}

.build-overview__status {
flex-wrap: wrap;
}
16 changes: 9 additions & 7 deletions frontend/public/components/overview/build-overview.tsx
Expand Up @@ -40,13 +40,15 @@ const BuildOverviewItem: React.SFC<BuildOverviewListItemProps> = ({ build }) =>
const lastUpdated = completionTimestamp || startTimestamp || creationTimestamp;

const statusTitle = (
<>
Build &nbsp;
<BuildNumberLink build={build} />
&nbsp;
{conjugateBuildPhase(phase)}
{lastUpdated && <span className="text-muted">&nbsp;({fromNow(lastUpdated)})</span>}
</>
<div>
Build <BuildNumberLink build={build} /> {conjugateBuildPhase(phase)}
{lastUpdated && (
<>
{' '}
<span className="build-overview__item-time text-muted">({fromNow(lastUpdated)})</span>
</>
)}
</div>
);

return (
Expand Down

0 comments on commit f988ecb

Please sign in to comment.