|
@@ -8,6 +8,7 @@ import urlForObject from 'url-for-object'; |
|
|
import detectHashes from 'detect-hashes';
|
|
|
import detectHashes from 'detect-hashes';
|
|
|
import WBCommonFields from 'wb-common-fields';
|
|
|
import WBCommonFields from 'wb-common-fields';
|
|
|
import WBContainerRequestFields from 'wb-container-request-fields';
|
|
|
import WBContainerRequestFields from 'wb-container-request-fields';
|
|
|
|
|
|
import WBProcessListing from 'wb-process-listing';
|
|
|
|
|
|
|
|
|
class WBProcessView extends Component {
|
|
|
class WBProcessView extends Component {
|
|
|
constructor(...args) {
|
|
|
constructor(...args) {
|
|
@@ -15,7 +16,13 @@ class WBProcessView extends Component { |
|
|
this.state.objectUrls = [];
|
|
|
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 { arvHost, arvToken } = this.props.app.state;
|
|
|
let prom = makeArvadosRequest(arvHost, arvToken,
|
|
|
let prom = makeArvadosRequest(arvHost, arvToken,
|
|
|
'/arvados/v1/container_requests/' + this.props.uuid);
|
|
|
'/arvados/v1/container_requests/' + this.props.uuid);
|
|
@@ -74,11 +81,25 @@ class WBProcessView extends Component { |
|
|
let objDict = {};
|
|
|
let objDict = {};
|
|
|
objects.map(o => (objDict[o['uuid']] = o));
|
|
|
objects.map(o => (objDict[o['uuid']] = o));
|
|
|
let urls = objects.map(o => urlForObject(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 (
|
|
|
return (
|
|
|
<div>
|
|
|
<div>
|
|
|
<WBNavbarCommon app={ app } />
|
|
|
<WBNavbarCommon app={ app } />
|
|
@@ -95,6 +116,15 @@ class WBProcessView extends Component { |
|
|
<h2>Container Request Fields</h2>
|
|
|
<h2>Container Request Fields</h2>
|
|
|
<WBContainerRequestFields app={ app } uuid={ uuid } />
|
|
|
<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>
|
|
|
<div>
|
|
|
<a href="/browse">Click here</a>
|
|
|
<a href="/browse">Click here</a>
|
|
|
</div>
|
|
|
</div>
|
|
|