[arvados-workbench2] updated: 2.4.0-367-gc7b19963

git repository hosting git at public.arvados.org
Mon Dec 5 22:10:05 UTC 2022


Summary of changes:
 public/config.json                               |  3 --
 src/models/container-request.ts                  | 36 ++++++++---------
 src/views-components/data-explorer/renderers.tsx | 51 ++++++++++++++++++++----
 3 files changed, 61 insertions(+), 29 deletions(-)
 delete mode 100644 public/config.json

       via  c7b19963c9e3981673ef5744e2710bd266f2b7e2 (commit)
      from  fc16e2ad191f91e78f5e5b89486894a8aacbfaf0 (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 c7b19963c9e3981673ef5744e2710bd266f2b7e2
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Dec 5 17:10:00 2022 -0500

    relinkified outputUuid and logUuid for processes, removed public/config.json  Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/public/config.json b/public/config.json
deleted file mode 100644
index 01af6d67..00000000
--- a/public/config.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "API_HOST":"tordo.arvadosapi.com"
-}
\ No newline at end of file
diff --git a/src/models/container-request.ts b/src/models/container-request.ts
index 90e7dea9..2a0e60ba 100644
--- a/src/models/container-request.ts
+++ b/src/models/container-request.ts
@@ -16,29 +16,29 @@ export enum ContainerRequestState {
 export interface ContainerRequestResource
   extends Resource,
     ResourceWithProperties {
-  kind: ResourceKind.CONTAINER_REQUEST;
-  name: string;
-  description: string;
-  state: ContainerRequestState;
-  requestingContainerUuid: string | null;
-  cumulativeCost: number;
-  containerUuid: string | null;
+  command: string[];
   containerCountMax: number;
-  mounts: { [path: string]: MountType };
-  runtimeConstraints: RuntimeConstraints;
-  schedulingParameters: SchedulingParameters;
+  containerCount: number;
   containerImage: string;
-  environment: any;
+  containerUuid: string | null;
+  cumulativeCost: number;
   cwd: string;
-  command: string[];
-  outputPath: string;
+  description: string;
+  environment: any;
+  expiresAt: string;
+  filters: string;
+  kind: ResourceKind.CONTAINER_REQUEST;
+  logUuid: string | null;
+  mounts: { [path: string]: MountType };
+  name: string;
   outputName: string;
+  outputPath: string;
   outputTtl: number;
+  outputUuid: string | null;
   priority: number | null;
-  expiresAt: string;
+  requestingContainerUuid: string | null;
+  runtimeConstraints: RuntimeConstraints;
+  schedulingParameters: SchedulingParameters;
+  state: ContainerRequestState;
   useExisting: boolean;
-  logUuid: string | null;
-  outputUuid: string | null;
-  filters: string;
-  containerCount: number;
 }
diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index db2425ab..7bfdf2ec 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -61,9 +61,10 @@ import { getUserUuid } from 'common/getuser';
 import { VirtualMachinesResource } from 'models/virtual-machines';
 import { CopyToClipboardSnackbar } from 'components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar';
 import { ProjectResource } from 'models/project';
+import { ProcessResource } from 'models/process';
 
-const renderName = (dispatch: Dispatch, item: GroupContentsResource) => {
 
+const renderName = (dispatch: Dispatch, item: GroupContentsResource) => {
     const navFunc = ("groupClass" in item && item.groupClass === GroupClass.ROLE ? navigateToGroupDetails : navigateTo);
     return <Grid container alignItems="center" wrap="nowrap" spacing={16}>
         <Grid item>
@@ -89,6 +90,7 @@ const renderName = (dispatch: Dispatch, item: GroupContentsResource) => {
     </Grid>;
 };
 
+
 const FrozenProject = (props: {item: ProjectResource}) => {
     const [fullUsername, setFullusername] = React.useState<any>(null);
     const getFullName = React.useCallback(() => {
@@ -113,6 +115,7 @@ export const ResourceName = connect(
         return resource;
     })((resource: GroupContentsResource & DispatchProp<any>) => renderName(resource.dispatch, resource));
 
+    
 const renderIcon = (item: GroupContentsResource) => {
     switch (item.kind) {
         case ResourceKind.PROJECT:
@@ -230,6 +233,11 @@ const renderUuid = (item: { uuid: string }) =>
         {(item.uuid && <CopyToClipboardSnackbar value={item.uuid} />) || '-' }
     </Typography>;
 
+const renderUuidCopyIcon = (item: { uuid: string }) =>
+    <Typography data-cy="uuid" noWrap>
+        {(item.uuid && <CopyToClipboardSnackbar value={item.uuid} />) || '-' }
+    </Typography>;
+
 export const ResourceUuid = connect((state: RootState, props: { uuid: string }) => (
     getResource<UserResource>(props.uuid)(state.resources) || { uuid: '' }
 ))(renderUuid);
@@ -670,17 +678,39 @@ export const ResourceContainerUuid = connect(
         return { uuid: process?.container?.uuid ? process?.container?.uuid : '' };
     })((props: { uuid: string }) => renderUuid({ uuid: props.uuid }));
 
+enum ColumnSelection {
+    OUTPUT_UUID = 'outputUuid',
+    LOG_UUID = 'logUuid'
+}
+
+const renderUuidLinkWithCopyIcon = (dispatch: Dispatch, item: ProcessResource, column: string) => {
+    const selectedColumnUuid = item[column]
+    return <Grid container alignItems="center" wrap="nowrap" >
+        <Grid item>
+            {selectedColumnUuid ? 
+                <Typography color="primary" style={{ width: 'auto', cursor: 'pointer' }} noWrap 
+                    onClick={() => dispatch<any>(navigateTo(selectedColumnUuid))}>
+                    {selectedColumnUuid} 
+                </Typography> 
+            : '-' }
+        </Grid>
+        <Grid item>
+            {selectedColumnUuid && renderUuidCopyIcon({ uuid: selectedColumnUuid })}
+        </Grid>
+    </Grid>;
+};
+
 export const ResourceOutputUuid = connect(
     (state: RootState, props: { uuid: string }) => {
-        const process = getProcess(props.uuid)(state.resources)
-        return { uuid: process?.containerRequest.outputUuid || '' };
-    })((props: { uuid: string }) => renderUuid({ uuid: props.uuid }));
+        const resource = getResource<ProcessResource>(props.uuid)(state.resources);
+        return resource;
+    })((process: ProcessResource & DispatchProp<any>) => renderUuidLinkWithCopyIcon(process.dispatch, process, ColumnSelection.OUTPUT_UUID));
 
 export const ResourceLogUuid = connect(
     (state: RootState, props: { uuid: string }) => {
-        const process = getProcess(props.uuid)(state.resources)
-        return { uuid: process?.containerRequest.logUuid || '' };
-    })((props: { uuid: string }) => renderUuid({ uuid: props.uuid }));
+        const resource = getResource<ProcessResource>(props.uuid)(state.resources);
+        return resource;
+    })((process: ProcessResource & DispatchProp<any>) => renderUuidLinkWithCopyIcon(process.dispatch, process, ColumnSelection.LOG_UUID));
 
 export const ResourceParentProcess = connect(
     (state: RootState, props: { uuid: string }) => {
@@ -824,11 +854,14 @@ const ownerFromResourceId =
         userFromID
     );
 
+
+
+
+
 const _resourceWithName =
     withStyles({}, { withTheme: true })
         ((props: { uuid: string, userFullname: string, dispatch: Dispatch, theme: ArvadosTheme }) => {
             const { uuid, userFullname, dispatch, theme } = props;
-
             if (userFullname === '') {
                 dispatch<any>(loadResource(uuid, false));
                 return <Typography style={{ color: theme.palette.primary.main }} inline noWrap>
@@ -845,6 +878,8 @@ export const ResourceOwnerWithName = ownerFromResourceId(_resourceWithName);
 
 export const ResourceWithName = userFromID(_resourceWithName);
 
+
+
 export const UserNameFromID =
     compose(userFromID)(
         (props: { uuid: string, displayAsText?: string, userFullname: string, dispatch: Dispatch }) => {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list