aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/ce.ts
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-08-30 11:54:03 +0200
committersonartech <sonartech@sonarsource.com>2018-10-10 09:23:03 +0200
commit6a08bacfe5b6d692e83e493246efad11f22ff70e (patch)
tree19275740024e3b5a334aa0a0829d739db9930a76 /server/sonar-web/src/main/js/api/ce.ts
parentf31eb69eb58e1be3005a93d432c9136e1eee289d (diff)
downloadsonarqube-6a08bacfe5b6d692e83e493246efad11f22ff70e.tar.gz
sonarqube-6a08bacfe5b6d692e83e493246efad11f22ff70e.zip
move Task type to app/types
Diffstat (limited to 'server/sonar-web/src/main/js/api/ce.ts')
-rw-r--r--server/sonar-web/src/main/js/api/ce.ts31
1 files changed, 2 insertions, 29 deletions
diff --git a/server/sonar-web/src/main/js/api/ce.ts b/server/sonar-web/src/main/js/api/ce.ts
index 21eaff0990d..b72d148873e 100644
--- a/server/sonar-web/src/main/js/api/ce.ts
+++ b/server/sonar-web/src/main/js/api/ce.ts
@@ -19,34 +19,7 @@
*/
import { getJSON, post, RequestData } from '../helpers/request';
import throwGlobalError from '../app/utils/throwGlobalError';
-
-export interface PendingTask {
- branch?: string;
- branchType?: string;
- componentKey: string;
- componentName: string;
- componentQualifier: string;
- id: string;
- logs: boolean;
- organization: string;
- pullRequest?: string;
- pullRequestTitle?: string;
- status: string;
- submittedAt: Date;
- submitterLogin?: string;
- type: string;
-}
-
-export interface Task extends PendingTask {
- analysisId?: string;
- errorMessage?: string;
- errorType?: string;
- executionTimeMs: number;
- executedAt: Date;
- hasErrorStacktrace: boolean;
- hasScannerContext: boolean;
- startedAt: Date;
-}
+import { Task } from '../app/types';
export function getActivity(data: RequestData): Promise<any> {
return getJSON('/api/ce/activity', data);
@@ -74,7 +47,7 @@ export function cancelAllTasks(): Promise<any> {
export function getTasksForComponent(
componentKey: string
-): Promise<{ queue: PendingTask[]; current: Task }> {
+): Promise<{ queue: Task[]; current: Task }> {
return getJSON('/api/ce/component', { componentKey }).catch(throwGlobalError);
}