aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/coding-rules/models
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-09-16 15:21:31 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-09-16 15:24:10 +0200
commit6de86daae8f53f77a2c5a75b1f8eceb7c6cc5ccc (patch)
tree9746fa6c4a3b457db988e0cb8827b845012b2bd1 /server/sonar-web/src/main/js/apps/coding-rules/models
parent937ac93f4d23638cedcec44629a571e06a14a6f3 (diff)
downloadsonarqube-6de86daae8f53f77a2c5a75b1f8eceb7c6cc5ccc.tar.gz
sonarqube-6de86daae8f53f77a2c5a75b1f8eceb7c6cc5ccc.zip
SONAR-6598 scroll index should be saved when (de-)activating a rule in a profile
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules/models')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/models/rule.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/models/rule.js b/server/sonar-web/src/main/js/apps/coding-rules/models/rule.js
index 51993df4b98..9610739b9dd 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/models/rule.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/models/rule.js
@@ -32,6 +32,16 @@ define(function () {
isManual: isManual,
isCustom: isCustom
}, { silent: true });
+ },
+
+ getInactiveProfiles: function (actives, profiles) {
+ return actives.map(function (profile) {
+ var profileBase = _.findWhere(profiles, { key: profile.qProfile });
+ if (profileBase != null) {
+ _.extend(profile, profileBase);
+ }
+ return profile;
+ });
}
});