aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-04-22 14:48:29 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-04-22 14:48:35 +0200
commit8676a96880c5d94eeed3d1407166704499d22875 (patch)
treed3f2aba0b18d7d050eb1960c4a465635af543a0c
parent1315fe1d47399c821a12d647e4c62b1fd54113fc (diff)
downloadsonarqube-8676a96880c5d94eeed3d1407166704499d22875.tar.gz
sonarqube-8676a96880c5d94eeed3d1407166704499d22875.zip
SONAR-5118 Add language criterion in issues search page
-rw-r--r--sonar-server/src/main/js/issues/app.js10
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb4
2 files changed, 13 insertions, 1 deletions
diff --git a/sonar-server/src/main/js/issues/app.js b/sonar-server/src/main/js/issues/app.js
index 86dc3f5794c..759312cec71 100644
--- a/sonar-server/src/main/js/issues/app.js
+++ b/sonar-server/src/main/js/issues/app.js
@@ -213,6 +213,15 @@ requirejs(
}),
new BaseFilters.Filter({
+ name: window.SS.phrases.language,
+ property: 'languages',
+ type: ChoiceFilters.ChoiceFilterView,
+ enabled: false,
+ optional: true,
+ choices: window.SS.languages
+ }),
+
+ new BaseFilters.Filter({
name: window.SS.phrases.reporter,
property: 'reporters',
type: AjaxSelectFilters.ReporterFilterView,
@@ -227,7 +236,6 @@ requirejs(
enabled: false,
optional: true
})
-
]);
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb
index f4447319d49..cba925a13ba 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb
@@ -46,6 +46,9 @@
statuses: <%= @options_for_statuses.to_json.html_safe -%>,
resolutions: <%= @options_for_resolutions.to_json.html_safe -%>,
favorites: <%= render :partial => 'issues/filter_favourites' -%>,
+ languages: {<% controller.java_facade.getLanguages().to_a.sort {|a,b| a.getName() <=> b.getName()}.each do |language| -%>
+ '<%= language.getKey().html_safe -%>': '<%= language.getName().html_safe -%>',
+ <% end %>},
phrases: {
'actionPlan': '<%= escape_javascript message('issue_filter.criteria.actionPlan') -%>',
@@ -57,6 +60,7 @@
'delete': '<%= escape_javascript message('delete') -%>',
'to': '<%= escape_javascript message('to.downcase') -%>',
'project': '<%= escape_javascript message('issue_filter.criteria.project') -%>',
+ 'language': '<%= escape_javascript message('language') -%>',
'severity': '<%= escape_javascript message('issue_filter.criteria.severity') -%>',
'severities': {
BLOCKER: '<%= escape_javascript message('severity.BLOCKER') -%>',