Skip to content

Commit 0c90dae

Browse files
committed
#380 Remove the code for storing experiment parameters and its action
1 parent a2908a7 commit 0c90dae

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

webapp/components/experiments/ExperimentEdit.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import ParameterMenu from './ParameterMenu';
2626
import useStyles from './ExperimentEditStyle';
2727
import * as ExperimentHelper from './ExperimentHelper';
2828
import DialogBox from '../general/DialogBox';
29-
// import { useDispatch } from 'react-redux';
30-
// import { setExperimentParameters } from 'root/redux/actions/experiments';
3129
const RANGE_VALUE = 0;
3230
const SUPPORTED_TYPES = [REAL_TYPE.INT, REAL_TYPE.FLOAT, REAL_TYPE.STR, REAL_TYPE.BOOL];
3331
const MAX_TRIALS = 100;
@@ -268,9 +266,6 @@ const ExperimentEdit = (props) => {
268266
});
269267

270268
console.debug(`Size before ${paramKeys.length}, after: ${filteredKeys.length}`);
271-
// dispatch(setExperimentParameters({
272-
// parameters: filteredKeys,
273-
// }));
274269
setSelectionParams(filteredKeys);
275270
});
276271
};

webapp/redux/actions/experiments.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export const VIEW_EXPERIMENTS_RESULTS = 'VIEW_EXPERIMENT_RESULTS';
55
export const TRIAL_LOAD_MODEL_SPEC = 'TRIAL_LOAD_MODEL_SPEC';
66
export const OPEN_LAUNCH_DIALOG = 'OPEN_LAUNCH_DIALOG';
77
export const CLOSE_LAUNCH_DIALOG = 'CLOSE_LAUNCH_DIALOG';
8-
export const SET_EXPERIMENT_PARAMETERS = 'SET_EXPERIMENT_PARAMETERS';
98

109
/**
1110
* Triggers fetching the Experiments from the backend.
@@ -22,14 +21,6 @@ export const setExperiments = (payload) => ({
2221
payload,
2322
});
2423

25-
/**
26-
* Set fetched experiments.
27-
*/
28-
export const setExperimentParameters = (payload) => ({
29-
type: SET_EXPERIMENT_PARAMETERS,
30-
payload,
31-
});
32-
3324
/**
3425
* View results of selected experiment/trial.
3526
*/

webapp/redux/reducers/experiments.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ import {
33
OPEN_LAUNCH_DIALOG,
44
SET_EXPERIMENTS,
55
CLOSE_LAUNCH_DIALOG,
6-
SET_EXPERIMENT_PARAMETERS,
76
} from 'root/redux/actions/experiments';
87
import { EXPERIMENT_STATE } from 'root/constants';
98

109
export const EXPERIMENTS_DEFAULT_STATE = {
1110
experiments: [],
1211
inDesign: null,
1312
openLaunchDialog: false,
14-
experimentParams: [],
1513
};
1614

1715
export default (state = EXPERIMENTS_DEFAULT_STATE, action) => {
@@ -22,11 +20,6 @@ export default (state = EXPERIMENTS_DEFAULT_STATE, action) => {
2220
experiments: action.payload,
2321
inDesign: action.payload.find((el) => el.state === EXPERIMENT_STATE.DESIGN),
2422
};
25-
case SET_EXPERIMENT_PARAMETERS:
26-
return {
27-
...state,
28-
experimentParams: action.payload?.parameters,
29-
};
3023
case OPEN_LAUNCH_DIALOG:
3124
return {
3225
...state,

0 commit comments

Comments
 (0)