diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-08-08 09:17:13 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-08-21 20:21:01 +0200 |
commit | d4a017262d4c7e510f9abbfe7f36b3d24b885776 (patch) | |
tree | 49a96201018149283724aba4bf6de600ef01fe08 /server/sonar-web/src/main/js/api | |
parent | 86be78388006563617ae841d577c8bcf98548741 (diff) | |
download | sonarqube-d4a017262d4c7e510f9abbfe7f36b3d24b885776.tar.gz sonarqube-d4a017262d4c7e510f9abbfe7f36b3d24b885776.zip |
SONAR-6400 Move the search box above the list of facet items (#592)
Diffstat (limited to 'server/sonar-web/src/main/js/api')
-rw-r--r-- | server/sonar-web/src/main/js/api/components.ts | 17 |
1 files changed, 15 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 23b90e37a33..de4f0cb7a4f 100644 --- a/server/sonar-web/src/main/js/api/components.ts +++ b/server/sonar-web/src/main/js/api/components.ts @@ -25,7 +25,8 @@ import { BranchParameters, MyProject, Metric, - ComponentMeasure + ComponentMeasure, + LightComponent } from '../app/types'; export interface BaseSearchProjectsParameters { @@ -136,7 +137,19 @@ export function getComponent( return getJSON('/api/measures/component', data).then(r => r.component); } -export function getTree(component: string, options: RequestData = {}): Promise<any> { +export interface TreeComponent extends LightComponent { + id: string; + name: string; + refId?: string; + refKey?: string; + tags?: string[]; + visibility: Visibility; +} + +export function getTree( + component: string, + options: RequestData = {} +): Promise<{ baseComponent: TreeComponent; components: TreeComponent[]; paging: Paging }> { return getJSON('/api/components/tree', { ...options, component }); } |