diff options
author | Jeremy Davis <jeremy.davis@sonarsource.com> | 2020-12-14 14:57:33 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-12-22 20:09:36 +0000 |
commit | 4d95e4f93fc695ef1eb492e0d823b1d76abb31e8 (patch) | |
tree | 0c093ca502437508d39646bf14f3503223fb4285 /server/sonar-web/src/main/js/api/issues.ts | |
parent | 9dc6361a06ccec4f33c6ac4691cb7739a83defb3 (diff) | |
download | sonarqube-4d95e4f93fc695ef1eb492e0d823b1d76abb31e8.tar.gz sonarqube-4d95e4f93fc695ef1eb492e0d823b1d76abb31e8.zip |
SONAR-13999 Remove orgs from issues
Diffstat (limited to 'server/sonar-web/src/main/js/api/issues.ts')
-rw-r--r-- | server/sonar-web/src/main/js/api/issues.ts | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/server/sonar-web/src/main/js/api/issues.ts b/server/sonar-web/src/main/js/api/issues.ts index d0756260502..bb3a396e702 100644 --- a/server/sonar-web/src/main/js/api/issues.ts +++ b/server/sonar-web/src/main/js/api/issues.ts @@ -20,27 +20,7 @@ import { getJSON, post, postJSON, RequestData } from 'sonar-ui-common/helpers/request'; import throwGlobalError from '../app/utils/throwGlobalError'; import getCoverageStatus from '../components/SourceViewer/helpers/getCoverageStatus'; -import { RawIssue } from '../helpers/issues'; - -export interface IssueResponse { - components?: Array<{ key: string; name: string }>; - issue: RawIssue; - rules?: Array<{}>; - users?: Array<T.UserBase>; -} - -interface IssuesResponse { - components?: { key: string; organization: string; name: string }[]; - effortTotal: number; - facets: Array<{ - property: string; - values: { count: number; val: string }[]; - }>; - issues: RawIssue[]; - paging: T.Paging; - rules?: Array<{}>; - users?: Array<T.UserBase>; -} +import { IssueResponse, RawIssuesResponse } from '../types/issues'; type FacetName = | 'assigned_to_me' @@ -63,7 +43,7 @@ type FacetName = | 'tags' | 'types'; -export function searchIssues(query: RequestData): Promise<IssuesResponse> { +export function searchIssues(query: RequestData): Promise<RawIssuesResponse> { return getJSON('/api/issues/search', query); } @@ -72,7 +52,7 @@ export function getFacets( facets: FacetName[] ): Promise<{ facets: Array<{ property: string; values: T.FacetValue[] }>; - response: IssuesResponse; + response: RawIssuesResponse; }> { const data = { ...query, @@ -88,7 +68,7 @@ export function getFacets( export function getFacet( query: RequestData, facet: FacetName -): Promise<{ facet: { count: number; val: string }[]; response: IssuesResponse }> { +): Promise<{ facet: { count: number; val: string }[]; response: RawIssuesResponse }> { return getFacets(query, [facet]).then(r => { return { facet: r.facets[0].values, response: r.response }; }); |