MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / addProcessToSelection

Function addProcessToSelection

web/src/js/components/Modes/LocalDropdown.tsx:44–53  ·  view source on GitHub ↗
(option: Process | string)

Source from the content-addressed store, hash-verified

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

Callers 2

handleApplicationClickFunction · 0.85
handleInputKeyDownFunction · 0.85

Calls 2

extractProcessNameFunction · 0.85
dispatchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…