Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move pipelinerun results to output tab
- Loading branch information
1 parent
33225d2
commit 36ac9a8
Showing
7 changed files
with
86 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
frontend/packages/pipelines-plugin/src/components/shared/results/OutputTab.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as React from 'react'; | ||
import { EmptyState, EmptyStateBody, EmptyStateVariant } from '@patternfly/react-core'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { PipelineRunModel } from '../../../models'; | ||
import { PipelineRunKind } from '../../../types'; | ||
import { pipelineRunFilterReducer } from '../../../utils/pipeline-filter-reducer'; | ||
import ResultsList from './ResultsList'; | ||
|
||
const OutputTab: React.FC<{ obj: PipelineRunKind }> = ({ obj: pipelineRun }) => { | ||
const { t } = useTranslation(); | ||
|
||
return pipelineRun.status?.pipelineResults || pipelineRun.status?.results ? ( | ||
<div className="co-m-pane__body"> | ||
<ResultsList | ||
results={pipelineRun.status?.pipelineResults || pipelineRun.status?.results} | ||
resourceName={t(PipelineRunModel.labelKey)} | ||
status={pipelineRunFilterReducer(pipelineRun)} | ||
/> | ||
</div> | ||
) : ( | ||
<EmptyState variant={EmptyStateVariant.full}> | ||
<EmptyStateBody> | ||
<p>{t('pipelines-plugin~No Output found')}</p> | ||
</EmptyStateBody> | ||
</EmptyState> | ||
); | ||
}; | ||
export default OutputTab; |
1 change: 1 addition & 0 deletions
1
frontend/packages/pipelines-plugin/src/components/shared/results/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as OutputTab } from './OutputTab'; |