Deleted unused components in exploreV2 (#1613)

* Deleted unused components in exploreV2

* Deleted constants.js
This commit is contained in:
vera-liu
2016-11-16 14:33:00 -08:00
committed by GitHub
parent 51cb485ce3
commit 811ee8ccdc
9 changed files with 0 additions and 513 deletions

View File

@@ -1,13 +1,8 @@
import { defaultOpts } from '../stores/store';
import * as actions from '../actions/exploreActions';
import { addToArr, removeFromArr, alterInArr } from '../../../utils/reducerUtils';
export const exploreReducer = function (state, action) {
const actionHandlers = {
[actions.SET_DATASOURCE]() {
return Object.assign({}, state, { datasourceId: action.datasourceId });
},
[actions.FETCH_STARTED]() {
return Object.assign({}, state, { isDatasourceMetaLoading: true });
},
@@ -33,10 +28,6 @@ export const exploreReducer = function (state, action) {
return Object.assign({}, state, newState);
},
[actions.TOGGLE_SEARCHBOX]() {
return Object.assign({}, state, { searchBox: action.searchBox });
},
[actions.SET_FILTER_COLUMN_OPTS]() {
return Object.assign({}, state, { filterColumnOpts: action.filterColumnOpts });
},
@@ -55,9 +46,6 @@ export const exploreReducer = function (state, action) {
[actions.CHANGE_FILTER_VALUE]() {
return alterInArr(state, 'filters', action.filter, { value: action.value });
},
[actions.CLEAR_ALL_OPTS]() {
return Object.assign({}, state, defaultOpts);
},
[actions.SET_FIELD_VALUE]() {
const newFormData = Object.assign({}, state.viz.form_data);
newFormData[action.key] = action.value ? action.value : (!state.viz.form_data[action.key]);