aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-10-18 09:46:22 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-10-21 10:24:17 +0200
commitb7129679327efeeb44f9205656b46376adfe9689 (patch)
treef01159db52a79aae8e478dcafe79a7d9d22156c6 /server/sonar-web/src/main/js/api
parent3d8cdcbf8558e40385f481272045056d5435a3e6 (diff)
downloadsonarqube-b7129679327efeeb44f9205656b46376adfe9689.tar.gz
sonarqube-b7129679327efeeb44f9205656b46376adfe9689.zip
SONAR-8300 Create new "Projects" page [first iter]
Diffstat (limited to 'server/sonar-web/src/main/js/api')
-rw-r--r--server/sonar-web/src/main/js/api/components.js5
-rw-r--r--server/sonar-web/src/main/js/api/measures.js7
2 files changed, 12 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 6b3238022fb..ac46a7680f1 100644
--- a/server/sonar-web/src/main/js/api/components.js
+++ b/server/sonar-web/src/main/js/api/components.js
@@ -110,6 +110,11 @@ export function getMyProjects (data) {
return getJSON(url, data);
}
+export function searchProjects (data) {
+ const url = '/api/components/search_projects';
+ return getJSON(url, data);
+}
+
/**
* Change component's key
* @param {string} key
diff --git a/server/sonar-web/src/main/js/api/measures.js b/server/sonar-web/src/main/js/api/measures.js
index 0b6bd6b4716..f04d579bf08 100644
--- a/server/sonar-web/src/main/js/api/measures.js
+++ b/server/sonar-web/src/main/js/api/measures.js
@@ -33,3 +33,10 @@ export function getMeasuresAndMeta (componentKey, metrics, additional = {}) {
});
return getJSON(url, data);
}
+
+export const getMeasuresForComponents = (componentKeys, metricKeys) => (
+ getJSON('/api/measures/search', {
+ componentKeys: componentKeys.join(),
+ metricKeys: metricKeys.join()
+ })
+);