[ARVADOS-WORKBENCH2] updated: 1.3.1-360-g9e101d4a
Git user
git at public.curoverse.com
Mon Feb 18 08:34:12 EST 2019
Summary of changes:
src/services/collection-service/collection-service.ts | 17 +++++++++++------
.../collections/collection-partial-copy-actions.ts | 4 ++--
2 files changed, 13 insertions(+), 8 deletions(-)
via 9e101d4abed0c656e6549ffbf4787627912f32f1 (commit)
from 00411aff40e7eedb3e793db94d18e7780a572741 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 9e101d4abed0c656e6549ffbf4787627912f32f1
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Mon Feb 18 14:33:50 2019 +0100
refs #14709-create-a-collection-from-selected-is-not-doing-what-it-should-do
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/services/collection-service/collection-service.ts b/src/services/collection-service/collection-service.ts
index 84b2cc1c..f7e25541 100644
--- a/src/services/collection-service/collection-service.ts
+++ b/src/services/collection-service/collection-service.ts
@@ -32,7 +32,12 @@ export class CollectionService extends TrashableResourceService<CollectionResour
async deleteFiles(collectionUuid: string, filePaths: string[]) {
for (const path of filePaths) {
- await this.webdavClient.delete(`c=${collectionUuid}${path}`);
+ const splittedPath = path.split('/');
+ if (collectionUuid) {
+ await this.webdavClient.delete(`c=${collectionUuid}/${splittedPath[1]}`);
+ } else {
+ await this.webdavClient.delete(`c=${collectionUuid}${path}`);
+ }
}
}
@@ -54,11 +59,11 @@ export class CollectionService extends TrashableResourceService<CollectionResour
const baseUrl = this.webdavClient.defaults.baseURL.endsWith('/')
? this.webdavClient.defaults.baseURL.slice(0, -1)
: this.webdavClient.defaults.baseURL;
- const apiToken = this.authService.getApiToken();
- const splittedApiToken = apiToken ? apiToken.split('/') : [];
- const userApiToken = `/t=${splittedApiToken[2]}/`;
- const splittedPrevFileUrl = file.url.split('/');
- const url = `${baseUrl}/${splittedPrevFileUrl[1]}${userApiToken}${splittedPrevFileUrl[2]}`;
+ const apiToken = this.authService.getApiToken();
+ const splittedApiToken = apiToken ? apiToken.split('/') : [];
+ const userApiToken = `/t=${splittedApiToken[2]}/`;
+ const splittedPrevFileUrl = file.url.split('/');
+ const url = `${baseUrl}/${splittedPrevFileUrl[1]}${userApiToken}${splittedPrevFileUrl[2]}`;
return {
...file,
url
diff --git a/src/store/collections/collection-partial-copy-actions.ts b/src/store/collections/collection-partial-copy-actions.ts
index 2597f8d2..9d0515ab 100644
--- a/src/store/collections/collection-partial-copy-actions.ts
+++ b/src/store/collections/collection-partial-copy-actions.ts
@@ -48,11 +48,11 @@ export const copyCollectionPartial = ({ name, description, projectUuid }: Collec
dispatch(progressIndicatorActions.START_WORKING(COLLECTION_PARTIAL_COPY_FORM_NAME));
const collection = await services.collectionService.get(currentCollection.uuid);
const collectionCopy = {
- ...collection,
name,
description,
ownerUuid: projectUuid,
- uuid: undefined
+ uuid: undefined,
+ manifestText: collection.manifestText,
};
const newCollection = await services.collectionService.create(collectionCopy);
const paths = filterCollectionFilesBySelection(state.collectionPanelFiles, false).map(file => file.id);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list