Improve run process form layout
[arvados-workbench2.git] / src / models / workflow.ts
index 1cb3d46e8cb09a925adf1cd1b87de5f61f49b2ea..88ceb6ed5400714e26a35d523181c5fabe041c4f 100644 (file)
@@ -119,7 +119,7 @@ export const getWorkflowInputs = (workflowDefinition: WorkflowResoruceDefinition
         : undefined;
 };
 export const getInputLabel = (input: CommandInputParameter) => {
-    return `${input.label || input.id}${isRequiredInput(input) ? '*' : ''}`;
+    return `${input.label || input.id}`;
 };
 
 export const isRequiredInput = ({ type }: CommandInputParameter) => {
@@ -132,6 +132,12 @@ export const isRequiredInput = ({ type }: CommandInputParameter) => {
     }
     return true;
 };
+
+export const isPrimitiveOfType = (input: GenericCommandInputParameter<any, any>, type: CWLType) =>
+    input.type instanceof Array
+        ? input.type.indexOf(type) > -1
+        : input.type === type;
+
 export const stringifyInputType = ({ type }: CommandInputParameter) => {
     if (typeof type === 'string') {
         return type;