]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5135 Remove "bulk change severity" feature
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 18 Jun 2014 19:57:51 +0000 (21:57 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 18 Jun 2014 19:57:51 +0000 (21:57 +0200)
sonar-server/src/main/coffee/coding-rules/views/coding-rules-bulk-change-dropdown-view.coffee
sonar-server/src/main/coffee/coding-rules/views/coding-rules-bulk-change-view.coffee
sonar-server/src/main/hbs/coding-rules/coding-rules-bulk-change-dropdown.hbs
sonar-server/src/main/hbs/coding-rules/coding-rules-bulk-change.hbs

index 50ca633e694d6945c15bc9ac3e9d5e2388822b87..27552173ff95cdf93b19981f6613ac6006f4e166 100644 (file)
@@ -53,4 +53,3 @@ define [
       language: @options.app.languageFilter.view.renderValue()
       allowActivateOnProfile: qualityProfile and (activationValues.length == 0 or activationValues[0] == 'false')
       allowDeactivateOnProfile: qualityProfile and (activationValues.length == 0 or activationValues[0] == 'true')
-      allowChangeSeverity: qualityProfile and activationValues.length > 0 and activationValues[0] == 'true'
index 8b26d3f0afaf2ae10cee7f36d0e4bcff134a521b..de092804e9362fe836ea952842d9f8eaa29963d0 100644 (file)
@@ -41,17 +41,6 @@ define [
         width: '250px'
         minimumResultsForSearch: 1
 
-      format = (state) ->
-        return state.text unless state.id
-        "<i class='icon-severity-#{state.id.toLowerCase()}'></i> #{state.text}"
-      @$('#coding-rules-bulk-change-severity').select2
-        width: '250px'
-        minimumResultsForSearch: 999
-        formatResult: format
-        formatSelection: format
-        escapeMarkup: (m) -> m
-
-
     show: (action, param = null) ->
       @action = action
       @profile = param
@@ -69,20 +58,9 @@ define [
 
 
     prepareQuery: ->
-      query = @options.app.getQuery()
-
-      if @action == 'activate' || @action == 'deactivate'
-        _.extend query,
-          wsAction: @action
-          profile_key: @$('#coding-rules-bulk-change-profile').val() or @profile
-
-      if @action == 'change-severity'
-        _.extend query,
-          wsAction: 'activate'
-          profile_key: @profile
-          activation_severity: @$('#coding-rules-bulk-change-severity').val()
-
-      query
+      _.extend @options.app.getQuery(),
+        wsAction: @action
+        profile_key: @$('#coding-rules-bulk-change-profile').val() or @profile
 
 
     bulkChange: (query) ->
@@ -140,5 +118,3 @@ define [
       qualityProfileName: @options.app.qualityProfileFilter.view.renderValue()
 
       availableQualityProfiles: @getAvailableQualityProfiles()
-
-      severities: ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO']
index 9d17125884c7ebcd1d8300cfae9ff919abc73d8b..3fcb25ba37a3c878d4ae82945bf18ff45414f6db 100644 (file)
     {{tp 'coding_rules.deactivate_in'}} <strong>{{qualityProfileName}}</strong>
   </a>
 {{/if}}
-
-
-
-{{! severity }}
-
-{{#if allowChangeSeverity}}
-  <a class="coding-rules-bulk-change-dropdown-link" data-action="change-severity" data-param="{{qualityProfile}}">
-    {{t 'coding_rules.change_severity_in'}} <strong>{{qualityProfileName}}</strong>
-  </a>
-{{/if}}
index 6abb8c38db0beeb72f2cc3b07228259ac403bd36..c463314cd4dda6d9d60b08ebb67cb480fbd2e711 100644 (file)
@@ -6,9 +6,6 @@
     {{#eq action 'deactivate'}}
       <h2>{{t 'coding_rules.deactivate_in_quality_profile'}} ({{paging.total}} {{t 'coding_rules._rules'}})</h2>
     {{/eq}}
-    {{#eq action 'change-severity'}}
-      <h2>{{t 'coding_rules.change_severity'}} ({{paging.total}} {{t 'coding_rules._rules'}})</h2>
-    {{/eq}}
   </div>
 
   <div class="modal-body">
         </select>
       {{/if}}
     </div>
-
-
-    {{#eq action 'change-severity'}}
-      {{#if qualityProfile}}
-        <div class="modal-field">
-          <h3><label for="coding-rules-bulk-change-severity">{{t 'severity'}}</label></h3>
-          <select id="coding-rules-bulk-change-severity">
-            {{#each severities}}
-              <option value="{{this}}">{{t 'severity' this}}</option>
-            {{/each}}
-          </select>
-        </div>
-      {{/if}}
-    {{/eq}}
   </div>
 
   <div class="modal-foot">