|
|
@@ -8,6 +8,7 @@ import urlForObject from 'url-for-object'; |
|
|
|
import detectHashes from 'detect-hashes';
|
|
|
|
import WBCommonFields from 'wb-common-fields';
|
|
|
|
import WBContainerRequestFields from 'wb-container-request-fields';
|
|
|
|
import WBProcessListing from 'wb-process-listing';
|
|
|
|
|
|
|
|
class WBProcessView extends Component {
|
|
|
|
constructor(...args) {
|
|
|
@@ -15,7 +16,13 @@ class WBProcessView extends Component { |
|
|
|
this.state.objectUrls = [];
|
|
|
|
}
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
getUrl(props) {
|
|
|
|
const page = ('page' in props ? props.page : this.props.page);
|
|
|
|
return ('/process/' + this.props.uuid +
|
|
|
|
(page ? '/' + page : ''));
|
|
|
|
}
|
|
|
|
|
|
|
|
fetchData() {
|
|
|
|
let { arvHost, arvToken } = this.props.app.state;
|
|
|
|
let prom = makeArvadosRequest(arvHost, arvToken,
|
|
|
|
'/arvados/v1/container_requests/' + this.props.uuid);
|
|
|
@@ -74,11 +81,25 @@ class WBProcessView extends Component { |
|
|
|
let objDict = {};
|
|
|
|
objects.map(o => (objDict[o['uuid']] = o));
|
|
|
|
let urls = objects.map(o => urlForObject(o));
|
|
|
|
this.setState({ 'objectUrls': urls });
|
|
|
|
this.setState({
|
|
|
|
'objectUrls': urls,
|
|
|
|
'request': req,
|
|
|
|
'container': cont
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
render({ app, uuid }, { objectUrls }) {
|
|
|
|
componentDidMount() {
|
|
|
|
this.fetchData();
|
|
|
|
}
|
|
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
|
this.props = nextProps;
|
|
|
|
this.setState({ 'objectUrls': [], 'request': null, 'container': null });
|
|
|
|
this.fetchData();
|
|
|
|
}
|
|
|
|
|
|
|
|
render({ app, uuid, page }, { objectUrls, container }) {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<WBNavbarCommon app={ app } />
|
|
|
@@ -95,6 +116,15 @@ class WBProcessView extends Component { |
|
|
|
<h2>Container Request Fields</h2>
|
|
|
|
<WBContainerRequestFields app={ app } uuid={ uuid } />
|
|
|
|
|
|
|
|
{ container ? ([
|
|
|
|
<h2>Children</h2>,
|
|
|
|
<WBProcessListing appState={ app.state }
|
|
|
|
requestingContainerUuid={ container.uuid }
|
|
|
|
itemsPerPage="20"
|
|
|
|
activePage={ Number(page || 0) }
|
|
|
|
getPageUrl={ page => this.getUrl({ page }) } />
|
|
|
|
]) : null }
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<a href="/browse">Click here</a>
|
|
|
|
</div>
|
|
|
|