19294: Use c= URLs instead of by_id URLs when wildcard isn't available 19294-wb2-webdav-url
authorPeter Amstutz <peter.amstutz@curii.com>
Fri, 10 Feb 2023 16:12:13 +0000 (11:12 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Fri, 10 Feb 2023 16:12:13 +0000 (11:12 -0500)
Because by_id is currently read-only.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

src/views-components/webdav-s3-dialog/webdav-s3-dialog.test.tsx
src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx

index ec0a9c8a588d9ab971bc2a3b00564c85b647f4b0..d654f6edab41f524a2020079f6e6b7d8841b98e5 100644 (file)
@@ -64,7 +64,7 @@ describe('WebDavS3InfoDialog', () => {
         );
 
         // then
-        expect(wrapper.text()).toContain("davs://bobby@download.example.com/by_id/zzzzz-4zz18-b1f8tbldjrm8885");
+        expect(wrapper.text()).toContain("davs://bobby@download.example.com/c=zzzzz-4zz18-b1f8tbldjrm8885");
     });
 
     it('render win/mac tab', () => {
@@ -79,7 +79,7 @@ describe('WebDavS3InfoDialog', () => {
         );
 
         // then
-        expect(wrapper.text()).toContain("https://download.example.com/by_id/zzzzz-4zz18-b1f8tbldjrm8885");
+        expect(wrapper.text()).toContain("https://download.example.com/c=zzzzz-4zz18-b1f8tbldjrm8885");
     });
 
     it('render s3 tab with federated token', () => {
index 8e9edac11accccfe710877b44c30ab4400c87e45..a32044a711ef36a70820596ceb509d5a976665e9 100644 (file)
@@ -79,7 +79,7 @@ const mountainduckTemplate = ({
             <key>Port</key>
             <string>${(cyberDavStr.split(':')[2] || '443').split('/')[0]}</string>
             <key>Username</key>
-            <string>${username}</string>${isValidIpAddress(collectionsUrl.replace('https://', ``).split(':')[0])?
+            <string>${username}</string>${isValidIpAddress(collectionsUrl.replace('https://', ``).split(':')[0]) ?
             `
             <key>Path</key>
             <string>/c=${uuid}</string>` : ''}
@@ -120,8 +120,8 @@ export const WebDavS3InfoDialog = compose(
         } 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}`;
+            winDav.pathname = `/c=${props.data.uuid}`;
+            cyberDav.pathname = `/c=${props.data.uuid}`;
         }
 
         cyberDav.username = props.data.username;
@@ -279,8 +279,8 @@ export const WebDavS3InfoDialog = compose(
                     </DetailsAttribute>
 
                     <p>
-                      Note: This curl command downloads single files.
-                      Append the desired filename to the end of the URL.
+                        Note: This curl command downloads single files.
+                        Append the desired filename to the end of the URL.
                     </p>
 
                 </TabPanel>
@@ -292,7 +292,7 @@ export const WebDavS3InfoDialog = compose(
                     color='primary'
                     onClick={props.closeDialog}>
                     Close
-               </Button>
+                </Button>
             </DialogActions>
 
         </Dialog >;