From 0ffc4f3c75017077735ed692c1b6974b9acb7adf Mon Sep 17 00:00:00 2001 From: mstier-nflx Date: Mon, 10 Sep 2018 09:18:11 -0700 Subject: [PATCH] added goto parent button to workflow details page when parent exists --- .../workflow/executions/WorkflowDetails.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ui/src/components/workflow/executions/WorkflowDetails.js b/ui/src/components/workflow/executions/WorkflowDetails.js index 233774a3f3..e180db0893 100644 --- a/ui/src/components/workflow/executions/WorkflowDetails.js +++ b/ui/src/components/workflow/executions/WorkflowDetails.js @@ -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'; @@ -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; }); @@ -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) { @@ -131,6 +137,13 @@ class WorkflowDetails extends React.Component { return a.seq - b.seq; }); + let parentWorkflowButton = ""; + if(wf.parentWorkflowId){ + parentWorkflowButton = ; + } + return (

@@ -142,6 +155,9 @@ class WorkflowDetails extends React.Component { + + {parentWorkflowButton} +