]> source.dussan.org Git - sonarqube.git/commitdiff
hide licenses on settings page 1210/head
authorStas Vilchik <vilchiks@gmail.com>
Mon, 5 Sep 2016 13:21:16 +0000 (15:21 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 5 Sep 2016 13:23:36 +0000 (15:23 +0200)
server/sonar-web/src/main/js/apps/settings/store/actions.js

index f2ba7d709e6d1d7720c45a27649b0849bc69964c..9df87830936469b344543d138a5def8b06e6ce2d 100644 (file)
@@ -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 => {