From: Stas Vilchik Date: Mon, 5 Sep 2016 13:21:16 +0000 (+0200) Subject: hide licenses on settings page X-Git-Tag: 6.1-RC1~215 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F1210%2Fhead;p=sonarqube.git hide licenses on settings page --- diff --git a/server/sonar-web/src/main/js/apps/settings/store/actions.js b/server/sonar-web/src/main/js/apps/settings/store/actions.js index f2ba7d709e6..9df87830936 100644 --- a/server/sonar-web/src/main/js/apps/settings/store/actions.js +++ b/server/sonar-web/src/main/js/apps/settings/store/actions.js @@ -30,8 +30,9 @@ import { getDefinition, getChangedValue } from './rootReducer'; export const fetchSettings = componentKey => dispatch => { return getDefinitions(componentKey) .then(definitions => { - dispatch(receiveDefinitions(definitions)); - const keys = definitions.map(definition => definition.key).join(); + const withoutLicenses = definitions.filter(definition => definition.type !== 'LICENSE'); + dispatch(receiveDefinitions(withoutLicenses)); + const keys = withoutLicenses.map(definition => definition.key).join(); return getValues(keys, componentKey); }) .then(settings => {