|
|
@@ -117,21 +117,32 @@ class WBProcessDashboard extends Component { |
|
|
|
}
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
this.fetchData();
|
|
|
|
if (!this.props.lazy)
|
|
|
|
this.fetchData();
|
|
|
|
}
|
|
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
|
if (nextProps.parentProcessUuid === this.props.parentProcessUuid)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (this.props.lazy) {
|
|
|
|
this.setState({ rows: Array(5).fill(Array(6).fill('-')) });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.props = nextProps;
|
|
|
|
this.fetchData();
|
|
|
|
}
|
|
|
|
|
|
|
|
render({}, { rows }) {
|
|
|
|
render({ lazy }, { rows }) {
|
|
|
|
return (
|
|
|
|
<WBTable columns={ [ 'State', 'Pending', 'Running', 'Complete', 'Failed', 'Cancelled' ] }
|
|
|
|
rows={ rows } verticalHeader={ true } />
|
|
|
|
<div>
|
|
|
|
<WBTable columns={ [ 'State', 'Pending', 'Running', 'Complete', 'Failed', 'Cancelled' ] }
|
|
|
|
rows={ rows } verticalHeader={ true } />
|
|
|
|
{ lazy ? (
|
|
|
|
<a href="#" onclick={ e => { e.preventDefault(); this.fetchData(); } }>Refresh</a>
|
|
|
|
) : null }
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|