[arvados-workbench2] updated: 2.4.0-226-g7db41995

git repository hosting git at public.arvados.org
Wed Oct 12 13:59:51 UTC 2022


Summary of changes:
 src/views/process-panel/process-io-card.tsx | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

       via  7db41995e4c8d77094f8dad71902de30b1650b37 (commit)
      from  627132ee694565c5f3cf347fa0bbee8e514de884 (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 7db41995e4c8d77094f8dad71902de30b1650b37
Author: Stephen Smith <stephen at curii.com>
Date:   Wed Oct 12 09:58:45 2022 -0400

    16073: Fix display of empty raw params when workflow definition is present
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/views/process-panel/process-io-card.tsx b/src/views/process-panel/process-io-card.tsx
index 937478ef..0e93c9a6 100644
--- a/src/views/process-panel/process-io-card.tsx
+++ b/src/views/process-panel/process-io-card.tsx
@@ -225,6 +225,10 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps
         const PanelIcon = label === ProcessIOCardType.INPUT ? InputIcon : OutputIcon;
         const mainProcess = !process.containerRequest.requestingContainerUuid;
 
+        const loading = raw === undefined || params === undefined;
+        const hasRaw = !!(raw && Object.keys(raw).length > 0);
+        const hasParams = !!(params && params.length > 0);
+
         return <Card className={classes.card} data-cy="process-io-card">
             <CardHeader
                 className={classes.header}
@@ -257,20 +261,24 @@ export const ProcessIOCard = withStyles(styles)(connect(null, mapDispatchToProps
                 {mainProcess ?
                     (<>
                         {/* raw is undefined until params are loaded */}
-                        {raw === undefined && <Grid container item alignItems='center' justify='center'>
+                        {loading && <Grid container item alignItems='center' justify='center'>
                             <CircularProgress />
                         </Grid>}
-                        {raw && Object.keys(raw).length > 0 &&
+                        {/* Once loaded, either raw or params may still be empty
+                          *   Raw when all params are empty
+                          *   Params when raw is provided by containerRequest properties but workflow mount is absent for preview
+                          */}
+                        {(!loading && (hasRaw || hasParams)) &&
                             <>
                                 <Tabs value={mainProcTabState} onChange={handleMainProcTabChange} variant="fullWidth" className={classes.symmetricTabs}>
                                     {/* params will be empty on processes without workflow definitions in mounts, so we only show raw */}
-                                    {(params && params.length) && <Tab label="Parameters" />}
+                                    {hasParams && <Tab label="Parameters" />}
                                     <Tab label="JSON" />
                                 </Tabs>
-                                {(mainProcTabState === 0 && params && params.length > 0) && <div className={classes.tableWrapper}>
+                                {(mainProcTabState === 0 && params && hasParams) && <div className={classes.tableWrapper}>
                                         <ProcessIOPreview data={params} showImagePreview={showImagePreview} />
                                     </div>}
-                                {(mainProcTabState === 1 || !params || !(params.length > 0)) && <div className={classes.tableWrapper}>
+                                {(mainProcTabState === 1 || !hasParams) && <div className={classes.tableWrapper}>
                                         <ProcessIORaw data={raw} />
                                     </div>}
                             </>}

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list