IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
ソースを参照

Automatic subproject creation for processes seems to work.

pull/1/head
コミット
2c95865e2e
1個のファイルの変更17行の追加10行の削除
  1. +17
    -10
      frontend/src/js/arvados/process/wb-submit-container-request.js

+ 17
- 10
frontend/src/js/arvados/process/wb-submit-container-request.js ファイルの表示

@@ -23,7 +23,7 @@ function wbParseWorkflowInputs(workflowDefinition, userInputs, errors) {
function ensureSubProject(arvHost, arvToken, projectUuid) {
const filters = [
[ 'type', '=', 'project' ],
[ 'group_class', '=', 'project' ],
[ 'owner_uuid', '=', projectUuid ],
[ 'properties.type', '=', 'daily_process_subproject_container' ]
];
@@ -36,13 +36,14 @@ function ensureSubProject(arvHost, arvToken, projectUuid) {
let prom_1 = new Promise(accept => accept());
prom_1 = prom_1.then(() => makeArvadosRequest(arvHost, arvToken,
'/arvados/v1/groups', { method: 'POST',
data: { owner_uuid: projectUuid,
data: JSON.stringify({ owner_uuid: projectUuid,
group_class: 'project',
name: 'Container for daily sub-projects for processes',
properties: { type: 'daily_process_subproject_container' } } }));
properties: { type: 'daily_process_subproject_container' } }) }));
prom_1 = prom_1.then(xhr_1 => xhr_1.response.uuid);
return prom_1;
}
return xhr.items[0].uuid;
return xhr.response.items[0].uuid;
});
let date = new Date();
@@ -50,29 +51,35 @@ function ensureSubProject(arvHost, arvToken, projectUuid) {
('00' + (date.getMonth() + 1)).slice(-2) + '-' +
('00' + date.getDate()).slice(-2);
prom = prom.then(containerUuid => {
let containerUuid;
prom = prom.then(uuid => {
containerUuid = uuid;
const filters_1 = [
[ 'type', '=', 'project'],
[ 'group_class', '=', 'project'],
[ 'owner_uuid', '=', containerUuid ],
[ 'properties.type', '=', 'daily_process_subproject' ],
[ 'properties.date', '=', date ]
];
return makeArvadosRequest(arvHost, arvToken,
'/arvados/v1/groups?filters=' + encodeURIComponent(JSON.stringify(filters_1)));
});
prom = prom.then(xhr => {
if (xhr.reponse.items.length === 0) {
if (xhr.response.items.length === 0) {
let prom_1 = new Promise(accept => accept());
prom_1 = prom_1.then(() => makeArvadosRequest(arvHost, arvToken,
'/arvados/v1/groups', { method: 'POST',
data: { owner_uuid: containerUuid,
data: JSON.stringify({ owner_uuid: containerUuid,
group_class: 'project',
name: 'Daily processes sub-project for ' + date,
properties: { type: 'daily_process_subproject', date } } }));
properties: { type: 'daily_process_subproject', date } }) }));
prom_1 = prom_1.then(xhr => xhr.response.uuid);
return prom_1;
}
return xhr.items[0].uuid;
return xhr.response.items[0].uuid;
});
return prom;
}


読み込み中…
キャンセル
保存