Skip to content

Commit

Permalink
Merge pull request #90 from lokanandaprabhu/feature/OCPBUGS-31745
Browse files Browse the repository at this point in the history
OCPBUGS-31745: TaskRun status is not displayed near the name
  • Loading branch information
openshift-merge-bot[bot] authored Apr 11, 2024
2 parents 4fd562f + d483a96 commit 2315f9a
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Link } from 'react-router-dom';
import * as React from 'react';
import { useParams } from 'react-router-dom-v5-compat';
import { ArchiveIcon } from '@patternfly/react-icons';
import { ResourceStatus } from '@openshift-console/dynamic-plugin-sdk';
import DetailsPage from '../../details-page/DetailsPage';
import { getReferenceForModel } from '../../pipelines-overview/utils';
import { TaskRunModel } from '../../../models';
Expand All @@ -23,12 +24,18 @@ import {
RESOURCE_LOADED_FROM_RESULTS_ANNOTATION,
} from '../../../consts';
import { LoadingBox } from '../../status/status-box';
import { taskRunStatus } from '../../utils/pipeline-utils';
import Status from '../../status/Status';

const TaskRunDetailsPage = () => {
const { t } = useTranslation('plugin__pipelines-console-plugin');
const params = useParams();
const { name, ns: namespace } = params;
const [data, loaded] = useTaskRun(namespace, name);
const trStatus = React.useMemo(
() => loaded && data && taskRunStatus(data),
[loaded, data],
);
const resourceTitleFunc = React.useMemo(() => {
return (
<div className="taskrun-details-page">
Expand All @@ -42,6 +49,9 @@ const TaskRunDetailsPage = () => {
<ArchiveIcon className="pipelinerun-details-page__results-indicator" />
</Tooltip>
)}
<ResourceStatus>
<Status status={trStatus}></Status>
</ResourceStatus>
</div>
);
}, [data]);
Expand Down

0 comments on commit 2315f9a

Please sign in to comment.