Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 0ffc4f3

Browse files
committed
added goto parent button to workflow details page when parent exists
1 parent 854bcbc commit 0ffc4f3

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

ui/src/components/workflow/executions/WorkflowDetails.js

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import {OverlayTrigger, Button, Popover, Panel, Table} from 'react-bootstrap';
33
import {connect} from 'react-redux';
4+
import {Link} from 'react-router'
45
import {getWorkflowDetails} from '../../../actions/WorkflowActions';
56
import WorkflowAction from './WorkflowAction';
67
import WorkflowMetaDia from '../WorkflowMetaDia';
@@ -98,7 +99,6 @@ function showFailure(wf) {
9899
class WorkflowDetails extends React.Component {
99100
constructor(props) {
100101
super(props);
101-
102102
http.get('/api/sys/').then((data) => {
103103
window.sys = data.sys;
104104
});
@@ -118,6 +118,12 @@ class WorkflowDetails extends React.Component {
118118
return true;
119119
}
120120

121+
gotoParentWorkflow = ()=> {
122+
history.push({
123+
pathname:"/workflow/id/" + this.props.data.parentWorkflowId
124+
})
125+
}
126+
121127
render() {
122128
let wf = this.props.data;
123129
if (wf == null) {
@@ -131,6 +137,13 @@ class WorkflowDetails extends React.Component {
131137
return a.seq - b.seq;
132138
});
133139

140+
let parentWorkflowButton = "";
141+
if(wf.parentWorkflowId){
142+
parentWorkflowButton = <Link to={"/workflow/id/" + wf.parentWorkflowId}><Button bsStyle="default" bsSize="xsmall">
143+
Parent
144+
</Button></Link>;
145+
}
146+
134147
return (
135148
<div className="ui-content">
136149
<h4>
@@ -142,6 +155,9 @@ class WorkflowDetails extends React.Component {
142155
<span>
143156
<WorkflowAction workflowStatus={wf.status} workflowId={wf.workflowId}/>
144157
</span>
158+
<span>
159+
{parentWorkflowButton}
160+
</span>
145161
</h4>
146162
<br/><br/>
147163
<Table responsive={true} striped={false} hover={false} condensed={false} bordered={true}>

0 commit comments

Comments
 (0)