diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-08-15 11:03:24 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-08-16 20:20:52 +0200 |
commit | 81620b85dcbb883166e9d1e13d8cc0207ca61a80 (patch) | |
tree | bd6a06a8c4ad808f07e497633d56cbb132b691c2 /server/sonar-web/src/main/js/api/components.ts | |
parent | 8d39bc5a3c9a32a3449b529ffec68f28917375c3 (diff) | |
download | sonarqube-81620b85dcbb883166e9d1e13d8cc0207ca61a80.tar.gz sonarqube-81620b85dcbb883166e9d1e13d8cc0207ca61a80.zip |
SONAR-11140 Rewrite part of component measures page to TS
Diffstat (limited to 'server/sonar-web/src/main/js/api/components.ts')
-rw-r--r-- | server/sonar-web/src/main/js/api/components.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/api/components.ts b/server/sonar-web/src/main/js/api/components.ts index f6e83e322b9..23b90e37a33 100644 --- a/server/sonar-web/src/main/js/api/components.ts +++ b/server/sonar-web/src/main/js/api/components.ts @@ -19,7 +19,14 @@ */ import throwGlobalError from '../app/utils/throwGlobalError'; import { getJSON, postJSON, post, RequestData } from '../helpers/request'; -import { Paging, Visibility, BranchParameters, MyProject } from '../app/types'; +import { + Paging, + Visibility, + BranchParameters, + MyProject, + Metric, + ComponentMeasure +} from '../app/types'; export interface BaseSearchProjectsParameters { analyzedBefore?: string; @@ -93,7 +100,11 @@ export function getComponentTree( componentKey: string, metrics: string[] = [], additional: RequestData = {} -): Promise<any> { +): Promise<{ + components: ComponentMeasure[]; + metrics: Metric[]; + paging: Paging; +}> { const url = '/api/measures/component_tree'; const data = Object.assign({}, additional, { baseComponentKey: componentKey, |