]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7476 Provide a link to inactive rules from a quality profile page
authorStas Vilchik <vilchiks@gmail.com>
Mon, 18 Apr 2016 12:43:58 +0000 (14:43 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 18 Apr 2016 12:43:58 +0000 (14:43 +0200)
server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
server/sonar-web/src/main/js/apps/quality-profiles/templates/quality-profiles-profile-details.hbs

index 26748b8e3bee235d9587520bef3b5abd8d4f5112..a914b3ac6beb1bab269181c3674ee2306d697b14 100644 (file)
@@ -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()
     });
index f6f6a50f1cfbfb12ba80027e2734147da3b5ef54..4ec68258a75d1d68fa4d6b2e5f4181bd3a59fbea 100644 (file)
@@ -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>