(option: Process | string)
| 42 | |
| 43 | // This function can take a Process in the case of the dropdown list or a string in the case of the input field when we want to add a process which is not in the list |
| 44 | const addProcessToSelection = (option: Process | string) => { |
| 45 | const processName = |
| 46 | typeof option === "string" ? option : extractProcessName(option); |
| 47 | |
| 48 | const newSelectedProcesses = selectedProcesses |
| 49 | ? `${selectedProcesses}, ${processName}` |
| 50 | : processName; |
| 51 | |
| 52 | dispatch(setSelectedProcesses({ server, value: newSelectedProcesses })); |
| 53 | }; |
| 54 | |
| 55 | const removeProcessFromSelection = (option: Process) => { |
| 56 | const newSelectedProcesses = selectedProcesses |
no test coverage detected
searching dependent graphs…