]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5137 Use lexical order for quality profiles list
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 12 Jun 2014 12:56:42 +0000 (14:56 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 12 Jun 2014 12:56:49 +0000 (14:56 +0200)
sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-quality-profile-view.coffee
sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee
sonar-server/src/main/less/coding-rules.less

index c1f3c9a201ddd09e829a5002f27a464956032878..651fb072a29e00d666240e91c3d181d4cbf05fb2 100644 (file)
@@ -27,10 +27,6 @@ define [
       'click @ui.deactivate': 'deactivate'
 
 
-    initialize: ->
-      super
-      @model.set _.findWhere(@options.app.qualityProfiles, key: @model.get('qProfile'))
-
     change: ->
       @options.app.codingRulesQualityProfileActivationView.model = @model
       @options.app.codingRulesQualityProfileActivationView.show()
index 010bf60bd5fb2c3cf1e196563dcd8ad37509b7d3..9ab21979bd327106e2255b56222c26fe80fc543c 100644 (file)
@@ -77,7 +77,10 @@ define [
         #  collection: customRules
         #  rule: @model
       else
-        qualityProfiles = new Backbone.Collection options.actives
+        _.map options.actives, (active) =>
+          _.extend active, options.app.getQualityProfileByKey active.qProfile
+        qualityProfiles = new Backbone.Collection options.actives,
+          comparator: 'name'
         @qualityProfilesView = new CodingRulesDetailQualityProfilesView
           app: @options.app
           collection: qualityProfiles
index 2e158748b82e52961f636b761fc283f10014d9ff..fb39f9c2a018d3a4325b69566043e10e1df70e15 100644 (file)
   width: 15%;
   font-weight: bold;
   white-space: nowrap;
+  padding-right: 5px;
 }
 
 .coding-rules-detail-quality-profile-severity {