15814: Specifically communicate secrets cannot be displayed
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 27 Jun 2024 19:18:02 +0000 (15:18 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 27 Jun 2024 19:18:02 +0000 (15:18 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

services/workbench2/src/views/process-panel/process-io-card.tsx

index f4b69094f48fa04b769aeb2da691af3b1aa47410..a551a0d8ec30ba6ddf02f2e5531fe5642d942586 100644 (file)
@@ -689,6 +689,9 @@ type FileWithSecondaryFiles = {
 
 export const getIOParamDisplayValue = (auth: AuthState, input: CommandInputParameter | CommandOutputParameter, pdh?: string): ProcessIOValue[] => {
     switch (true) {
+        case (typeof input.value === 'object') && input.value.$include?.startsWith("/secrets/"):
+            return [{ display: <SecretValue /> }];
+
         case isPrimitiveOfType(input, CWLType.BOOLEAN):
             const boolValue = (input as BooleanCommandInputParameter).value;
             return boolValue !== undefined && !(Array.isArray(boolValue) && boolValue.length === 0)
@@ -995,6 +998,8 @@ export const EmptyValue = withStyles(styles)(({ classes }: WithStyles<CssRules>)
 
 const UnsupportedValue = withStyles(styles)(({ classes }: WithStyles<CssRules>) => <span className={classes.emptyValue}>Cannot display value</span>);
 
+const SecretValue = withStyles(styles)(({ classes }: WithStyles<CssRules>) => <span className={classes.emptyValue}>Cannot display secret</span>);
+
 const UnsupportedValueChip = withStyles(styles)(({ classes }: WithStyles<CssRules>) => (
     <Chip
         icon={<InfoIcon />}