From: Stas Vilchik Date: Thu, 2 Feb 2017 16:39:10 +0000 (+0100) Subject: display organization when searching for views X-Git-Tag: 6.3-RC1~233 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f579d4dbd66f73056fa92bc23e639078a0d2254e;p=sonarqube.git display organization when searching for views --- diff --git a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js index 070d80e993c..4976ff11348 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js @@ -39,6 +39,8 @@ type Finding = { extra?: string }; +const SHOW_ORGANIZATION_FOR_QUALIFIERS = ['TRK', 'VW', 'SVW']; + const SearchItemView = Marionette.ItemView.extend({ tagName: 'li', template: SearchItemTemplate, @@ -214,7 +216,8 @@ export default Marionette.LayoutView.extend({ const collection = []; r.results.forEach(({ items, q }) => { items.forEach((item, index) => { - const showOrganization = customOrganizations && item.organization != null && q === 'TRK'; + const showOrganization = customOrganizations && item.organization != null && + SHOW_ORGANIZATION_FOR_QUALIFIERS.includes(q); const organization = showOrganization ? getOrganization(item.organization) : null; collection.push({ ...item,