|
|
@@ -5,6 +5,7 @@ import makeArvadosRequest from 'make-arvados-request'; |
|
|
|
import detectUuids from 'detect-uuids';
|
|
|
|
import arvadosTypeName from 'arvados-type-name';
|
|
|
|
import urlForObject from 'url-for-object';
|
|
|
|
import detectHashes from 'detect-hashes';
|
|
|
|
|
|
|
|
class WBProcessView extends Component {
|
|
|
|
constructor(...args) {
|
|
|
@@ -29,7 +30,24 @@ class WBProcessView extends Component { |
|
|
|
});
|
|
|
|
//prom = prom.then(xhr => (cont = xhr.response));
|
|
|
|
prom = prom.then(() => {
|
|
|
|
let hashes = detectHashes([ req, cont ]);
|
|
|
|
let filters = [
|
|
|
|
[ 'portable_data_hash', 'in', hashes ]
|
|
|
|
];
|
|
|
|
return makeArvadosRequest(arvHost, arvToken,
|
|
|
|
'/arvados/v1/collections?filters=' +
|
|
|
|
encodeURIComponent(JSON.stringify(filters)));
|
|
|
|
});
|
|
|
|
prom = prom.then(xhr => {
|
|
|
|
let colUuids = xhr.response['items'].map(item => item.uuid);
|
|
|
|
let uuids = detectUuids([ req, cont ]);
|
|
|
|
let dict = {};
|
|
|
|
colUuids.map(u => (dict[u] = true));
|
|
|
|
uuids.map(u => (dict[u] = true));
|
|
|
|
return Object.keys(dict);
|
|
|
|
});
|
|
|
|
prom = prom.then(uuids => {
|
|
|
|
// let uuids = detectUuids([ req, cont ]);
|
|
|
|
let objectTypes = uuids.map(u => arvadosTypeName(u.split('-')[1]) + 's');
|
|
|
|
let objQueries = {};
|
|
|
|
objectTypes.map(t => (objQueries[t] = []));
|
|
|
|