aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-12-22 10:46:16 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-12-22 10:46:23 +0100
commitcb5a1d7fe4859d95a5ebeea7a4aa717fcf03f3a8 (patch)
tree9d6cf03e38aca013558ddd42b1da804377d6408a /server/sonar-web/src/main/js/api
parentbfa9e24fadd011c331e3af791ac189075a73b8e3 (diff)
downloadsonarqube-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.js6
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);
+}