[ARVADOS-WORKBENCH2] updated: 1.2.0-939-g4c551ec

Git user git at public.curoverse.com
Mon Nov 26 06:01:55 EST 2018


Summary of changes:
 src/store/advanced-tab/advanced-tab.ts               | 20 ++++++++++----------
 src/store/context-menu/context-menu-actions.ts       |  6 +++---
 .../advanced-tab-dialog/advanced-tab-dialog.tsx      |  4 ++--
 .../advanced-tab-dialog/metadataTab.tsx              |  4 ++--
 .../action-sets/collection-action-set.ts             |  4 ++--
 .../action-sets/collection-resource-action-set.ts    |  4 ++--
 .../context-menu/action-sets/process-action-set.ts   |  4 ++--
 .../context-menu/action-sets/project-action-set.ts   |  4 ++--
 .../action-sets/repository-action-set.ts             |  4 ++--
 .../action-sets/trashed-collection-action-set.ts     |  5 ++---
 10 files changed, 29 insertions(+), 30 deletions(-)

       via  4c551ecb7e6c888f783708604cfa3f8f340de03e (commit)
      from  931554500996a510fd9d31dddfda6e008ad65bea (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 4c551ecb7e6c888f783708604cfa3f8f340de03e
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Mon Nov 26 12:01:30 2018 +0100

    cr change
    
    Feature #14529
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/store/advanced-tab/advanced-tab.ts b/src/store/advanced-tab/advanced-tab.ts
index 4ba2ddb..385e497 100644
--- a/src/store/advanced-tab/advanced-tab.ts
+++ b/src/store/advanced-tab/advanced-tab.ts
@@ -5,7 +5,7 @@
 import { dialogActions } from '~/store/dialog/dialog-actions';
 import { RootState } from '~/store/store';
 import { Dispatch } from 'redux';
-import { ResourceKind, extractUuidKind } from '~/models/resource';
+import { ResourceKind, extractUuidKind, ResourceObjectType, extractUuidObjectType } from '~/models/resource';
 import { getResource } from '~/store/resources/resources';
 import { GroupContentsResourcePrefix } from '~/services/groups-service/groups-service';
 import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
@@ -21,7 +21,7 @@ export const ADVANCED_TAB_DIALOG = 'advancedTabDialog';
 export interface AdvancedTabDialogData {
     apiResponse: any;
     metadata: any;
-    uuid: string;
+    tail: string;
     pythonHeader: string;
     pythonExample: string;
     cliGetHeader: string;
@@ -52,7 +52,7 @@ enum RepositoryData {
     CREATED_AT = 'created_at'
 }
 
-export const openAdvancedTabDialog = (uuid: string, ownerUuid: string, index?: number) =>
+export const openAdvancedTabDialog = (uuid: string, index?: number) =>
     async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
         const { resources } = getState();
         const kind = extractUuidKind(uuid);
@@ -60,23 +60,23 @@ export const openAdvancedTabDialog = (uuid: string, ownerUuid: string, index?: n
         const repositoryData = getState().repositories.items[index!];
         if (data || repositoryData) {
             if (data) {
-                const user = await services.userService.get(ownerUuid);
+                const type = extractUuidObjectType(data.ownerUuid);
                 const metadata = await services.linkService.list({
                     filters: new FilterBuilder()
                         .addEqual('headUuid', uuid)
                         .getFilters()
                 });
+                const tail = metadata.itemsAvailable && type !== ResourceObjectType.GROUP ? await services.userService.get(data.ownerUuid) : data.ownerUuid;
                 if (kind === ResourceKind.COLLECTION) {
-                    const dataCollection: AdvancedTabDialogData = advancedTabData(uuid, metadata, user, collectionApiResponse, data, CollectionData.COLLECTION, GroupContentsResourcePrefix.COLLECTION, CollectionData.STORAGE_CLASSES_CONFIRMED, data.storageClassesConfirmed);
+                    const dataCollection: AdvancedTabDialogData = advancedTabData(uuid, metadata, tail, collectionApiResponse, data, CollectionData.COLLECTION, GroupContentsResourcePrefix.COLLECTION, CollectionData.STORAGE_CLASSES_CONFIRMED, data.storageClassesConfirmed);
                     dispatch(dialogActions.OPEN_DIALOG({ id: ADVANCED_TAB_DIALOG, data: dataCollection }));
                 } else if (kind === ResourceKind.PROCESS) {
-                    const dataProcess: AdvancedTabDialogData = advancedTabData(uuid, metadata, user, containerRequestApiResponse, data, ProcessData.CONTAINER_REQUEST, GroupContentsResourcePrefix.PROCESS, ProcessData.OUTPUT_NAME, data.outputName);
+                    const dataProcess: AdvancedTabDialogData = advancedTabData(uuid, metadata, tail, containerRequestApiResponse, data, ProcessData.CONTAINER_REQUEST, GroupContentsResourcePrefix.PROCESS, ProcessData.OUTPUT_NAME, data.outputName);
                     dispatch(dialogActions.OPEN_DIALOG({ id: ADVANCED_TAB_DIALOG, data: dataProcess }));
                 } else if (kind === ResourceKind.PROJECT) {
-                    const dataProject: AdvancedTabDialogData = advancedTabData(uuid, metadata, user, groupRequestApiResponse, data, ProjectData.GROUP, GroupContentsResourcePrefix.PROJECT, ProjectData.DELETE_AT, data.deleteAt);
+                    const dataProject: AdvancedTabDialogData = advancedTabData(uuid, metadata, tail, groupRequestApiResponse, data, ProjectData.GROUP, GroupContentsResourcePrefix.PROJECT, ProjectData.DELETE_AT, data.deleteAt);
                     dispatch(dialogActions.OPEN_DIALOG({ id: ADVANCED_TAB_DIALOG, data: dataProject }));
                 }
-
             } else if (kind === ResourceKind.REPOSITORY) {
                 const dataRepository: AdvancedTabDialogData = advancedTabData(uuid, '', '', repositoryApiResponse, repositoryData, RepositoryData.REPOSITORY, 'repositories', RepositoryData.CREATED_AT, repositoryData.createdAt);
                 dispatch(dialogActions.OPEN_DIALOG({ id: ADVANCED_TAB_DIALOG, data: dataRepository }));
@@ -86,10 +86,10 @@ export const openAdvancedTabDialog = (uuid: string, ownerUuid: string, index?: n
         }
     };
 
-const advancedTabData = (uuid: string, metadata: any, user: any, apiResponseKind: any, data: any, resourceKind: CollectionData | ProcessData | ProjectData | RepositoryData, resourcePrefix: GroupContentsResourcePrefix | 'repositories', resourceKindProperty: CollectionData | ProcessData | ProjectData | RepositoryData, property: any) => {
+const advancedTabData = (uuid: string, metadata: any, tail: any, apiResponseKind: any, data: any, resourceKind: CollectionData | ProcessData | ProjectData | RepositoryData, resourcePrefix: GroupContentsResourcePrefix | 'repositories', resourceKindProperty: CollectionData | ProcessData | ProjectData | RepositoryData, property: any) => {
     return {
         uuid,
-        user,
+        tail,
         metadata,
         apiResponse: apiResponseKind(data),
         pythonHeader: pythonHeader(resourceKind),
diff --git a/src/store/context-menu/context-menu-actions.ts b/src/store/context-menu/context-menu-actions.ts
index 596ac87..4bab12a 100644
--- a/src/store/context-menu/context-menu-actions.ts
+++ b/src/store/context-menu/context-menu-actions.ts
@@ -119,10 +119,10 @@ export const openProcessContextMenu = (event: React.MouseEvent<HTMLElement>, pro
     (dispatch: Dispatch, getState: () => RootState) => {
         const resource = {
             uuid: process.containerRequest.uuid,
-            ownerUuid: '',
+            ownerUuid: process.containerRequest.ownerUuid,
             kind: ResourceKind.PROCESS,
-            name: '',
-            description: '',
+            name: process.containerRequest.name,
+            description: process.containerRequest.description,
             menuKind: ContextMenuKind.PROCESS
         };
         dispatch<any>(openContextMenu(event, resource));
diff --git a/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx b/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx
index 8bce416..5f31afa 100644
--- a/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx
+++ b/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx
@@ -61,7 +61,7 @@ export const AdvancedTabDialog = compose(
                 curlHeader,
                 curlExample,
                 uuid,
-                user
+                tail
             } = this.props.data;
             return <Dialog
                 open={open}
@@ -78,7 +78,7 @@ export const AdvancedTabDialog = compose(
                 </Tabs>
                 <DialogContent className={classes.content}>
                     {value === 0 && <div>{dialogContentExample(apiResponse, classes)}</div>}
-                    {value === 1 && <div>{metadata !== '' && metadata.items.length > 0 ? <MetadataTab items={metadata.items} uuid={uuid} user={user} /> : dialogContentHeader('(No metadata links found)')}</div>}
+                    {value === 1 && <div>{metadata !== '' && metadata.items.length > 0 ? <MetadataTab items={metadata.items} uuid={uuid} tail={tail} /> : dialogContentHeader('(No metadata links found)')}</div>}
                     {value === 2 && dialogContent(pythonHeader, pythonExample, classes)}
                     {value === 3 && <div>
                         {dialogContent(cliGetHeader, cliGetExample, classes)}
diff --git a/src/views-components/advanced-tab-dialog/metadataTab.tsx b/src/views-components/advanced-tab-dialog/metadataTab.tsx
index 6250a7a..b7a7680 100644
--- a/src/views-components/advanced-tab-dialog/metadataTab.tsx
+++ b/src/views-components/advanced-tab-dialog/metadataTab.tsx
@@ -25,7 +25,7 @@ interface MetadataTable {
 
 interface MetadataProps {
     items: MetadataTable[];
-    user: UserResource;
+    tail: any;
     uuid: string;
 }
 
@@ -47,7 +47,7 @@ export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles
                     <TableCell className={props.classes.cell}>{it.uuid}</TableCell>
                     <TableCell className={props.classes.cell}>{it.linkClass}</TableCell>
                     <TableCell className={props.classes.cell}>{it.name}</TableCell>
-                    <TableCell className={props.classes.cell}>{props.user ? `User: ${props.user.firstName} ${props.user.lastName}` : it.tailUuid}</TableCell>
+                    <TableCell className={props.classes.cell}>{props.tail.firstName ? `User: ${props.tail.firstName} ${props.tail.lastName}` : `Group: ${props.tail}`}</TableCell>
                     <TableCell className={props.classes.cell}>{it.headUuid === props.uuid ? 'this' : it.headUuid}</TableCell>
                     <TableCell className={props.classes.cell}>{JSON.stringify(it.properties)}</TableCell>
                 </TableRow>
diff --git a/src/views-components/context-menu/action-sets/collection-action-set.ts b/src/views-components/context-menu/action-sets/collection-action-set.ts
index 2dc2a92..809529e 100644
--- a/src/views-components/context-menu/action-sets/collection-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-action-set.ts
@@ -76,8 +76,8 @@ export const collectionActionSet: ContextMenuActionSet = [[
     {
         icon: AdvancedIcon,
         name: "Advanced",
-        execute: (dispatch, { uuid, ownerUuid }) => {
-            dispatch<any>(openAdvancedTabDialog(uuid, ownerUuid));
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openAdvancedTabDialog(uuid));
         }
     }
     // {
diff --git a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
index d00f864..8f439c4 100644
--- a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
@@ -70,8 +70,8 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
         icon: AdvancedIcon,
         name: "Advanced",
-        execute: (dispatch, { uuid, ownerUuid }) => {
-            dispatch<any>(openAdvancedTabDialog(uuid, ownerUuid));
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openAdvancedTabDialog(uuid));
         }
     }
     // {
diff --git a/src/views-components/context-menu/action-sets/process-action-set.ts b/src/views-components/context-menu/action-sets/process-action-set.ts
index 3b5f297..5c4c952 100644
--- a/src/views-components/context-menu/action-sets/process-action-set.ts
+++ b/src/views-components/context-menu/action-sets/process-action-set.ts
@@ -110,8 +110,8 @@ export const processActionSet: ContextMenuActionSet = [[
     {
         icon: AdvancedIcon,
         name: "Advanced",
-        execute: (dispatch, { uuid, ownerUuid }) => {
-            dispatch<any>(openAdvancedTabDialog(uuid, ownerUuid));
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openAdvancedTabDialog(uuid));
         }
     }
     // {
diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts
index 1e38733..726707e 100644
--- a/src/views-components/context-menu/action-sets/project-action-set.ts
+++ b/src/views-components/context-menu/action-sets/project-action-set.ts
@@ -77,8 +77,8 @@ export const projectActionSet: ContextMenuActionSet = [[
     {
         icon: AdvancedIcon,
         name: "Advanced",
-        execute: (dispatch, { uuid, ownerUuid }) => {
-            dispatch<any>(openAdvancedTabDialog(uuid, ownerUuid));
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openAdvancedTabDialog(uuid));
         }
     },
 ]];
diff --git a/src/views-components/context-menu/action-sets/repository-action-set.ts b/src/views-components/context-menu/action-sets/repository-action-set.ts
index 7382475..cf7fb88 100644
--- a/src/views-components/context-menu/action-sets/repository-action-set.ts
+++ b/src/views-components/context-menu/action-sets/repository-action-set.ts
@@ -23,8 +23,8 @@ export const repositoryActionSet: ContextMenuActionSet = [[{
 }, {
     name: "Advanced",
     icon: AdvancedIcon,
-    execute: (dispatch, { uuid, ownerUuid, index }) => {
-        dispatch<any>(openAdvancedTabDialog(uuid, ownerUuid, index));
+    execute: (dispatch, { uuid, index }) => {
+        dispatch<any>(openAdvancedTabDialog(uuid, index));
     }
 }, {
     name: "Remove",
diff --git a/src/views-components/context-menu/action-sets/trashed-collection-action-set.ts b/src/views-components/context-menu/action-sets/trashed-collection-action-set.ts
index 7ba9f5e..ce2abdd 100644
--- a/src/views-components/context-menu/action-sets/trashed-collection-action-set.ts
+++ b/src/views-components/context-menu/action-sets/trashed-collection-action-set.ts
@@ -5,7 +5,6 @@
 import { ContextMenuActionSet } from "../context-menu-action-set";
 import { DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RestoreFromTrashIcon } from '~/components/icon/icon';
 import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
-import { detailsPanelActions } from "~/store/details-panel/details-panel-action";
 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
 import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
 
@@ -27,8 +26,8 @@ export const trashedCollectionActionSet: ContextMenuActionSet = [[
     {
         icon: AdvancedIcon,
         name: "Advanced",
-        execute: (dispatch, { uuid, ownerUuid }) => {
-            dispatch<any>(openAdvancedTabDialog(uuid, ownerUuid));
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openAdvancedTabDialog(uuid));
         }
     },
     {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list