diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2017-01-19 10:56:07 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2017-01-24 18:36:48 +0100 |
commit | 88acbdf4f3ff3076a353396a6df137f55a959df4 (patch) | |
tree | 425c78fc4d03657feffd6f54699c4a2903c799a7 /server/sonar-web/src/main/js/apps/issues | |
parent | 919955b34e8c92cd2572a42d276db4445e982c6c (diff) | |
download | sonarqube-88acbdf4f3ff3076a353396a6df137f55a959df4.tar.gz sonarqube-88acbdf4f3ff3076a353396a6df137f55a959df4.zip |
SONAR-7303 replace usage of /api/resources/search by /api/components/search
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/facets/project-facet.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/project-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/project-facet.js index a1ec2a3041f..5f58f3caaca 100644 --- a/server/sonar-web/src/main/js/apps/issues/facets/project-facet.js +++ b/server/sonar-web/src/main/js/apps/issues/facets/project-facet.js @@ -27,10 +27,27 @@ export default CustomValuesFacet.extend({ if (q === 'VW' || q === 'SVW') { return window.baseUrl + '/api/components/search_view_components'; } else { - return window.baseUrl + '/api/resources/search?f=s2&q=TRK&display_uuid=true'; + return window.baseUrl + '/api/components/search?qualifiers=TRK'; } }, + prepareAjaxSearch () { + return { + quietMillis: 300, + url: this.getUrl(), + data (term, page) { + return { q: term, p: page }; + }, + results: r => ({ + more: r.paging.total > r.paging.pageIndex * r.paging.pageSize, + results: r.components.map(component => ({ + id: component.id, + text: component.name + })) + }) + }; + }, + prepareSearch () { const q = this.options.app.state.get('contextComponentQualifier'); if (q === 'VW' || q === 'SVW') { |