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

Commit

Permalink
Merge pull request #760 from Netflix/feature/button-goto-parent-workflow
Browse files Browse the repository at this point in the history
added goto parent button to workflow details page when parent exists
  • Loading branch information
apanicker-nflx authored Sep 10, 2018
2 parents 55c1c4c + 0ffc4f3 commit d296361
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion ui/src/components/workflow/executions/WorkflowDetails.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import {OverlayTrigger, Button, Popover, Panel, Table} from 'react-bootstrap';
import {connect} from 'react-redux';
import {Link} from 'react-router'
import {getWorkflowDetails} from '../../../actions/WorkflowActions';
import WorkflowAction from './WorkflowAction';
import WorkflowMetaDia from '../WorkflowMetaDia';
Expand Down Expand Up @@ -98,7 +99,6 @@ function showFailure(wf) {
class WorkflowDetails extends React.Component {
constructor(props) {
super(props);

http.get('/api/sys/').then((data) => {
window.sys = data.sys;
});
Expand All @@ -118,6 +118,12 @@ class WorkflowDetails extends React.Component {
return true;
}

gotoParentWorkflow = ()=> {
history.push({
pathname:"/workflow/id/" + this.props.data.parentWorkflowId
})
}

render() {
let wf = this.props.data;
if (wf == null) {
Expand All @@ -131,6 +137,13 @@ class WorkflowDetails extends React.Component {
return a.seq - b.seq;
});

let parentWorkflowButton = "";
if(wf.parentWorkflowId){
parentWorkflowButton = <Link to={"/workflow/id/" + wf.parentWorkflowId}><Button bsStyle="default" bsSize="xsmall">
Parent
</Button></Link>;
}

return (
<div className="ui-content">
<h4>
Expand All @@ -142,6 +155,9 @@ class WorkflowDetails extends React.Component {
<span>
<WorkflowAction workflowStatus={wf.status} workflowId={wf.workflowId}/>
</span>
<span>
{parentWorkflowButton}
</span>
</h4>
<br/><br/>
<Table responsive={true} striped={false} hover={false} condensed={false} bordered={true}>
Expand Down

0 comments on commit d296361

Please sign in to comment.