You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ki...@apache.org on 2022/09/16 11:01:31 UTC
[incubator-seatunnel] branch dev updated: [Feat][UI] Update task service in the project. (#2758)
This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 94ed275ba [Feat][UI] Update task service in the project. (#2758)
94ed275ba is described below
commit 94ed275ba334b762d37c0a2fdd039ce1d5cb2c7e
Author: songjianet <17...@qq.com>
AuthorDate: Fri Sep 16 19:01:25 2022 +0800
[Feat][UI] Update task service in the project. (#2758)
* [Feat][UI] Update task service in the project.
* [Feat][UI] Update task service in the project.
---
seatunnel-ui/src/service/task/index.ts | 43 ++++++++++++++++++++++------------
seatunnel-ui/src/service/task/types.ts | 11 +++------
2 files changed, 31 insertions(+), 23 deletions(-)
diff --git a/seatunnel-ui/src/service/task/index.ts b/seatunnel-ui/src/service/task/index.ts
index 29d409797..3b1c3e303 100644
--- a/seatunnel-ui/src/service/task/index.ts
+++ b/seatunnel-ui/src/service/task/index.ts
@@ -20,37 +20,50 @@ import type {
TaskList,
TaskJobList,
TaskRecycle,
- TaskTmpExecute
+ TaskExecute
} from '@/service/task/types'
-export function taskList(req: TaskList): any {
+export function taskInstanceList(params: TaskList): any {
return axios({
- url: '/task/listInstance',
+ url: '/task/instance',
method: 'get',
- params: { req }
+ params
})
}
-export function taskJobList(req: TaskJobList): any {
+export function taskJobList(params: TaskList): any {
return axios({
- url: '/task/listJob',
+ url: '/task/job',
method: 'get',
- params: { req }
+ params
})
}
-export function taskRecycle(req: TaskRecycle): any {
+export function taskExecute(scriptId: number, data: TaskExecute): any {
return axios({
- url: '/task/recycle',
- method: 'put',
- data: { req }
+ url: `/task/${scriptId}/execute`,
+ method: 'post',
+ data
})
}
-export function taskTmpExecute(req: TaskTmpExecute): any {
+export function taskRecycle(scriptId: number): any {
return axios({
- url: '/task/tmpExecute',
- method: 'get',
- params: { req }
+ url: `/task/${scriptId}/recycle`,
+ method: 'patch'
+ })
+}
+
+export function taskInstanceDetail(taskInstanceId: number): any {
+ return axios({
+ url: `/task/${taskInstanceId}`,
+ method: 'get'
})
}
+
+export function taskInstanceKill(taskInstanceId: number): any {
+ return axios({
+ url: `/task/${taskInstanceId}`,
+ method: 'patch'
+ })
+}
\ No newline at end of file
diff --git a/seatunnel-ui/src/service/task/types.ts b/seatunnel-ui/src/service/task/types.ts
index 290d61546..7258649af 100644
--- a/seatunnel-ui/src/service/task/types.ts
+++ b/seatunnel-ui/src/service/task/types.ts
@@ -16,7 +16,7 @@
*/
interface TaskList {
- name: string
+ name?: string
pageNo: number
pageSize: number
}
@@ -32,15 +32,10 @@ interface TaskRecycle {
operatorId: number
}
-interface TaskTmpExecute {
+interface TaskExecute {
content: string
- endTime: string
executeType: number
- operatorId: number
- parallelismNum: number
params: object
- scriptId: number
- startTime: string
}
-export { TaskList, TaskJobList, TaskRecycle, TaskTmpExecute }
+export { TaskList, TaskJobList, TaskRecycle, TaskExecute }