diff options
author | ssjenka <ssjenka@ops-slave-fedora25-1.internal.sonarsource.com> | 2017-11-21 08:02:23 +0100 |
---|---|---|
committer | ssjenka <ssjenka@ops-slave-fedora25-1.internal.sonarsource.com> | 2017-11-21 08:02:23 +0100 |
commit | da41cff1d4695e2644221ca60210209a143a17a7 (patch) | |
tree | 5bdaee63569b41f72c277eab65c6fe68bc83afae | |
parent | e408f1fda44fff60964426fdcc72023ba491b553 (diff) | |
parent | 63ef497ede0dad6346d039bf8745d0cf8b0636f6 (diff) | |
download | sonarqube-da41cff1d4695e2644221ca60210209a143a17a7.tar.gz sonarqube-da41cff1d4695e2644221ca60210209a143a17a7.zip |
Automatic merge from branch-6.7
* origin/branch-6.7:
SONAR-10054 Fix error when changing rule severity for a quality profile
-rw-r--r-- | server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js index cc2db14af0d..9609182b9ca 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profiles-view.js @@ -54,35 +54,36 @@ export default Marionette.CompositeView.extend({ }, activate() { - const that = this; const activationView = new ProfileActivationView({ rule: this.model, collection: this.collection, app: this.options.app }); activationView.on('profileActivated', (severity, params, profile) => { - if (that.options.app.state.get('query').qprofile === profile) { + if (this.options.app.state.get('query').qprofile === profile) { const activation = { severity, params, inherit: 'NONE', qProfile: profile }; - that.model.set({ activation }); + this.model.set({ activation }); } - that.refreshActives(); + this.refreshActives(); }); activationView.render(); }, refreshActives() { - const that = this; - this.options.app.controller.getRuleDetails(this.model).done(data => { - that.collection.reset( - that.model.getInactiveProfiles(data.actives, that.options.app.qualityProfiles) - ); - this.options.app.controller.updateActivation(this.model, data.actives); - }); + this.options.app.controller.getRuleDetails(this.model).then( + data => { + this.collection.reset( + this.model.getInactiveProfiles(data.actives, this.options.app.qualityProfiles) + ); + this.options.app.controller.updateActivation(this.model, data.actives); + }, + () => {} + ); }, serializeData() { |