17415: Added path for ip based hostnames
[arvados-workbench2.git] / src / store / collections / collection-info-actions.ts
index d874c322d068a4d9f3d2b779e2da1cb39b435e33..5aa1cf804666d68bb85b84c8868e4dfbc9144a3a 100644 (file)
@@ -7,6 +7,7 @@ import { RootState } from "~/store/store";
 import { ServiceRepository } from "~/services/services";
 import { dialogActions } from '~/store/dialog/dialog-actions';
 import { getNewExtraToken } from "../auth/auth-action";
+import { CollectionResource } from "~/models/collection";
 
 export const COLLECTION_WEBDAV_S3_DIALOG_NAME = 'collectionWebdavS3Dialog';
 
@@ -18,7 +19,7 @@ export interface WebDavS3InfoDialogData {
     localCluster: string;
     username: string;
     activeTab: number;
-    collectionName?: string;
+    collectionName: string;
     setActiveTab: (event: any, tabNr: number) => void;
 }
 
@@ -35,7 +36,7 @@ export const openWebDavS3InfoDialog = (uuid: string, activeTab?: number) =>
                 localCluster: getState().auth.localCluster,
                 username: getState().auth.user!.username,
                 activeTab: activeTab || 0,
-                collectionName: (getState().collectionPanel.item || {} as any).name,
+                collectionName: (getState().resources[uuid] as CollectionResource).name,
                 setActiveTab: (event: any, tabNr: number) => dispatch<any>(openWebDavS3InfoDialog(uuid, tabNr)),
                 uuid
             }