[ARVADOS-WORKBENCH2] updated: 1.2.0-941-gf6fae0a
Git user
git at public.curoverse.com
Mon Nov 26 06:52:04 EST 2018
Summary of changes:
src/store/advanced-tab/advanced-tab.ts | 17 ++++++++---------
.../advanced-tab-dialog/advanced-tab-dialog.tsx | 4 ++--
.../advanced-tab-dialog/metadataTab.tsx | 4 ++--
3 files changed, 12 insertions(+), 13 deletions(-)
via f6fae0a00b6e891069f7d81bd2917dbd3d55239b (commit)
from c9d00b6432a095f83647995df33a62d842fde8e1 (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 f6fae0a00b6e891069f7d81bd2917dbd3d55239b
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Mon Nov 26 12:51:52 2018 +0100
fixed tail in metadata advanced tab
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 385e497..c5f600d 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, ResourceObjectType, extractUuidObjectType } from '~/models/resource';
+import { ResourceKind, extractUuidKind } 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;
- tail: string;
+ user: string;
pythonHeader: string;
pythonExample: string;
cliGetHeader: string;
@@ -60,21 +60,20 @@ export const openAdvancedTabDialog = (uuid: string, index?: number) =>
const repositoryData = getState().repositories.items[index!];
if (data || repositoryData) {
if (data) {
- 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;
+ const user = metadata.itemsAvailable && await services.userService.get(metadata.items[0].tailUuid);
if (kind === ResourceKind.COLLECTION) {
- const dataCollection: AdvancedTabDialogData = advancedTabData(uuid, metadata, tail, collectionApiResponse, data, CollectionData.COLLECTION, GroupContentsResourcePrefix.COLLECTION, CollectionData.STORAGE_CLASSES_CONFIRMED, data.storageClassesConfirmed);
+ const dataCollection: AdvancedTabDialogData = advancedTabData(uuid, metadata, user, 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, tail, containerRequestApiResponse, data, ProcessData.CONTAINER_REQUEST, GroupContentsResourcePrefix.PROCESS, ProcessData.OUTPUT_NAME, data.outputName);
+ const dataProcess: AdvancedTabDialogData = advancedTabData(uuid, metadata, user, 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, tail, groupRequestApiResponse, data, ProjectData.GROUP, GroupContentsResourcePrefix.PROJECT, ProjectData.DELETE_AT, data.deleteAt);
+ const dataProject: AdvancedTabDialogData = advancedTabData(uuid, metadata, user, 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) {
@@ -86,10 +85,10 @@ export const openAdvancedTabDialog = (uuid: string, index?: number) =>
}
};
-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) => {
+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) => {
return {
uuid,
- tail,
+ user,
metadata,
apiResponse: apiResponseKind(data),
pythonHeader: pythonHeader(resourceKind),
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 5f31afa..8bce416 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,
- tail
+ user
} = 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} tail={tail} /> : dialogContentHeader('(No metadata links found)')}</div>}
+ {value === 1 && <div>{metadata !== '' && metadata.items.length > 0 ? <MetadataTab items={metadata.items} uuid={uuid} user={user} /> : 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 b7a7680..bcf277c 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[];
- tail: any;
+ user: UserResource;
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.tail.firstName ? `User: ${props.tail.firstName} ${props.tail.lastName}` : `Group: ${props.tail}`}</TableCell>
+ <TableCell className={props.classes.cell}>{props.user && `User: ${props.user.firstName} ${props.user.lastName}`}</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>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list