+ />
+ <CardContent className={classes.content}>
+ {mainProcess || showParams ? (
+ <>
+ {/* raw is undefined until params are loaded */}
+ {loading && (
+ <Grid
+ container
+ item
+ alignItems="center"
+ justify="center"
+ >
+ <CircularProgress />
+ </Grid>
+ )}
+ {/* 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 */}
+ {hasParams && <Tab label="Parameters" />}
+ {!showParams && <Tab label="JSON" />}
+ </Tabs>
+ {mainProcTabState === 0 && params && hasParams && (
+ <div className={classes.tableWrapper}>
+ <ProcessIOPreview
+ data={params}
+ showImagePreview={showImagePreview}
+ valueLabel={showParams ? "Default value" : "Value"}
+ />
+ </div>
+ )}
+ {(mainProcTabState === 1 || !hasParams) && (
+ <div className={classes.tableWrapper}>
+ <ProcessIORaw data={raw} />
+ </div>
+ )}
+ </>
+ )}
+ {!loading && !hasRaw && !hasParams && (
+ <Grid
+ container
+ item
+ alignItems="center"
+ justify="center"
+ >
+ <DefaultView messages={["No parameters found"]} />
+ </Grid>
+ )}
+ </>
+ ) : (
+ // Subprocess
+ <>
+ {loading && (
+ <Grid
+ container
+ item
+ alignItems="center"
+ justify="center"
+ >
+ <CircularProgress />
+ </Grid>
+ )}
+ {!loading && (hasInputMounts || hasOutputCollecton || hasRaw) ? (
+ <>
+ <Tabs
+ value={subProcTabState}
+ onChange={handleSubProcTabChange}
+ variant="fullWidth"
+ className={classes.symmetricTabs}
+ >
+ {hasInputMounts && <Tab label="Collections" />}
+ {hasOutputCollecton && <Tab label="Collection" />}
+ <Tab label="JSON" />
+ </Tabs>
+ <div className={classes.tableWrapper}>
+ {subProcTabState === 0 && hasInputMounts && <ProcessInputMounts mounts={mounts || []} />}
+ {subProcTabState === 0 && hasOutputCollecton && (
+ <>
+ {outputUuid && (
+ <Typography className={classes.collectionLink}>
+ Output Collection:{" "}
+ <MuiLink
+ className={classes.keepLink}
+ onClick={() => {
+ navigateTo(outputUuid || "");
+ }}
+ >
+ {outputUuid}
+ </MuiLink>
+ </Typography>
+ )}
+ <ProcessOutputCollectionFiles
+ isWritable={false}
+ currentItemUuid={outputUuid}
+ />
+ </>
+ )}
+ {(subProcTabState === 1 || (!hasInputMounts && !hasOutputCollecton)) && (
+ <div className={classes.tableWrapper}>
+ <ProcessIORaw data={raw} />
+ </div>
+ )}
+ </div>
+ </>
+ ) : (
+ <Grid
+ container
+ item
+ alignItems="center"
+ justify="center"
+ >
+ <DefaultView messages={["No data to display"]} />
+ </Grid>
+ )}
+ </>
+ )}
+ </CardContent>
+ </Card>
+ );
+ }
+ )
+);