[ARVADOS-WORKBENCH2] updated: 2.3.0-154-gae946826

Git user git at public.arvados.org
Mon Feb 14 19:36:47 UTC 2022


Summary of changes:
 cypress/integration/project.spec.js                    |  2 +-
 src/store/advanced-tab/advanced-tab.tsx                | 18 ++----------------
 .../advanced-tab-dialog/advanced-tab-dialog.tsx        |  3 +--
 .../advanced-tab-dialog/metadataTab.tsx                |  6 ++----
 4 files changed, 6 insertions(+), 23 deletions(-)

       via  ae946826d1670cb786688e859bc1f3257150ae75 (commit)
      from  261201611113224f4a61b3979f6cd9992c4aa6c6 (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 ae946826d1670cb786688e859bc1f3257150ae75
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Mon Feb 14 20:32:04 2022 +0100

    18594: Code and test cleanup
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/cypress/integration/project.spec.js b/cypress/integration/project.spec.js
index 96e73bc1..ecac3861 100644
--- a/cypress/integration/project.spec.js
+++ b/cypress/integration/project.spec.js
@@ -257,7 +257,7 @@ describe('Project tests', function() {
 
                     cy.get('td').contains(uuid).should('exist');
 
-                    cy.get('td').contains('Active User').should('exist');
+                    cy.get('td').contains(activeUser.user.uuid).should('exist');
                 });
         });
     });
diff --git a/src/store/advanced-tab/advanced-tab.tsx b/src/store/advanced-tab/advanced-tab.tsx
index 33faebbe..61fd705a 100644
--- a/src/store/advanced-tab/advanced-tab.tsx
+++ b/src/store/advanced-tab/advanced-tab.tsx
@@ -18,7 +18,7 @@ import { ListResults } from 'services/common-service/common-service';
 import { RepositoryResource } from 'models/repositories';
 import { SshKeyResource } from 'models/ssh-key';
 import { VirtualMachinesResource } from 'models/virtual-machines';
-import { UserResource, getUserDisplayName } from 'models/user';
+import { UserResource } from 'models/user';
 import { LinkResource } from 'models/link';
 import { KeepServiceResource } from 'models/keep-services';
 import { ApiClientAuthorization } from 'models/api-client-authorization';
@@ -280,22 +280,8 @@ const getDataForAdvancedTab = (uuid: string) =>
                 .addEqual('head_uuid', uuid)
                 .getFilters()
         });
-        let user;
-
-        if (metadata.itemsAvailable) {
-            metadata.items.forEach(async (item) => {
-                const {tailKind, tailUuid, properties} = item;
-                properties['tail'] = tailUuid;
-                try {
-                    if (tailKind === ResourceKind.USER && tailUuid) {
-                        user = await services.userService.get(tailUuid);
-                        properties['tail'] = getUserDisplayName(user);
-                    }
-                } catch {};
-            });
-        }
 
-        return { data, metadata, user };
+        return { data, metadata };
     };
 
 const initAdvancedTabDialog = (data: AdvancedTabDialogData) => dialogActions.OPEN_DIALOG({ id: ADVANCED_TAB_DIALOG, data });
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 e8d4aaef..f493df33 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,6 @@ export const AdvancedTabDialog = compose(
                 curlHeader,
                 curlExample,
                 uuid,
-                user
             } = this.props.data;
             return <Dialog
                 open={open}
@@ -80,7 +79,7 @@ export const AdvancedTabDialog = compose(
                     {value === 0 && <div>{dialogContentExample(apiResponse, classes)}</div>}
                     {value === 1 && <div>
                         {metadata !== '' && metadata.items.length > 0 ?
-                            <MetadataTab items={metadata.items} uuid={uuid} user={user} />
+                            <MetadataTab items={metadata.items} uuid={uuid} />
                             : dialogContentHeader('(No metadata links found)')}
                     </div>}
                     {value === 2 && dialogContent(pythonHeader, pythonExample, classes)}
diff --git a/src/views-components/advanced-tab-dialog/metadataTab.tsx b/src/views-components/advanced-tab-dialog/metadataTab.tsx
index 88d0137f..1b950d24 100644
--- a/src/views-components/advanced-tab-dialog/metadataTab.tsx
+++ b/src/views-components/advanced-tab-dialog/metadataTab.tsx
@@ -4,7 +4,6 @@
 
 import React from "react";
 import { Table, TableHead, TableCell, TableRow, TableBody, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core';
-import { UserResource } from "models/user";
 
 type CssRules = 'cell';
 
@@ -25,7 +24,6 @@ interface MetadataTable {
 
 interface MetadataProps {
     items: MetadataTable[];
-    user: UserResource;
     uuid: string;
 }
 
@@ -47,9 +45,9 @@ 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}>{it.properties.tail}</TableCell>
+                    <TableCell className={props.classes.cell}>{it.tailUuid}</TableCell>
                     <TableCell className={props.classes.cell}>{it.headUuid === props.uuid ? 'this' : it.headUuid}</TableCell>
-                    <TableCell className={props.classes.cell}>{JSON.stringify(it.properties, (key, value) => { return key === 'tail' ? undefined : value; })}</TableCell>
+                    <TableCell className={props.classes.cell}>{JSON.stringify(it.properties)}</TableCell>
                 </TableRow>
             )}
         </TableBody>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list