[ARVADOS-WORKBENCH2] updated: 2.4.0-57-g056e5b95

Git user git at public.arvados.org
Wed May 18 19:18:05 UTC 2022


Summary of changes:
 src/models/workflow.ts                             |  2 +-
 .../side-panel-button/side-panel-button.tsx        |  2 +-
 .../run-process-panel/run-process-panel-root.tsx   | 55 +++++++++++++---------
 .../workflow-panel/workflow-description-card.tsx   | 55 ++++++++++++++++++----
 4 files changed, 80 insertions(+), 34 deletions(-)

       via  056e5b954c34946428c2b9fcbc3c49c2670ec305 (commit)
       via  684419a1bede6b57e8c6bc384e1664b8ed73d930 (commit)
      from  66adcf8ab86e764a8829fbd604e27df53d6f24a1 (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 056e5b954c34946428c2b9fcbc3c49c2670ec305
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed May 18 15:17:51 2022 -0400

    19069: Add workflow details
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/models/workflow.ts b/src/models/workflow.ts
index 00dfaa10..6d21dbc7 100644
--- a/src/models/workflow.ts
+++ b/src/models/workflow.ts
@@ -153,7 +153,7 @@ export const getWorkflowInputs = (workflowDefinition: WorkflowResourceDefinition
 };
 
 export const getInputLabel = (input: CommandInputParameter) => {
-    return `${input.label || input.id}`;
+    return `${input.label || input.id.split('/').pop()}`;
 };
 
 export const isRequiredInput = ({ type }: CommandInputParameter) => {
diff --git a/src/views/workflow-panel/workflow-description-card.tsx b/src/views/workflow-panel/workflow-description-card.tsx
index 9c1d81c3..c6c146ac 100644
--- a/src/views/workflow-panel/workflow-description-card.tsx
+++ b/src/views/workflow-panel/workflow-description-card.tsx
@@ -14,13 +14,17 @@ import {
     TableHead,
     TableCell,
     TableBody,
-    TableRow
+    TableRow,
+    Grid,
 } from '@material-ui/core';
 import { ArvadosTheme } from 'common/custom-theme';
 import { WorkflowIcon } from 'components/icon/icon';
 import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view';
 import { WorkflowResource, parseWorkflowDefinition, getWorkflowInputs, getInputLabel, stringifyInputType } from 'models/workflow';
-import { WorkflowGraph } from "views/workflow-panel/workflow-graph";
+// import { WorkflowGraph } from "views/workflow-panel/workflow-graph";
+import { DetailsAttribute } from 'components/details-attribute/details-attribute';
+import { ResourceOwnerWithName } from 'views-components/data-explorer/renderers';
+import { formatDate } from "common/formatters";
 
 export type CssRules = 'root' | 'tab' | 'inputTab' | 'graphTab' | 'graphTabWithChosenWorkflow' | 'descriptionTab' | 'inputsTable';
 
@@ -77,16 +81,17 @@ export const WorkflowDetailsCard = withStyles(styles)(
                 <Tabs value={value} onChange={this.handleChange} centered={true}>
                     <Tab className={classes.tab} label="Description" />
                     <Tab className={classes.tab} label="Inputs" />
-                    <Tab className={classes.tab} label="Graph" />
+                    <Tab className={classes.tab} label="Details" />
+                    {/* <Tab className={classes.tab} label="Graph" /> */}
                 </Tabs>
                 {value === 0 && <CardContent className={classes.descriptionTab}>
                     {workflow ? <div>
                         {workflow.description}
                     </div> : (
-                            <DataTableDefaultView
-                                icon={WorkflowIcon}
-                                messages={['Please select a workflow to see its description.']} />
-                        )}
+                        <DataTableDefaultView
+                            icon={WorkflowIcon}
+                            messages={['Please select a workflow to see its description.']} />
+                    )}
                 </CardContent>}
                 {value === 1 && <CardContent className={classes.inputTab}>
                     {workflow
@@ -96,12 +101,20 @@ export const WorkflowDetailsCard = withStyles(styles)(
                             messages={['Please select a workflow to see its inputs.']} />
                     }
                 </CardContent>}
+                {/* {value === 2 && <CardContent className={workflow ? classes.graphTabWithChosenWorkflow : classes.graphTab}>
+                    {workflow
+                    ? <WorkflowGraph workflow={workflow} />
+                    : <DataTableDefaultView
+                    icon={WorkflowIcon}
+                    messages={['Please select a workflow to see its visualisation.']} />
+                    }
+                    </CardContent>} */}
                 {value === 2 && <CardContent className={workflow ? classes.graphTabWithChosenWorkflow : classes.graphTab}>
                     {workflow
-                        ? <WorkflowGraph workflow={workflow} />
+                        ? <WorkflowDetailsAttributes workflow={workflow} />
                         : <DataTableDefaultView
                             icon={WorkflowIcon}
-                            messages={['Please select a workflow to see its visualisation.']} />
+                            messages={['Please select a workflow to see its details.']} />
                     }
                 </CardContent>}
             </div>;
@@ -137,3 +150,27 @@ export const WorkflowDetailsCard = withStyles(styles)(
             </Table>;
         }
     });
+
+export const WorkflowDetailsAttributes = ({ workflow }: WorkflowDetailsCardDataProps) => {
+    return <Grid container>
+        <DetailsAttribute
+            label={"Workflow UUID"}
+            linkToUuid={workflow?.uuid} />
+        <Grid item xs={12} >
+            <DetailsAttribute
+                label='Owner' linkToUuid={workflow?.ownerUuid}
+                uuidEnhancer={(uuid: string) => <ResourceOwnerWithName uuid={uuid} />} />
+        </Grid>
+        <Grid item xs={12}>
+            <DetailsAttribute label='Created at' value={formatDate(workflow?.createdAt)} />
+        </Grid>
+        <Grid item xs={12}>
+            <DetailsAttribute label='Last modified' value={formatDate(workflow?.modifiedAt)} />
+        </Grid>
+        <Grid item xs={12} >
+            <DetailsAttribute
+                label='Last modified by user' linkToUuid={workflow?.modifiedByUserUuid}
+                uuidEnhancer={(uuid: string) => <ResourceOwnerWithName uuid={uuid} />} />
+        </Grid>
+    </Grid >;
+};

commit 684419a1bede6b57e8c6bc384e1664b8ed73d930
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed May 18 13:18:23 2022 -0400

    19069: Scroll instead of overflow in run a process
    
    Rename "Run a process" button to "Run a workflow"
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/views-components/side-panel-button/side-panel-button.tsx b/src/views-components/side-panel-button/side-panel-button.tsx
index a219e55a..c813efb0 100644
--- a/src/views-components/side-panel-button/side-panel-button.tsx
+++ b/src/views-components/side-panel-button/side-panel-button.tsx
@@ -107,7 +107,7 @@ export const SidePanelButton = withStyles(styles)(
                         <CollectionIcon className={classes.icon} /> New collection
                     </MenuItem>
                     <MenuItem data-cy='side-panel-run-process' className={classes.menuItem} onClick={this.handleRunProcessClick}>
-                        <ProcessIcon className={classes.icon} /> Run a process
+                        <ProcessIcon className={classes.icon} /> Run a workflow
                     </MenuItem>
                     <MenuItem data-cy='side-panel-new-project' className={classes.menuItem} onClick={this.handleNewProjectClick}>
                         <ProjectIcon className={classes.icon} /> New project
diff --git a/src/views/run-process-panel/run-process-panel-root.tsx b/src/views/run-process-panel/run-process-panel-root.tsx
index 3c42437a..9dd5aa3f 100644
--- a/src/views/run-process-panel/run-process-panel-root.tsx
+++ b/src/views/run-process-panel/run-process-panel-root.tsx
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import React from 'react';
-import { Stepper, Step, StepLabel, StepContent } from '@material-ui/core';
+import { Stepper, Step, StepLabel, StepContent, StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core';
 import { RunProcessFirstStepDataProps, RunProcessFirstStepActionProps, RunProcessFirstStep } from 'views/run-process-panel/run-process-first-step';
 import { RunProcessSecondStepForm } from './run-process-second-step';
 
@@ -17,25 +17,34 @@ export type RunProcessPanelRootActionProps = RunProcessFirstStepActionProps & {
 
 type RunProcessPanelRootProps = RunProcessPanelRootDataProps & RunProcessPanelRootActionProps;
 
-export const RunProcessPanelRoot = ({ runProcess, currentStep, onSearch, onSetStep, onSetWorkflow, workflows, selectedWorkflow }: RunProcessPanelRootProps) =>
-    <Stepper activeStep={currentStep} orientation="vertical" elevation={2}>
-        <Step>
-            <StepLabel>Choose a workflow</StepLabel>
-            <StepContent>
-                <RunProcessFirstStep
-                    workflows={workflows}
-                    selectedWorkflow={selectedWorkflow}
-                    onSearch={onSearch}
-                    onSetStep={onSetStep} 
-                    onSetWorkflow={onSetWorkflow} />
-            </StepContent>
-        </Step>
-        <Step>
-            <StepLabel>Select inputs</StepLabel>
-            <StepContent>
-                <RunProcessSecondStepForm
-                    goBack={() => onSetStep(0)}
-                    runProcess={runProcess} />
-            </StepContent>
-        </Step>
-    </Stepper>;
\ No newline at end of file
+type CssRules = 'stepper';
+
+const styles: StyleRulesCallback<CssRules> = theme => ({
+    stepper: {
+        overflow: "scroll",
+    }
+});
+
+export const RunProcessPanelRoot = withStyles(styles)(
+    ({ runProcess, currentStep, onSearch, onSetStep, onSetWorkflow, workflows, selectedWorkflow, classes }: WithStyles<CssRules> & RunProcessPanelRootProps) =>
+        <Stepper activeStep={currentStep} orientation="vertical" elevation={2} className={classes.stepper}>
+            <Step>
+                <StepLabel>Choose a workflow</StepLabel>
+                <StepContent>
+                    <RunProcessFirstStep
+                        workflows={workflows}
+                        selectedWorkflow={selectedWorkflow}
+                        onSearch={onSearch}
+                        onSetStep={onSetStep}
+                        onSetWorkflow={onSetWorkflow} />
+                </StepContent>
+            </Step>
+            <Step>
+                <StepLabel>Select inputs</StepLabel>
+                <StepContent>
+                    <RunProcessSecondStepForm
+                        goBack={() => onSetStep(0)}
+                        runProcess={runProcess} />
+                </StepContent>
+            </Step>
+        </Stepper>);

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list