|
@@ -117,21 +117,32 @@ class WBProcessDashboard extends Component { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
componentDidMount() {
|
|
|
this.fetchData();
|
|
|
|
|
|
|
|
|
if (!this.props.lazy)
|
|
|
|
|
|
this.fetchData();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
if (nextProps.parentProcessUuid === this.props.parentProcessUuid)
|
|
|
if (nextProps.parentProcessUuid === this.props.parentProcessUuid)
|
|
|
return;
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if (this.props.lazy) {
|
|
|
|
|
|
this.setState({ rows: Array(5).fill(Array(6).fill('-')) });
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
this.props = nextProps;
|
|
|
this.props = nextProps;
|
|
|
this.fetchData();
|
|
|
this.fetchData();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
render({}, { rows }) {
|
|
|
|
|
|
|
|
|
render({ lazy }, { rows }) {
|
|
|
return (
|
|
|
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>
|
|
|
);
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|