aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-04-18 14:43:58 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-04-18 14:43:58 +0200
commitac1ded423528b87830326c0c4309f997bfcf38fd (patch)
tree7fd9ac99862a9facc50784d4d0ec16adbb3dd5e0
parent2564adc5cf9a5fd38fadc14fb7dae9df6c534d09 (diff)
downloadsonarqube-ac1ded423528b87830326c0c4309f997bfcf38fd.tar.gz
sonarqube-ac1ded423528b87830326c0c4309f997bfcf38fd.zip
SONAR-7476 Provide a link to inactive rules from a quality profile page
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/templates/quality-profiles-profile-details.hbs3
2 files changed, 5 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
index 26748b8e3be..a914b3ac6be 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
@@ -170,8 +170,10 @@ export default Marionette.LayoutView.extend({
serializeData () {
const key = this.model.get('key');
const rulesSearchUrl = `/coding_rules#qprofile=${encodeURIComponent(key)}|activation=true`;
+ const activateRulesUrl = `/coding_rules#qprofile=${encodeURIComponent(key)}|activation=false`;
return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), {
rulesSearchUrl,
+ activateRulesUrl,
canWrite: this.options.canWrite,
exporters: this.getExporters()
});
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/templates/quality-profiles-profile-details.hbs b/server/sonar-web/src/main/js/apps/quality-profiles/templates/quality-profiles-profile-details.hbs
index f6f6a50f1cf..4ec68258a75 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/templates/quality-profiles-profile-details.hbs
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/templates/quality-profiles-profile-details.hbs
@@ -3,6 +3,9 @@
<div class="column-two-thirds" id="quality-profile-rules">
<header class="page-header">
<h3 class="page-title">{{t 'coding_rules'}}</h3>
+ <div class="button-group big-spacer-left">
+ <a class="button" href="{{link activateRulesUrl}}">{{t 'coding_rules.activate'}}</a>
+ </div>
</header>
<div>