19177: Hides 'Sharing URLs' tab from Sharing dialog when configured to do so.
[arvados-workbench2.git] / src / views-components / webdav-s3-dialog / webdav-s3-dialog.tsx
index 7255e756ce2919fbd8c17b5db96507234e25e0de..8e9edac11accccfe710877b44c30ab4400c87e45 100644 (file)
@@ -148,6 +148,7 @@ export const WebDavS3InfoDialog = compose(
         }
 
         const wgetCommand = `wget --http-user=${props.data.username} --http-passwd=${props.data.token} --mirror --no-parent --no-host --cut-dirs=0 ${winDav.toString()}`;
+        const curlCommand = `curl -O -u ${props.data.username}:${props.data.token} ${winDav.toString()}`;
 
         return <Dialog
             open={props.open}
@@ -227,7 +228,7 @@ export const WebDavS3InfoDialog = compose(
                         Download Cyber/Mountain Duck bookmark
                     </Button>
 
-                    <h3>Gnome</h3>
+                    <h3>GNOME</h3>
                     <ol>
                         <li>Open Files</li>
                         <li>Select +Other Locations</li>
@@ -270,14 +271,17 @@ export const WebDavS3InfoDialog = compose(
                     </DetailsAttribute>
 
                     <DetailsAttribute
-                        label='Username'
-                        value={props.data.username}
-                        copyValue={props.data.username} />
+                        label='Curl command'
+                        copyValue={curlCommand}
+                        classValue={props.classes.detailsAttrValWithCode}>
+                        <DefaultCodeSnippet
+                            lines={[curlCommand]} />
+                    </DetailsAttribute>
 
-                    <DetailsAttribute
-                        label='Password'
-                        value={props.data.token}
-                        copyValue={props.data.token} />
+                    <p>
+                      Note: This curl command downloads single files.
+                      Append the desired filename to the end of the URL.
+                    </p>
 
                 </TabPanel>