diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-01-14 11:05:00 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-01-14 11:05:08 +0100 |
commit | 42cf60a64a18c941b0c844ad3cf4ecd8f86a9612 (patch) | |
tree | 969ceb2a88f9b385ef2ab47fd96017c5f38739cf | |
parent | 877dfdc7ef5b0f6368f0da1693501d8e8f71a9c3 (diff) | |
download | sonarqube-42cf60a64a18c941b0c844ad3cf4ecd8f86a9612.tar.gz sonarqube-42cf60a64a18c941b0c844ad3cf4ecd8f86a9612.zip |
SONAR-6929 Issues page loads unnecessary facets
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/controller.js | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/components/navigator/controller.js | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/controller.js b/server/sonar-web/src/main/js/apps/issues/controller.js index 398f94344d2..31a13f246da 100644 --- a/server/sonar-web/src/main/js/apps/issues/controller.js +++ b/server/sonar-web/src/main/js/apps/issues/controller.js @@ -29,7 +29,9 @@ const FACET_DATA_FIELDS = ['components', 'users', 'rules', 'actionPlans', 'langu export default Controller.extend({ _facetsFromServer: function () { var facets = Controller.prototype._facetsFromServer.apply(this, arguments) || []; - facets.push('assigned_to_me'); + if (facets.indexOf('assignees') !== -1) { + facets.push('assigned_to_me'); + } return facets; }, diff --git a/server/sonar-web/src/main/js/components/navigator/controller.js b/server/sonar-web/src/main/js/components/navigator/controller.js index 9de0bc89a7e..28dbfad8d01 100644 --- a/server/sonar-web/src/main/js/components/navigator/controller.js +++ b/server/sonar-web/src/main/js/components/navigator/controller.js @@ -43,6 +43,7 @@ export default Marionette.Controller.extend({ return that.options.app.state.get('transform')[facet] != null ? that.options.app.state.get('transform')[facet] : facet; }); + facets = _.uniq(facets); return facets.filter(function (facet) { return that.options.app.state.get('allFacets').indexOf(facet) !== -1; }); |