]> source.dussan.org Git - sonarqube.git/commitdiff
fix SONAR-5820/SONAR-5973 change the way to request facets from server
authorStas Vilchik <vilchiks@gmail.com>
Thu, 15 Jan 2015 13:02:19 +0000 (14:02 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 19 Jan 2015 08:55:55 +0000 (09:55 +0100)
server/sonar-web/src/main/js/coding-rules/controller.js

index 277803b0f5f4fd1d1b0b9694310ebae3b6df0c3b..5bbdabe234f6da5fe81f701812be064b9eda066a 100644 (file)
@@ -18,7 +18,7 @@ define([
       return {
         p: this.app.state.get('page'),
         ps: this.pageSize,
-        facets: true,
+        facets: this._facetsFromServer().join(),
         f: this.ruleFields.join(),
         s: 'name',
         asc: true
@@ -64,7 +64,7 @@ define([
     requestFacet: function (id) {
       var url = baseUrl + '/api/rules/search',
           facet = this.app.facets.get(id),
-          options = _.extend({ facets: true, ps: 1 }, this.app.state.get('query'));
+          options = _.extend({ facets: id, ps: 1 }, this.app.state.get('query'));
       return $.get(url, options).done(function (r) {
         var facetData = _.findWhere(r.facets, { property: id });
         if (facetData) {