Skip to content

Commit

Permalink
Merge pull request #263 from Kitware/wf-fixes
Browse files Browse the repository at this point in the history
fix(wf): buttonbar logic, wrong taskflowid
  • Loading branch information
TristanWright committed Mar 21, 2016
2 parents 9fbc834 + 7bb43e9 commit 912988a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
13 changes: 7 additions & 6 deletions src/workflows/pyfr/common/steps/Visualization/View/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,21 @@ export default React.createClass({
},

componentWillMount() {
const taskflowId = this.props.simulation.steps.Simulation.metadata.taskflowId;
const taskflowId = this.props.simulation.steps.Visualization.metadata.taskflowId;
this.setState({ taskflowId });

this.subscription = TaskflowManager.monitorTaskflow(taskflowId, (pkt) => {
const actions = [];
var simNeedsUpdate = false;
var allComplete = pkt.jobs.every(job => job.status === 'complete') && pkt.tasks.every(task => task.status === 'complete');

// some running -> rerun
// name is paraview and status is running -> visualize
if (pkt.jobs.some(job => job.name === 'paraview' && job.status === 'running')) {
actions.push(ACTIONS.visualize);
}

// jobs are still running -> terminate
if (!allComplete && (pkt.jobs.length + pkt.tasks.length) > 0) {
this.props.simulation.metadata.status = 'terminated';
actions.push(ACTIONS.terminate);
simNeedsUpdate = true;
} else if (!allComplete && (pkt.jobs.length + pkt.tasks.length) > 0) {
this.props.simulation.metadata.status = 'running';
actions.push(ACTIONS.terminate);
simNeedsUpdate = true;
Expand Down
9 changes: 8 additions & 1 deletion style/Theme.mcss
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
.colorLightGrey {
color: #eee;
}
.colorGrey {
.colorBlue {
color: #18e;
}
.colorGreen {
color: #4ecdc4;
}
.colorYellow {
color: #fff223;
}
.colorLightGreen {
color: #c8f363;
}
Expand Down Expand Up @@ -132,24 +135,28 @@
composes: fa from 'font-awesome/css/font-awesome.css';
composes: fa-fw from 'font-awesome/css/font-awesome.css';
composes: fa-rocket from 'font-awesome/css/font-awesome.css';
composes: colorGreen;
}

.simulationErrorIcon {
composes: fa from 'font-awesome/css/font-awesome.css';
composes: fa-fw from 'font-awesome/css/font-awesome.css';
composes: fa-warning from 'font-awesome/css/font-awesome.css';
composes: colorYellow;
}

.simulationTerminateIcon {
composes: fa from 'font-awesome/css/font-awesome.css';
composes: fa-fw from 'font-awesome/css/font-awesome.css';
composes: fa-ban from 'font-awesome/css/font-awesome.css';
composes: colorRed;
}

.simulationDoneIcon {
composes: fa from 'font-awesome/css/font-awesome.css';
composes: fa-fw from 'font-awesome/css/font-awesome.css';
composes: fa-database from 'font-awesome/css/font-awesome.css';
composes: colorBlue;
}

/* breadcrumb icons */
Expand Down

0 comments on commit 912988a

Please sign in to comment.