[ARVADOS-WORKBENCH2] updated: 2.1.0-137-g174b16ce

Git user git at public.arvados.org
Tue Jan 5 20:45:39 UTC 2021


Summary of changes:
 src/store/collections/collection-info-actions.ts   |  4 +-
 .../webdav-s3-dialog/webdav-s3-dialog.tsx          | 69 ++++++++++++++--------
 2 files changed, 49 insertions(+), 24 deletions(-)

       via  174b16ceaab670db4e903c4e9eb544f374a19dd0 (commit)
      from  27d2ca4c2691cad55993f25a4427d48e86ec6166 (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 174b16ceaab670db4e903c4e9eb544f374a19dd0
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue Jan 5 15:44:08 2021 -0500

    16622: Use /by_id/, add Cyberduck and MacOS to popup.
    
    Correctly select between collections and download endpoints depending
    on whether wildcard DNS is configured.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/store/collections/collection-info-actions.ts b/src/store/collections/collection-info-actions.ts
index 1509206d..5b7154e2 100644
--- a/src/store/collections/collection-info-actions.ts
+++ b/src/store/collections/collection-info-actions.ts
@@ -13,6 +13,7 @@ export interface WebDavS3InfoDialogData {
     uuid: string;
     token: string;
     downloadUrl: string;
+    collectionsUrl: string;
     homeCluster: string;
     localCluster: string;
     username: string;
@@ -27,7 +28,8 @@ export const openWebDavS3InfoDialog = (uuid: string, activeTab?: number) =>
             data: {
                 title: 'Access Collection using WebDAV or S3',
                 token: getState().auth.apiToken,
-                downloadUrl: getState().auth.config.keepWebInlineServiceUrl,
+                downloadUrl: getState().auth.config.keepWebServiceUrl,
+                collectionsUrl: getState().auth.config.keepWebInlineServiceUrl,
                 homeCluster: getState().auth.homeCluster,
                 localCluster: getState().auth.localCluster,
                 username: getState().auth.user!.username,
diff --git a/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx b/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx
index 2c92e28d..cd388848 100644
--- a/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx
+++ b/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx
@@ -47,16 +47,23 @@ export const WebDavS3InfoDialog = compose(
     (props: WithDialogProps<WebDavS3InfoDialogData> & WithStyles<CssRules>) => {
         if (!props.data.downloadUrl) { return null; }
 
-        const keepwebUrl = props.data.downloadUrl.replace(/\/\*(--[^.]+)?\./, "/");
+        let winDav;
+        let cyberDav;
 
-        const winDav = new URL(props.data.downloadUrl.replace("*", props.data.uuid));
+        if (props.data.collectionsUrl.indexOf("*") > -1) {
+            const withuuid = props.data.collectionsUrl.replace("*", props.data.uuid);
+            winDav = new URL(withuuid);
+            cyberDav = new URL(withuuid);
+        } else {
+            winDav = new URL(props.data.downloadUrl);
+            cyberDav = new URL(props.data.downloadUrl);
+            winDav.pathname = `/by_id/${props.data.uuid}/`;
+            cyberDav.pathname = `/by_id/${props.data.uuid}/`;
+        }
 
-        const gnomeDav = new URL(keepwebUrl);
-        gnomeDav.username = props.data.username;
-        gnomeDav.pathname = `/c=${props.data.uuid}/`;
-        gnomeDav.protocol = "davs:";
+        cyberDav.protocol = { "http:": "dav:", "https:": "davs:" }[cyberDav.protocol];
 
-        const s3endpoint = new URL(keepwebUrl);
+        const s3endpoint = new URL(props.data.collectionsUrl.replace(/\/\*(--[^.]+)?\./, "/"));
 
         const sp = props.data.token.split("/");
         let tokenUuid;
@@ -78,17 +85,13 @@ export const WebDavS3InfoDialog = compose(
                 title={`WebDAV and S3`} />
             <div className={props.classes.details} >
                 <Tabs value={props.data.activeTab} onChange={props.data.setActiveTab}>
-                    <Tab key="windows" label="Add a Network Location in Windows" />
-                    <Tab key="gnome" label="Connect to Server in GNOME" />
+                    <Tab key="cyberduck" label="Cyberduck/Mountain Duck or Gnome Files" />
+                    <Tab key="windows" label="Windows or MacOS" />
                     <Tab key="s3" label="Using an S3 client" />
                 </Tabs>
 
-                <TabPanel index={0} value={props.data.activeTab}>
-                    <ol>
-                        <li>Open File Explorer</li>
-                        <li>Click on "This PC", then go to Computer → Add a Network Location</li>
-                        <li>Click Next, then choose "Add a custom network location", then click Next</li>
-                    </ol>
+                <TabPanel index={1} value={props.data.activeTab}>
+                    <h2>Settings</h2>
 
                     <DetailsAttribute
                         label='Internet address'
@@ -104,24 +107,44 @@ export const WebDavS3InfoDialog = compose(
                         label='Password'
                         value={props.data.token}
                         copyValue={props.data.token} />
-                </TabPanel>
 
-                <TabPanel index={1} value={props.data.activeTab}>
+                    <h3>Windows</h3>
                     <ol>
-                        <li>Open Files</li>
-                        <li>Select +Other Locations</li>
-                        <li>Connect to Server → Enter server address</li>
+                        <li>Open File Explorer</li>
+                        <li>Click on "This PC", then go to Computer → Add a Network Location</li>
+                        <li>Click Next, then choose "Add a custom network location", then click Next</li>
                     </ol>
 
+                    <h3>MacOS</h3>
+                    <ol>
+                        <li>Open Finder</li>
+                        <li>Click Go → Connect to server</li>
+                    </ol>
+                </TabPanel>
+
+                <TabPanel index={0} value={props.data.activeTab}>
                     <DetailsAttribute
-                        label='Server address'
-                        value={gnomeDav.toString()}
-                        copyValue={gnomeDav.toString()} />
+                        label='Server'
+                        value={<a href={cyberDav.toString()}>{cyberDav.toString()}</a>}
+                        copyValue={cyberDav.toString()} />
+
+                    <DetailsAttribute
+                        label='Username'
+                        value={props.data.username}
+                        copyValue={props.data.username} />
 
                     <DetailsAttribute
                         label='Password'
                         value={props.data.token}
                         copyValue={props.data.token} />
+
+                    <h3>Gnome</h3>
+                    <ol>
+                        <li>Open Files</li>
+                        <li>Select +Other Locations</li>
+                        <li>Connect to Server → Enter server address</li>
+                    </ol>
+
                 </TabPanel>
 
                 <TabPanel index={2} value={props.data.activeTab}>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list