aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-12-14 18:12:15 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-12-14 18:13:21 +0100
commit9bfe1cb36e0edcb8fbca55e4871f19ca9cb4f91e (patch)
tree218c999de959b03ec0a749f986e592db39ac264b
parentcfaef377f3b8bffe51da8bbdd4838d961d63194b (diff)
downloadsonarqube-9bfe1cb36e0edcb8fbca55e4871f19ca9cb4f91e.tar.gz
sonarqube-9bfe1cb36e0edcb8fbca55e4871f19ca9cb4f91e.zip
Sort languages in Api::Utils.languages()
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb
index 5a96b151aa3..99ffe32669c 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb
@@ -168,7 +168,7 @@ class Api::Utils
end
def self.languages
- java_facade.getLanguages()
+ java_facade.getLanguages().sort_by(&:getName)
end
def self.language(key)
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb
index ee18bc9e7df..f2cc72743ea 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb
@@ -9,7 +9,7 @@
</thead>
<tbody>
<%
- Api::Utils.languages.sort_by { |l| l.getKey() }.each do |language|
+ Api::Utils.languages.each do |language|
selected_profile=@project.profile(language.getKey(), false)
%>
<tr class="<%= cycle 'even', 'odd' -%>">