aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-11-05 13:21:28 +0100
committerStas Vilchik <vilchiks@gmail.com>2014-11-05 13:37:24 +0100
commit01b71ecf83d44f1623c1b060d59a15e9142ed5e8 (patch)
tree2cf6e7a3d7ffd447190cf1c7f873e1ef037e1c57 /server
parent77c6cbc7ae4aa860004e3113b5a9f585afa24611 (diff)
downloadsonarqube-01b71ecf83d44f1623c1b060d59a15e9142ed5e8.tar.gz
sonarqube-01b71ecf83d44f1623c1b060d59a15e9142ed5e8.zip
SONAR-5718 Search rules only for selected languages
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/coffee/issues/facets/rule-facet.coffee6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/coffee/issues/facets/rule-facet.coffee b/server/sonar-web/src/main/coffee/issues/facets/rule-facet.coffee
index 274238cf389..878c6eb0690 100644
--- a/server/sonar-web/src/main/coffee/issues/facets/rule-facet.coffee
+++ b/server/sonar-web/src/main/coffee/issues/facets/rule-facet.coffee
@@ -18,6 +18,10 @@ define [
onRender: ->
super
+ url = "#{baseUrl}/api/rules/search?f=name"
+ languages = @options.app.state.get('query').languages
+ if languages?
+ url += "&languages=#{languages}"
@$('.js-issues-custom-value').select2
placeholder: 'Add rule'
minimumInputLength: 2
@@ -28,7 +32,7 @@ define [
width: '100%'
ajax:
quietMillis: 300
- url: "#{baseUrl}/api/rules/search?f=name"
+ url: url
data: (term, page) -> { q: term, p: page }
results: (data) ->
results = data.rules.map (rule) ->