[ARVADOS-WORKBENCH2] updated: 1.1.4-590-gb0462bb

Git user git at public.curoverse.com
Mon Aug 13 08:04:13 EDT 2018


Summary of changes:
 src/services/collection-service/collection-service.ts | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

       via  b0462bb88a89a78a8ed2b161d8dd7562d9ca28fa (commit)
       via  ea4ad5a3f95aa8c6fa36e4f02b50e19de3e7b8c4 (commit)
      from  2808fb2da98a36cf6cf30a215e76aac88146af28 (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 b0462bb88a89a78a8ed2b161d8dd7562d9ca28fa
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Mon Aug 13 14:03:57 2018 +0200

    Name hardcoded values
    
    Feature #13990
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/services/collection-service/collection-service.ts b/src/services/collection-service/collection-service.ts
index 4bb93a4..8cf515c 100644
--- a/src/services/collection-service/collection-service.ts
+++ b/src/services/collection-service/collection-service.ts
@@ -47,6 +47,7 @@ export class CollectionService extends CommonResourceService<CollectionResource>
     }
 
     extractFilesData(document: Document) {
+        const collectionUrlPrefix = /\/c=[0-9a-zA-Z\-]*/;
         return Array
             .from(document.getElementsByTagName('D:response'))
             .slice(1) // omit first element which is collection itself
@@ -54,7 +55,10 @@ export class CollectionService extends CommonResourceService<CollectionResource>
                 const name = getTagValue(element, 'D:displayname', '');
                 const size = parseInt(getTagValue(element, 'D:getcontentlength', '0'), 10);
                 const pathname = getTagValue(element, 'D:href', '');
-                const directory = pathname && pathname.replace(/\/c=[0-9a-zA-Z\-]*/, '').replace(`/${name || ''}`, '');
+                const nameSuffix = `/${name || ''}`;
+                const directory = pathname
+                    .replace(collectionUrlPrefix, '')
+                    .replace(nameSuffix, '');
                 const href = this.webdavClient.defaults.baseURL + pathname + '?api_token=' + this.authService.getApiToken();
 
                 const data = {

commit ea4ad5a3f95aa8c6fa36e4f02b50e19de3e7b8c4
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Mon Aug 13 13:59:06 2018 +0200

    Remove unused type annotation
    
    Feature #13990
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/services/collection-service/collection-service.ts b/src/services/collection-service/collection-service.ts
index 7e4d804..4bb93a4 100644
--- a/src/services/collection-service/collection-service.ts
+++ b/src/services/collection-service/collection-service.ts
@@ -52,7 +52,7 @@ export class CollectionService extends CommonResourceService<CollectionResource>
             .slice(1) // omit first element which is collection itself
             .map(element => {
                 const name = getTagValue(element, 'D:displayname', '');
-                const size = parseInt(getTagValue(element, 'D:getcontentlength', '0') as string, 10);
+                const size = parseInt(getTagValue(element, 'D:getcontentlength', '0'), 10);
                 const pathname = getTagValue(element, 'D:href', '');
                 const directory = pathname && pathname.replace(/\/c=[0-9a-zA-Z\-]*/, '').replace(`/${name || ''}`, '');
                 const href = this.webdavClient.defaults.baseURL + pathname + '?api_token=' + this.authService.getApiToken();

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list