diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-08-15 10:50:50 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-08-17 16:42:15 +0200 |
commit | d61b51aaa96a8990ddec641ac4f3e37f4ea73947 (patch) | |
tree | 5cbecbe0d84d29b7ace9fc501b2138b92460ae6c /server/sonar-web/src/main/js/apps | |
parent | 4b2726e9feb0dbcaa07cf6dfe7d7bec3656d4ea0 (diff) | |
download | sonarqube-d61b51aaa96a8990ddec641ac4f3e37f4ea73947.tar.gz sonarqube-d61b51aaa96a8990ddec641ac4f3e37f4ea73947.zip |
SONAR-9719 Fix rule attributes display for inherited Quality Profile
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r-- | server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js index bc9b79867b0..467579af5a5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js @@ -135,8 +135,7 @@ export default Marionette.ItemView.extend({ return parent; }, - enhanceParameters() { - const parent = this.getParent(); + enhanceParameters(parent) { const params = sortBy(this.model.get('params'), 'key'); if (!parent) { return params; @@ -144,7 +143,7 @@ export default Marionette.ItemView.extend({ return params.map(p => { const parentParam = parent.params.find(param => param.key === p.key); if (parentParam != null) { - return { ...p, original: parentParam }; + return { ...p, original: parentParam.value }; } else { return p; } @@ -166,7 +165,7 @@ export default Marionette.ItemView.extend({ ...Marionette.ItemView.prototype.serializeData.apply(this, arguments), parent, canWrite: this.options.app.canWrite, - parameters: this.enhanceParameters(), + parameters: this.enhanceParameters(parent), templateKey: this.options.rule.get('templateKey'), isTemplate: this.options.rule.get('isTemplate'), profilePath: this.getProfilePath(this.model.get('lang'), this.model.get('name')), |