Skip to content

Commit

Permalink
Add missing actions on the TaskRun and PipelineRun details pages
Browse files Browse the repository at this point in the history
Add ability to rerun/stop/delete etc. from the resource details page
so that users no longer have to navigate to the list page to perform
these actions.

Replace use of the `RunAction` component (which only supported rerun
and start actions) with the more generic `Actions` component which is
already used on the list pages.
  • Loading branch information
AlanGreene committed Aug 23, 2022
1 parent 35a2e88 commit 911d70c
Show file tree
Hide file tree
Showing 24 changed files with 434 additions and 362 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/components/PipelineRun/PipelineRun.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export /* istanbul ignore next */ class PipelineRunContainer extends Component {
onViewChange,
pipelineRun,
pod,
runaction,
runActions,
selectedStepId,
selectedTaskId,
showIO,
Expand Down Expand Up @@ -349,7 +349,7 @@ export /* istanbul ignore next */ class PipelineRunContainer extends Component {
status={pipelineRunStatus}
triggerHeader={triggerHeader}
>
{runaction}
{runActions}
</RunHeader>
{customNotification}
{taskRuns.length > 0 && (
Expand Down
139 changes: 0 additions & 139 deletions packages/components/src/components/RunAction/RunAction.js

This file was deleted.

16 changes: 0 additions & 16 deletions packages/components/src/components/RunAction/RunAction.scss

This file was deleted.

79 changes: 0 additions & 79 deletions packages/components/src/components/RunAction/RunAction.test.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages/components/src/components/RunAction/index.js

This file was deleted.

3 changes: 2 additions & 1 deletion packages/components/src/components/RunHeader/RunHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class RunHeader extends Component {

render() {
const {
children,
icon,
intl,
lastTransitionTime,
Expand Down Expand Up @@ -81,7 +82,7 @@ class RunHeader extends Component {
)
: null}
</span>
{this.props.children}
{children}
</h1>
<div className="tkn--status">
<span className="tkn--status-label">{reason}</span>
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/components/RunHeader/RunHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ header.tkn--pipeline-run-header {
white-space: nowrap;
}

.tkn--runaction-btn {
.tkn--actions-dropdown {
margin-left: auto;
margin-right: 0.5rem;
}
}

Expand Down
1 change: 0 additions & 1 deletion packages/components/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export { default as PipelineResources } from './PipelineResources';
export { default as PipelineRun } from './PipelineRun';
export { default as PipelineRuns } from './PipelineRuns';
export { default as Portal } from './Portal';
export { default as RunAction } from './RunAction';
export { default as ResourceDetails } from './ResourceDetails';
export { default as ResourceTable } from './ResourceTable';
export { default as RunHeader } from './RunHeader';
Expand Down
4 changes: 4 additions & 0 deletions packages/utils/src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export const pipelineRunStatuses = {
PENDING: 'PipelineRunPending'
};

export const preferences = {
CANCEL_STATUS_KEY: 'tkn-pipelinerun-cancel-status'
};

export const queryParams = {
PIPELINE_TASK: 'pipelineTask',
RETRY: 'retry',
Expand Down
Loading

0 comments on commit 911d70c

Please sign in to comment.