diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-12-22 10:46:16 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-12-22 10:46:23 +0100 |
commit | cb5a1d7fe4859d95a5ebeea7a4aa717fcf03f3a8 (patch) | |
tree | 9d6cf03e38aca013558ddd42b1da804377d6408a /server/sonar-web/src/main/js/api | |
parent | bfa9e24fadd011c331e3af791ac189075a73b8e3 (diff) | |
download | sonarqube-cb5a1d7fe4859d95a5ebeea7a4aa717fcf03f3a8.tar.gz sonarqube-cb5a1d7fe4859d95a5ebeea7a4aa717fcf03f3a8.zip |
SONAR-7149 Add an ability to search for sub-components
Diffstat (limited to 'server/sonar-web/src/main/js/api')
-rw-r--r-- | server/sonar-web/src/main/js/api/components.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/api/components.js b/server/sonar-web/src/main/js/api/components.js index 24f8c446a6f..5d78f0b3477 100644 --- a/server/sonar-web/src/main/js/api/components.js +++ b/server/sonar-web/src/main/js/api/components.js @@ -49,3 +49,9 @@ export function getComponent (componentKey, metrics = []) { const data = { resource: componentKey, metrics: metrics.join(',') }; return getJSON(url, data).then(r => r[0]); } + +export function getTree(baseComponentKey, options = {}) { + const url = baseUrl + '/api/components/tree'; + const data = Object.assign({}, options, { baseComponentKey }); + return getJSON(url, data); +} |