You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by yt...@apache.org on 2021/10/28 09:55:38 UTC

[incubator-datalab] 01/01: [DATALAB-2568] removed the file name when copy path to the selected folder via bucket browser

This is an automated email from the ASF dual-hosted git repository.

ytykhun pushed a commit to branch DATALAB-2568
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 01d311ddfc091c82a7a177475f052e1b18d2677e
Author: Yurii Tykhun <ty...@gmail.com>
AuthorDate: Thu Oct 28 12:54:42 2021 +0300

    [DATALAB-2568] removed the file name when copy path to the selected folder via bucket browser
---
 .../src/app/resources/bucket-browser/bucket-browser.component.ts  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.ts
index 507ac2a..6e933c8 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/bucket-browser/bucket-browser.component.ts
@@ -460,14 +460,16 @@ export class BucketBrowserComponent implements OnInit, OnDestroy {
 
   public copyPath(): void {
     const selected = this.folderItems.filter(item => item.isSelected || item.isFolderSelected)[0];
-    const cloud = this.getCloud();
+    const pathToItem = `${this.pathInsideBucket}${selected.item}${selected.isFolderSelected ? '/' : ''}`;
+    
+    const cloud = 'azure';//this.getCloud();
     const protocol = HelpUtils.getBucketProtocol(cloud);
     if (cloud !== 'azure') {
-      CopyPathUtils.copyPath(protocol + selected.object.bucket + '/' + selected.object.object);
+      CopyPathUtils.copyPath(protocol + selected.object.bucket + '/' + pathToItem);
     } else {
       const bucketName = selected.object.bucket;
       const accountName = this.bucketName.replace(selected.object.bucket, '').slice(0, -1);
-      const azureBucket = bucketName + '@' + accountName + '.blob.core.windows.net' + '/' + selected.object.object;
+      const azureBucket = bucketName + '@' + accountName + '.blob.core.windows.net' + '/' + pathToItem;
       CopyPathUtils.copyPath(protocol + azureBucket);
     }
     this.clearSelection();

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org