|
|
@@ -3,12 +3,18 @@ import makeArvadosRequest from 'make-arvados-request'; |
|
|
|
|
|
|
|
class WBProcessState extends Component {
|
|
|
|
componentDidMount() {
|
|
|
|
this.fetchData();
|
|
|
|
if (!this.props.lazy)
|
|
|
|
this.fetchData();
|
|
|
|
}
|
|
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
|
this.props = nextProps;
|
|
|
|
this.fetchData();
|
|
|
|
if (this.props.lazy) {
|
|
|
|
this.setState({ container: null, apiError: null });
|
|
|
|
|
|
|
|
} else {
|
|
|
|
this.props = nextProps;
|
|
|
|
this.fetchData();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fetchData() {
|
|
|
@@ -24,7 +30,7 @@ class WBProcessState extends Component { |
|
|
|
prom = prom.catch(() => this.setState({ 'apiError': 'Failed to fetch container' }));
|
|
|
|
}
|
|
|
|
|
|
|
|
render({ process }, { container, apiError }) {
|
|
|
|
render({ process, lazy }, { container, apiError }) {
|
|
|
|
const runtimeStatus = container ? container.runtime_status : null;
|
|
|
|
const error = runtimeStatus ? runtimeStatus.error : null;
|
|
|
|
const warning = runtimeStatus ? runtimeStatus.warning : null;
|
|
|
@@ -38,7 +44,11 @@ class WBProcessState extends Component { |
|
|
|
{ error ? [" / ", <a href={ '/container/' + container.uuid }
|
|
|
|
title={ error }>E</a> ] : null }
|
|
|
|
{ warning ? [ " / ", <a href={ '/container/' + container.uuid }
|
|
|
|
title={ warning }>W</a> ] : null }
|
|
|
|
title={ warning }>W</a> ] : null } { lazy && !container && !apiError ? (
|
|
|
|
<a href="#" title="Look up" onclick={ e => { e.preventDefault(); this.fetchData(); } }>
|
|
|
|
<i class="fas fa-search"></i>
|
|
|
|
</a>
|
|
|
|
) : null }
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|