aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/measures.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/api/measures.ts')
-rw-r--r--server/sonar-web/src/main/js/api/measures.ts19
1 files changed, 17 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/api/measures.ts b/server/sonar-web/src/main/js/api/measures.ts
index fd4f5259d2f..df194d04a34 100644
--- a/server/sonar-web/src/main/js/api/measures.ts
+++ b/server/sonar-web/src/main/js/api/measures.ts
@@ -38,9 +38,24 @@ export function getMeasuresAndMeta(
return getJSON('/api/measures/component', data);
}
-export function getMeasuresForProjects(projectKeys: string[], metricKeys: string[]): Promise<any> {
+export interface Period {
+ index: number;
+ value: string;
+}
+
+export interface Measure {
+ component: string;
+ metric: string;
+ periods?: Period[];
+ value?: string;
+}
+
+export function getMeasuresForProjects(
+ projectKeys: string[],
+ metricKeys: string[]
+): Promise<Measure[]> {
return getJSON('/api/measures/search', {
projectKeys: projectKeys.join(),
metricKeys: metricKeys.join()
- });
+ }).then(r => r.measures);
}