15027: Fixes unused declarations errors.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Fri, 23 Aug 2019 14:49:40 +0000 (11:49 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Fri, 23 Aug 2019 14:49:40 +0000 (11:49 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

src/components/search-input/search-input.tsx
src/index.tsx
src/models/workflow.ts
src/store/processes/processes-actions.ts
src/store/search-bar/search-bar-actions.ts
src/validators/max-length.tsx
src/validators/require.tsx
src/views/workflow-panel/workflow-panel-view.tsx

index f2ec2d6439024c066eebb2a0b8a18a0ec4fba901..64ffc396923ce6d097e05fb89317070ff6470488 100644 (file)
@@ -58,7 +58,6 @@ export const SearchInput = withStyles(styles)(
         timeout: number;
 
         render() {
         timeout: number;
 
         render() {
-            const { classes } = this.props;
             return <form onSubmit={this.handleSubmit}>
                 <FormControl>
                     <InputLabel>Search</InputLabel>
             return <form onSubmit={this.handleSubmit}>
                 <FormControl>
                     <InputLabel>Search</InputLabel>
index ee174b2c5325866878d6d7012552e64a1ae85478..f286b7be2ff96f1e26785464f0ae5f89e4f4b247 100644 (file)
@@ -40,8 +40,6 @@ import { setCurrentTokenDialogApiHost } from '~/store/current-token-dialog/curre
 import { processResourceActionSet } from '~/views-components/context-menu/action-sets/process-resource-action-set';
 import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions';
 import { trashedCollectionActionSet } from '~/views-components/context-menu/action-sets/trashed-collection-action-set';
 import { processResourceActionSet } from '~/views-components/context-menu/action-sets/process-resource-action-set';
 import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions';
 import { trashedCollectionActionSet } from '~/views-components/context-menu/action-sets/trashed-collection-action-set';
-import { ContainerRequestState } from '~/models/container-request';
-import { MountKind } from '~/models/mount-types';
 import { setBuildInfo } from '~/store/app-info/app-info-actions';
 import { getBuildInfo } from '~/common/app-info';
 import { DragDropContextProvider } from 'react-dnd';
 import { setBuildInfo } from '~/store/app-info/app-info-actions';
 import { getBuildInfo } from '~/common/app-info';
 import { DragDropContextProvider } from 'react-dnd';
@@ -153,181 +151,4 @@ const initListener = (history: History, store: RootStore, services: ServiceRepos
     };
 };
 
     };
 };
 
-const createDirectoriesArrayCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
-    workflowService.create({
-        name: 'Directories array collector',
-        description: 'Workflow for collecting directories array',
-        definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n  requirements:\n  - listing:\n    - entryname: input_collector.log\n      entry: |\n        \"multiple_collections\":\n          $(inputs.multiple_collections)\n\n    class: InitialWorkDirRequirement\n  inputs:\n  - type:\n      type: array\n      items: Directory\n    id: '#input_collector.cwl/multiple_collections'\n  outputs:\n  - type: File\n    outputBinding:\n      glob: '*'\n    id: '#input_collector.cwl/output'\n\n  baseCommand: [echo]\n  id: '#input_collector.cwl'\n- class: Workflow\n  doc: This is the description of the workflow\n  inputs:\n  - type:\n      type: array\n      items: Directory\n    label: Multiple Collections\n    doc: This should allow for selecting multiple collections.\n    id: '#main/multiple_collections'\n    default:\n    - class: Directory\n      location: keep:1e1682585d576f031b2d8b4944f989ee+57\n      basename: 1e1682585d576f031b2d8b4944f989ee+57\n    - class: Directory\n      location: keep:326f692370e9e121fcbd013796f7352a+57\n      basename: 326f692370e9e121fcbd013796f7352a+57\n  \n  outputs:\n  - type: File\n    outputSource: '#main/input_collector/output'\n\n    id: '#main/log_file'\n  steps:\n  - run: '#input_collector.cwl'\n    in:\n    - source: '#main/multiple_collections'\n      id: '#main/input_collector/multiple_collections'\n    out: ['#main/input_collector/output']\n    id: '#main/input_collector'\n  id: '#main'\n",
-    });
-};
-
-const createPrimitiveArraysCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
-    workflowService.create({
-        name: 'String, Int and Float arrays collector',
-        description: 'Workflow for collecting primitive data arrays',
-        definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n  requirements:\n  - listing:\n    - entryname: input_collector.log\n      entry: |\n        \"string array\":\n          $(inputs.example_string_array)\n        \"int array\":\n          $(inputs.example_int_array)\n        \"float array\":\n          $(inputs.example_float_array)\n\n    class: InitialWorkDirRequirement\n  inputs:\n  - type:\n      type: array\n      items: string\n    id: '#input_collector.cwl/example_string_array'\n  - type:\n      type: array\n      items: int\n    id: '#input_collector.cwl/example_int_array'\n  - type:\n      type: array\n      items: float\n    id: '#input_collector.cwl/example_float_array'\n  \n  outputs:\n  - type: File\n    outputBinding:\n      glob: '*'\n    id: '#input_collector.cwl/output'\n\n  baseCommand: [echo]\n  id: '#input_collector.cwl'\n- class: Workflow\n  doc: This is the description of the workflow\n  inputs:\n  - type:\n      type: array\n      items: string\n    label: Freetext Array\n    doc: This should allow for entering multiple strings.\n    id: '#main/example_string_array'\n    default:\n    - This is the first string\n    - This is the second string\n  - type:\n      type: array\n      items: int\n    label: Integer Array\n    doc: This should allow for entering multiple integers.\n    id: '#main/example_int_array'\n    default:\n    - 3\n    - 6\n  - type:\n      type: array\n      items: float\n    label: Float Array\n    doc: This should allow for entering multiple floats.\n    id: '#main/example_float_array'\n    default:\n    - 3.33\n    - 66.6\n\n  outputs:\n  - type: File\n    outputSource: '#main/input_collector/output'\n\n    id: '#main/log_file'\n  steps:\n  - run: '#input_collector.cwl'\n    in:\n    - source: '#main/example_string_array'\n      id: '#main/input_collector/example_string_array'\n    - source: '#main/example_int_array'\n      id: '#main/input_collector/example_int_array'\n    - source: '#main/example_float_array'\n      id: '#main/input_collector/example_float_array'\n    out: ['#main/input_collector/output']\n    id: '#main/input_collector'\n  id: '#main'\n",
-    });
-};
-
-const createFilesArrayCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
-    workflowService.create({
-        name: 'Files array collector',
-        description: 'Workflow for collecting files array',
-        definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n  requirements:\n  - listing:\n    - entryname: input_collector.log\n      entry: |\n        \"multiple_files\":\n          $(inputs.multiple_files)\n\n    class: InitialWorkDirRequirement\n  inputs:\n  - type:\n      type: array\n      items: File\n    id: '#input_collector.cwl/multiple_files'\n  outputs:\n  - type: File\n    outputBinding:\n      glob: '*'\n    id: '#input_collector.cwl/output'\n\n  baseCommand: [cat]\n  id: '#input_collector.cwl'\n- class: Workflow\n  doc: This is the description of the workflow\n  inputs:\n  - type:\n      type: array\n      items: File\n    label: Multiple Files\n    doc: This should allow for selecting multiple files.\n    id: '#main/multiple_files'\n    default:\n      - class: File\n        location: keep:af831660d820bcbb98f473355e6e1b85+67/fileA\n        basename: fileA\n        nameroot: fileA\n        nameext: ''\n  outputs:\n  - type: File\n    outputSource: '#main/input_collector/output'\n\n    id: '#main/log_file'\n  steps:\n  - run: '#input_collector.cwl'\n    in:\n    - source: '#main/multiple_files'\n      id: '#main/input_collector/multiple_files'\n    out: ['#main/input_collector/output']\n    id: '#main/input_collector'\n  id: '#main'\n",
-    });
-};
-
-const createPrimitivesCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
-    workflowService.create({
-        name: 'Primitive values collector',
-        description: 'Workflow for collecting primitive values',
-        definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n  requirements:\n  - listing:\n    - entryname: input_collector.log\n      entry: |\n        \"flag\":\n          $(inputs.example_flag)\n        \"string\":\n          $(inputs.example_string)\n        \"int\":\n          $(inputs.example_int)\n        \"long\":\n          $(inputs.example_long)\n        \"float\":\n          $(inputs.example_float)\n        \"double\":\n          $(inputs.example_double)\n    class: InitialWorkDirRequirement\n  inputs:\n  - type: double\n    id: '#input_collector.cwl/example_double'\n  - type: boolean\n    id: '#input_collector.cwl/example_flag'\n  - type: float\n    id: '#input_collector.cwl/example_float'\n  - type: int\n    id: '#input_collector.cwl/example_int'\n  - type: long\n    id: '#input_collector.cwl/example_long'\n  - type: string\n    id: '#input_collector.cwl/example_string'\n  outputs:\n  - type: File\n    outputBinding:\n      glob: '*'\n    id: '#input_collector.cwl/output'\n  baseCommand: [echo]\n  id: '#input_collector.cwl'\n- class: Workflow\n  doc: Workflw for collecting primitive values\n  inputs:\n  - type: double\n    label: Double value\n    doc: This should allow for entering a decimal number (64-bit).\n    id: '#main/example_double'\n    default: 0.3333333333333333\n  - type: boolean\n    label: Boolean Flag\n    doc: This should render as in checkbox.\n    id: '#main/example_flag'\n    default: true\n  - type: float\n    label: Float value\n    doc: This should allow for entering a decimal number (32-bit).\n    id: '#main/example_float'\n    default: 0.15625\n  - type: int\n    label: Integer Number\n    doc: This should allow for entering a number (32-bit signed).\n    id: '#main/example_int'\n    default: 2147483647\n  - type: long\n    label: Long Number\n    doc: This should allow for entering a number (64-bit signed).\n    id: '#main/example_long'\n    default: 9223372036854775807\n  - type: string\n    label: Freetext\n    doc: This should allow for entering an arbitrary char sequence.\n    id: '#main/example_string'\n    default: This is a string\n  outputs:\n  - type: File\n    outputSource: '#main/input_collector/output'\n    id: '#main/log_file'\n  steps:\n  - run: '#input_collector.cwl'\n    in:\n    - source: '#main/example_double'\n      id: '#main/input_collector/example_double'\n    - source: '#main/example_flag'\n      id: '#main/input_collector/example_flag'\n    - source: '#main/example_float'\n      id: '#main/input_collector/example_float'\n    - source: '#main/example_int'\n      id: '#main/input_collector/example_int'\n    - source: '#main/example_long'\n      id: '#main/input_collector/example_long'\n    - source: '#main/example_string'\n      id: '#main/input_collector/example_string'\n    out: ['#main/input_collector/output']\n    id: '#main/input_collector'\n  id: '#main'\n",
-    });
-};
-
-const createEnumCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
-    workflowService.create({
-        name: 'Enum values collector',
-        description: 'Workflow for collecting enum values',
-        definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n  requirements:\n  - listing:\n    - entryname: input_collector.log\n      entry: |\n        \"enum_type\":\n          $(inputs.enum_type)\n\n    class: InitialWorkDirRequirement\n  inputs:\n  - type:\n      type: enum\n      symbols: ['#input_collector.cwl/enum_type/OTU table', '#input_collector.cwl/enum_type/Pathway\n          table', '#input_collector.cwl/enum_type/Function table', '#input_collector.cwl/enum_type/Ortholog\n          table']\n    id: '#input_collector.cwl/enum_type'\n  outputs:\n  - type: File\n    outputBinding:\n      glob: '*'\n    id: '#input_collector.cwl/output'\n  baseCommand: [echo]\n  id: '#input_collector.cwl'\n- class: Workflow\n  doc: This is the description of the workflow\n  inputs:\n  - type:\n      type: enum\n      symbols: ['#main/enum_type/OTU table', '#main/enum_type/Pathway table', '#main/enum_type/Function\n          table', '#main/enum_type/Ortholog table']\n      name: '#enum_typef4179c7f-45f9-482d-a5db-1abb86698384'\n    label: Enumeration Type\n    doc: This should render as a drop-down menu.\n    id: '#main/enum_type'\n    default: OTU table\n  outputs:\n  - type: File\n    outputSource: '#main/input_collector/output'\n    id: '#main/log_file'\n  steps:\n  - run: '#input_collector.cwl'\n    in:\n    - source: '#main/enum_type'\n      id: '#main/input_collector/enum_type'\n    out: ['#main/input_collector/output']\n    id: '#main/input_collector'\n  id: '#main'\n",
-    });
-};
-
-const createFilesCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
-    workflowService.create({
-        name: 'File values collector',
-        description: 'Workflow for collecting file values',
-        definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n  requirements:\n  - listing:\n    - entryname: input_collector.log\n      entry: |\n        \"single_file\":\n          $(inputs.single_file.basename)\n        \"optional_file\":\n          $(inputs.optional_file.basename)\n\n    class: InitialWorkDirRequirement\n  inputs:\n  - type:\n    - 'null'\n    - File\n    id: '#input_collector.cwl/optional_file'\n  - type:\n    - 'null'\n    - File\n    id: '#input_collector.cwl/optional_file_missing_label'\n  - type: File\n    id: '#input_collector.cwl/single_file'\n  outputs:\n  - type: File\n    outputBinding:\n      glob: '*'\n    id: '#input_collector.cwl/output'\n\n  baseCommand: [echo]\n  id: '#input_collector.cwl'\n- class: Workflow\n  doc: This is the description of the workflow\n  inputs:\n  - type:\n    - 'null'\n    - File\n    label: Single File (Optional)\n    doc: This should allow for single File selection only. Input should be marked\n      as optional and not enforced by form validation.\n    id: '#main/optional_file'\n    default:\n      class: File\n      location: keep:af831660d820bcbb98f473355e6e1b85+67/fileA\n      basename: fileA\n      nameroot: fileA\n      nameext: ''\n  - type:\n    - 'null'\n    - File\n    doc: Label should be the input field name because of missing label.\n    id: '#main/optional_file_missing_label'\n  - type: File\n    label: Single File\n    doc: This should allow for single File selection only.\n    id: '#main/single_file'\n    default:\n      class: File\n      location: keep:af831660d820bcbb98f473355e6e1b85+67/fileA\n      basename: fileA\n      nameroot: fileA\n      nameext: ''\n  outputs:\n  - type: File\n    outputSource: '#main/input_collector/output'\n    id: '#main/log_file'\n  steps:\n  - run: '#input_collector.cwl'\n    in:\n    - source: '#main/optional_file'\n      id: '#main/input_collector/optional_file'\n    - source: '#main/single_file'\n      id: '#main/input_collector/single_file'\n    out: ['#main/input_collector/output']\n    id: '#main/input_collector'\n  id: '#main'\n",
-    });
-};
-
-const createCollectionCollectorWorkflow = ({ workflowService }: ServiceRepository) => {
-    workflowService.create({
-        name: 'Collection value collector',
-        description: 'Workflow for collecting a collecion',
-        definition: "cwlVersion: v1.0\n$graph:\n- class: CommandLineTool\n\n  requirements:\n  - listing:\n    - entryname: input_collector.log\n      entry: |\n        \"collection\":\n          $(inputs.collection.location)\n\n    class: InitialWorkDirRequirement\n  inputs:\n  - type: Directory\n    id: '#input_collector.cwl/collection'\n\n  outputs:\n  - type: File\n    outputBinding:\n      glob: '*'\n    id: '#input_collector.cwl/output'\n\n  baseCommand: [echo]\n  id: '#input_collector.cwl'\n- class: Workflow\n  doc: This is the description of the workflow\n  inputs:\n  - type: Directory\n    label: Single Collection\n    doc: This should allow for single Collection selection only.\n    id: '#main/collection'\n    default:\n      class: Directory\n      location: keep:af831660d820bcbb98f473355e6e1b85+67\n      basename: af831660d820bcbb98f473355e6e1b85+67\n  outputs:\n  - type: File\n    outputSource: '#main/input_collector/output'\n\n    id: '#main/log_file'\n  steps:\n  - run: '#input_collector.cwl'\n    in:\n    - source: '#main/collection'\n      id: '#main/input_collector/collection'\n    out: ['#main/input_collector/output']\n    id: '#main/input_collector'\n  id: '#main'\n",
-    });
-};
-
-const createSampleProcess = ({ containerRequestService }: ServiceRepository) => {
-    containerRequestService.create({
-        ownerUuid: 'c97qk-j7d0g-s3ngc1z0748hsmf',
-        name: 'Simple process 7',
-        state: ContainerRequestState.COMMITTED,
-        mounts: {
-            '/var/spool/cwl': {
-                kind: MountKind.COLLECTION,
-                writable: true,
-            },
-            'stdout': {
-                kind: MountKind.MOUNTED_FILE,
-                path: '/var/spool/cwl/cwl.output.json'
-            },
-            '/var/lib/cwl/workflow.json': {
-                kind: MountKind.JSON,
-                content: {
-                    "cwlVersion": "v1.0",
-                    "$graph": [
-                        {
-                            "class": "CommandLineTool",
-                            "requirements": [
-                                {
-                                    "listing": [
-                                        {
-                                            "entryname": "input_collector.log",
-                                            "entry": "$(inputs.single_file.basename)\n"
-                                        }
-                                    ],
-                                    "class": "InitialWorkDirRequirement"
-                                }
-                            ],
-                            "inputs": [
-                                {
-                                    "type": "File",
-                                    "id": "#input_collector.cwl/single_file"
-                                }
-                            ],
-                            "outputs": [
-                                {
-                                    "type": "File",
-                                    "outputBinding": {
-                                        "glob": "*"
-                                    },
-                                    "id": "#input_collector.cwl/output"
-                                }
-                            ],
-                            "baseCommand": [
-                                "echo"
-                            ],
-                            "id": "#input_collector.cwl"
-                        },
-                        {
-                            "class": "Workflow",
-                            "doc": "This is the description of the workflow",
-                            "inputs": [
-                                {
-                                    "type": "File",
-                                    "label": "Single File",
-                                    "doc": "This should allow for single File selection only.",
-                                    "id": "#main/single_file"
-                                }
-                            ],
-                            "outputs": [
-                                {
-                                    "type": "File",
-                                    "outputSource": "#main/input_collector/output",
-                                    "id": "#main/log_file"
-                                }
-                            ],
-                            "steps": [
-                                {
-                                    "run": "#input_collector.cwl",
-                                    "in": [
-                                        {
-                                            "source": "#main/single_file",
-                                            "id": "#main/input_collector/single_file"
-                                        }
-                                    ],
-                                    "out": [
-                                        "#main/input_collector/output"
-                                    ],
-                                    "id": "#main/input_collector"
-                                }
-                            ],
-                            "id": "#main"
-                        }
-                    ]
-                },
-            },
-            '/var/lib/cwl/cwl.input.json': {
-                kind: MountKind.JSON,
-                content: {
-                    "single_file": {
-                        "class": "File",
-                        "location": "keep:233454526794c0a2d56a305baeff3d30+145/1.txt",
-                        "basename": "fileA"
-                    }
-                },
-            }
-        },
-        runtimeConstraints: {
-            API: true,
-            vcpus: 1,
-            ram: 1073741824,
-        },
-        containerImage: 'arvados/jobs:1.1.4.20180618144723',
-        cwd: '/var/spool/cwl',
-        command: [
-            'arvados-cwl-runner',
-            '--local',
-            '--api=containers',
-            "--project-uuid=c97qk-j7d0g-s3ngc1z0748hsmf",
-            '/var/lib/cwl/workflow.json#main',
-            '/var/lib/cwl/cwl.input.json'
-        ],
-        outputPath: '/var/spool/cwl',
-        priority: 1,
-    });
-};
-
 // force build comment #1
 // force build comment #1
index 8d0b37de21cacbdac56e41202f71411f27e59d20..91f6b6e43ed6513828d75e299b9d339a2b6330e4 100644 (file)
@@ -121,11 +121,22 @@ export const parseWorkflowDefinition = (workflow: WorkflowResource): WorkflowRes
     return definition;
 };
 
     return definition;
 };
 
-export const getWorkflowInputs = (workflowDefinition: WorkflowResourceDefinition) => {
+export const getWorkflow = (workflowDefinition: WorkflowResourceDefinition) => {
     if (!workflowDefinition.$graph) { return undefined; }
     const mainWorkflow = workflowDefinition.$graph.find(item => item.class === 'Workflow' && item.id === '#main');
     return mainWorkflow
     if (!workflowDefinition.$graph) { return undefined; }
     const mainWorkflow = workflowDefinition.$graph.find(item => item.class === 'Workflow' && item.id === '#main');
     return mainWorkflow
-        ? mainWorkflow.inputs
+        ? mainWorkflow
+        : undefined;
+};
+
+export const getWorkflowInputs = (workflowDefinition: WorkflowResourceDefinition) => {
+    if (!workflowDefinition) { return undefined; }
+    // const mainWorkflow = workflowDefinition.$graph.find(item => item.class === 'Workflow' && item.id === '#main');
+    // return mainWorkflow
+    //     ? mainWorkflow.inputs
+    //     : undefined;
+    return getWorkflow(workflowDefinition)
+        ? getWorkflow(workflowDefinition)!.inputs
         : undefined;
 };
 
         : undefined;
 };
 
index b65a22027352a3a94b33c26ca620ca861aa0e920..47d6824a3075ad153bee90de36b63f25adead642 100644 (file)
@@ -19,7 +19,7 @@ import { initialize } from "redux-form";
 import { RUN_PROCESS_BASIC_FORM, RunProcessBasicFormData } from "~/views/run-process-panel/run-process-basic-form";
 import { RunProcessAdvancedFormData, RUN_PROCESS_ADVANCED_FORM } from "~/views/run-process-panel/run-process-advanced-form";
 import { MOUNT_PATH_CWL_WORKFLOW, MOUNT_PATH_CWL_INPUT } from '~/models/process';
 import { RUN_PROCESS_BASIC_FORM, RunProcessBasicFormData } from "~/views/run-process-panel/run-process-basic-form";
 import { RunProcessAdvancedFormData, RUN_PROCESS_ADVANCED_FORM } from "~/views/run-process-panel/run-process-advanced-form";
 import { MOUNT_PATH_CWL_WORKFLOW, MOUNT_PATH_CWL_INPUT } from '~/models/process';
-import { getWorkflowInputs } from "~/models/workflow";
+import { getWorkflow, getWorkflowInputs } from "~/models/workflow";
 
 export const loadProcess = (containerRequestUuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise<Process> => {
 
 export const loadProcess = (containerRequestUuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise<Process> => {
@@ -86,8 +86,8 @@ export const reRunProcess = (processUuid: string, workflowUuid: string) =>
         const workflows = getState().runProcessPanel.searchWorkflows;
         const workflow = workflows.find(workflow => workflow.uuid === workflowUuid);
         if (workflow && process) {
         const workflows = getState().runProcessPanel.searchWorkflows;
         const workflow = workflows.find(workflow => workflow.uuid === workflowUuid);
         if (workflow && process) {
-            let inputs = getWorkflowInputs(process.mounts[MOUNT_PATH_CWL_WORKFLOW]);
-            inputs = getInputs(process);
+            const mainWf = getWorkflow(process.mounts[MOUNT_PATH_CWL_WORKFLOW]);
+            if (mainWf) { mainWf.inputs = getInputs(process); }
             const stringifiedDefinition = JSON.stringify(process.mounts[MOUNT_PATH_CWL_WORKFLOW].content);
             const newWorkflow = { ...workflow, definition: stringifiedDefinition };
 
             const stringifiedDefinition = JSON.stringify(process.mounts[MOUNT_PATH_CWL_WORKFLOW].content);
             const newWorkflow = { ...workflow, definition: stringifiedDefinition };
 
index 1aa5c76140663ff510eac7035530d35f068b5031..e1551c23f89211876054cd1140457f1f3c7ef1fc 100644 (file)
@@ -202,12 +202,6 @@ export const submitData = (event: React.FormEvent<HTMLFormElement>) =>
     };
 
 
     };
 
 
-const startSearch = () =>
-    (dispatch: Dispatch, getState: () => RootState) => {
-        const searchValue = getState().searchBar.searchValue;
-        dispatch<any>(searchData(searchValue));
-    };
-
 const searchGroups = (searchValue: string, limit: number) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const currentView = getState().searchBar.currentView;
 const searchGroups = (searchValue: string, limit: number) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const currentView = getState().searchBar.currentView;
@@ -289,8 +283,6 @@ export const getQueryFromAdvancedData = (data: SearchBarAdvanceFormData, prevDat
         .forEach(p => keyMap.push([`has:"${p.key}"`, `prop-"${p.key}"`]));
 
     if (prevData) {
         .forEach(p => keyMap.push([`has:"${p.key}"`, `prop-"${p.key}"`]));
 
     if (prevData) {
-        const fd = flatData(data);
-        const pfd = flatData(prevData);
         const obj = getModifiedKeysValues(flatData(data), flatData(prevData));
         value = buildQueryFromKeyMap({
             searchValue: data.searchValue,
         const obj = getModifiedKeysValues(flatData(data), flatData(prevData));
         value = buildQueryFromKeyMap({
             searchValue: data.searchValue,
index 922e3e52706093929f04a44641e3276187cdbf78..370aa4c3a2ac939dbe8d957c8e1d7df691c4f22a 100644 (file)
@@ -5,12 +5,6 @@
 export const ERROR_MESSAGE = 'Maximum string length of this field is: ';
 export const DEFAULT_MAX_VALUE = 60;
 
 export const ERROR_MESSAGE = 'Maximum string length of this field is: ';
 export const DEFAULT_MAX_VALUE = 60;
 
-interface MaxLengthProps {
-    maxLengthValue: number;  
-    defaultErrorMessage: string;
-}
-
-// TODO types for maxLength
 export const maxLength: any = (maxLengthValue = DEFAULT_MAX_VALUE, errorMessage = ERROR_MESSAGE) => {
     return (value: string) => {
         if (value) {
 export const maxLength: any = (maxLengthValue = DEFAULT_MAX_VALUE, errorMessage = ERROR_MESSAGE) => {
     return (value: string) => {
         if (value) {
index f636850d5a9f0a13acfe909a3346cd3da2f3882b..fbba02aeb4d8e4127da10f58f12723d7672ef5ae 100644 (file)
@@ -4,11 +4,6 @@
 
 export const ERROR_MESSAGE = 'This field is required.';
 
 
 export const ERROR_MESSAGE = 'This field is required.';
 
-interface RequiredProps {
-    value: string;
-}
-
-// TODO types for require
 export const require: any = (value: string) => {
     return value && value.length > 0 ? undefined : ERROR_MESSAGE;
 };
 export const require: any = (value: string) => {
     return value && value.length > 0 ? undefined : ERROR_MESSAGE;
 };
index d8fa100e73d9d8f0061279c11407e6f2ead0a6fa..45f4423b219c8286a388275140c13095dcffaa64 100644 (file)
@@ -50,18 +50,19 @@ export enum ResourceStatus {
     SHARED = "Shared"
 }
 
     SHARED = "Shared"
 }
 
-const resourceStatus = (type: string) => {
-    switch (type) {
-        case ResourceStatus.PUBLIC:
-            return "Public";
-        case ResourceStatus.PRIVATE:
-            return "Private";
-        case ResourceStatus.SHARED:
-            return "Shared";
-        default:
-            return "Unknown";
-    }
-};
+// TODO: restore filters
+// const resourceStatus = (type: string) => {
+//     switch (type) {
+//         case ResourceStatus.PUBLIC:
+//             return "Public";
+//         case ResourceStatus.PRIVATE:
+//             return "Private";
+//         case ResourceStatus.SHARED:
+//             return "Shared";
+//         default:
+//             return "Unknown";
+//     }
+// };
 
 export const workflowPanelColumns: DataColumns<string> = [
     {
 
 export const workflowPanelColumns: DataColumns<string> = [
     {