aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/store
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2018-05-30 16:33:07 +0200
committerSonarTech <sonartech@sonarsource.com>2018-06-12 20:21:00 +0200
commit32f2ea7b9d89a31350e2f0c2db9172f637cd21c6 (patch)
treeff369725a32ce6f4423d22a340a252c53a0734d8 /server/sonar-web/src/main/js/store
parent838ad5e985f44385a79574900707478f97ba1567 (diff)
downloadsonarqube-32f2ea7b9d89a31350e2f0c2db9172f637cd21c6.tar.gz
sonarqube-32f2ea7b9d89a31350e2f0c2db9172f637cd21c6.zip
SONAR-10696 Move set license form to core-extension-license
Diffstat (limited to 'server/sonar-web/src/main/js/store')
-rw-r--r--server/sonar-web/src/main/js/store/marketplace/actions.ts19
-rw-r--r--server/sonar-web/src/main/js/store/marketplace/reducer.ts8
-rw-r--r--server/sonar-web/src/main/js/store/rootReducer.js3
3 files changed, 1 insertions, 29 deletions
diff --git a/server/sonar-web/src/main/js/store/marketplace/actions.ts b/server/sonar-web/src/main/js/store/marketplace/actions.ts
index 7e9b6156d9c..3f007ae52e1 100644
--- a/server/sonar-web/src/main/js/store/marketplace/actions.ts
+++ b/server/sonar-web/src/main/js/store/marketplace/actions.ts
@@ -18,7 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { Dispatch } from 'react-redux';
-import { getEditionStatus } from '../../api/marketplace';
import { getPendingPlugins, PluginPendingResult } from '../../api/plugins';
interface SetPendingPluginsAction {
@@ -26,28 +25,12 @@ interface SetPendingPluginsAction {
pending: PluginPendingResult;
}
-interface SetCurrentEditionAction {
- type: 'SET_CURRENT_EDITION';
- currentEdition?: string;
-}
-
-export type Action = SetCurrentEditionAction | SetPendingPluginsAction;
+export type Action = SetPendingPluginsAction;
export function setPendingPlugins(pending: PluginPendingResult): SetPendingPluginsAction {
return { type: 'SET_PENDING_PLUGINS', pending };
}
-export const setCurrentEdition = (currentEdition?: string) => (dispatch: Dispatch<Action>) => {
- dispatch({ type: 'SET_CURRENT_EDITION', currentEdition });
-};
-
-export const fetchCurrentEdition = () => (dispatch: Dispatch<Action>) => {
- getEditionStatus().then(
- editionStatus => dispatch(setCurrentEdition(editionStatus.currentEditionKey)),
- () => {}
- );
-};
-
export const fetchPendingPlugins = () => (dispatch: Dispatch<Action>) => {
getPendingPlugins().then(
pending => {
diff --git a/server/sonar-web/src/main/js/store/marketplace/reducer.ts b/server/sonar-web/src/main/js/store/marketplace/reducer.ts
index 55ad93d69db..3ab4d778848 100644
--- a/server/sonar-web/src/main/js/store/marketplace/reducer.ts
+++ b/server/sonar-web/src/main/js/store/marketplace/reducer.ts
@@ -21,7 +21,6 @@ import { Action } from './actions';
import { PluginPendingResult } from '../../api/plugins';
interface State {
- currentEdition?: string;
pending: PluginPendingResult;
}
@@ -34,14 +33,7 @@ export default function(state: State = defaultState, action: Action): State {
pending: action.pending
};
}
- if (action.type === 'SET_CURRENT_EDITION') {
- return {
- ...state,
- currentEdition: action.currentEdition
- };
- }
return state;
}
-export const getCurrentEdition = (state: State) => state.currentEdition;
export const getPendingPlugins = (state: State) => state.pending;
diff --git a/server/sonar-web/src/main/js/store/rootReducer.js b/server/sonar-web/src/main/js/store/rootReducer.js
index 7581381ce28..9f724a71fc5 100644
--- a/server/sonar-web/src/main/js/store/rootReducer.js
+++ b/server/sonar-web/src/main/js/store/rootReducer.js
@@ -73,9 +73,6 @@ export const isFavorite = (state, componentKey) =>
export const getMarketplaceState = state => state.marketplace;
-export const getMarketplaceCurrentEdition = state =>
- fromMarketplace.getCurrentEdition(state.marketplace);
-
export const getMarketplacePendingPlugins = state =>
fromMarketplace.getPendingPlugins(state.marketplace);