diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-11-03 16:04:56 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-11-04 09:08:46 +0100 |
commit | cccb2e9097073eca88067d20cb14ecdd199e34d2 (patch) | |
tree | de3cfa4d1592eb993ca4713555e6d16e6d7775ac /server/sonar-web/src/main/js/apps/projects/store | |
parent | b87261c017f37215245972cbe9cf4a2f3c1fad44 (diff) | |
download | sonarqube-cccb2e9097073eca88067d20cb14ecdd199e34d2.tar.gz sonarqube-cccb2e9097073eca88067d20cb14ecdd199e34d2.zip |
SONAR-8300 open all facets
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projects/store')
4 files changed, 1 insertions, 121 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/store/filters/reducer.js b/server/sonar-web/src/main/js/apps/projects/store/filters/reducer.js deleted file mode 100644 index 830f667057c..00000000000 --- a/server/sonar-web/src/main/js/apps/projects/store/filters/reducer.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import { combineReducers } from 'redux'; -import statuses, * as fromStatuses from './statuses/reducer'; - -const reducer = combineReducers({ statuses }); - -export default reducer; - -export const getFilterStatus = (state, key) => ( - fromStatuses.getStatus(state.statuses, key) -); diff --git a/server/sonar-web/src/main/js/apps/projects/store/filters/statuses/actions.js b/server/sonar-web/src/main/js/apps/projects/store/filters/statuses/actions.js deleted file mode 100644 index d67bbc2bf57..00000000000 --- a/server/sonar-web/src/main/js/apps/projects/store/filters/statuses/actions.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -export const OPEN_FILTER = 'projects/OPEN_FILTER'; - -export const openFilter = key => ({ - type: OPEN_FILTER, - key -}); - -export const CLOSE_FILTER = 'projects/CLOSE_FILTER'; - -export const closeFilter = key => ({ - type: CLOSE_FILTER, - key -}); - -export const CLOSE_ALL_FILTERS = 'projects/CLOSE_ALL_FILTERS'; - -export const closeAllFilters = () => ({ - type: CLOSE_ALL_FILTERS -}); diff --git a/server/sonar-web/src/main/js/apps/projects/store/filters/statuses/reducer.js b/server/sonar-web/src/main/js/apps/projects/store/filters/statuses/reducer.js deleted file mode 100644 index 6606f476a7b..00000000000 --- a/server/sonar-web/src/main/js/apps/projects/store/filters/statuses/reducer.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import { OPEN_FILTER, CLOSE_FILTER, CLOSE_ALL_FILTERS } from './actions'; - -export const OPEN = 'OPEN'; -export const CLOSED = 'CLOSED'; - -const closeAll = state => { - const newState = { ...state }; - Object.keys(newState).forEach(key => newState[key] = CLOSED); - return newState; -}; - -const reducer = (state = {}, action = {}) => { - switch (action.type) { - case OPEN_FILTER: - return { ...state, [action.key]: OPEN }; - case CLOSE_FILTER: - return { ...state, [action.key]: CLOSED }; - case CLOSE_ALL_FILTERS: - return closeAll(state); - default: - return state; - } -}; - -export default reducer; - -export const getStatus = (state, key) => ( - state[key] -); diff --git a/server/sonar-web/src/main/js/apps/projects/store/reducer.js b/server/sonar-web/src/main/js/apps/projects/store/reducer.js index de306baa99d..1e2487aa794 100644 --- a/server/sonar-web/src/main/js/apps/projects/store/reducer.js +++ b/server/sonar-web/src/main/js/apps/projects/store/reducer.js @@ -20,10 +20,9 @@ import { combineReducers } from 'redux'; import projects, * as fromProjects from './projects/reducer'; import state from './state/reducer'; -import filters, * as fromFilters from './filters/reducer'; import facets, * as fromFacets from './facets/reducer'; -export default combineReducers({ projects, state, filters, facets }); +export default combineReducers({ projects, state, facets }); export const getProjects = state => ( fromProjects.getProjects(state.projects) @@ -33,10 +32,6 @@ export const getState = state => ( state.state ); -export const getFilterStatus = (state, key) => ( - fromFilters.getFilterStatus(state.filters, key) -); - export const getFacetByProperty = (state, property) => ( fromFacets.getFacetByProperty(state.facets, property) ); |