songjianet
3 years ago
committed by
GitHub
28 changed files with 1759 additions and 183 deletions
@ -0,0 +1,47 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { axios } from '@/service/service' |
||||
import { ProjectCodeReq, WorkFlowNameReq } from './types' |
||||
|
||||
export function queryWorkFlowList(projectCode: ProjectCodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/lineages/list`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function queryLineageByWorkFlowName( |
||||
params: WorkFlowNameReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/lineages/query-by-name`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function queryLineageByWorkFlowCode( |
||||
workFlowCode: WorkFlowNameReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/lineages/${workFlowCode}`, |
||||
method: 'get', |
||||
}) |
||||
} |
@ -0,0 +1,26 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface ProjectCodeReq { |
||||
projectCode: number |
||||
} |
||||
|
||||
interface WorkFlowNameReq { |
||||
workFlowName: string |
||||
} |
||||
|
||||
export { ProjectCodeReq, WorkFlowNameReq } |
@ -0,0 +1,106 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { |
||||
ProjectCodeReq, |
||||
ProcessDefinitionCodeReq, |
||||
PreTaskCodesReq, |
||||
PostTaskCodesReq, |
||||
TaskCodeReq, |
||||
SaveReq, |
||||
MoveReq, |
||||
} from './types' |
||||
import { axios } from '@/service/service' |
||||
|
||||
export function save(data: SaveReq, projectCode: ProjectCodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/process-task-relation`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function moveRelation(data: MoveReq, projectCode: ProjectCodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/process-task-relation/move`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function deleteEdge(data: SaveReq): any { |
||||
return axios({ |
||||
url: `/projects/${data.projectCode}/process-task-relation/${data.processDefinitionCode}/${data.preTaskCode}/${data.postTaskCode}`, |
||||
method: 'delete', |
||||
}) |
||||
} |
||||
|
||||
export function deleteRelation( |
||||
data: ProcessDefinitionCodeReq, |
||||
projectCode: ProjectCodeReq, |
||||
taskCode: TaskCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/process-task-relation/${taskCode}`, |
||||
method: 'delete', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryDownstreamRelation( |
||||
projectCode: ProjectCodeReq, |
||||
taskCode: TaskCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/process-task-relation/${taskCode}/downstream`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function deleteDownstreamRelation( |
||||
data: PostTaskCodesReq, |
||||
projectCode: ProjectCodeReq, |
||||
taskCode: TaskCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/process-task-relation/${taskCode}/downstream`, |
||||
method: 'delete', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryUpstreamRelation( |
||||
projectCode: ProjectCodeReq, |
||||
taskCode: TaskCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/process-task-relation/${taskCode}/upstream`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function deleteUpstreamRelation( |
||||
data: PreTaskCodesReq, |
||||
projectCode: ProjectCodeReq, |
||||
taskCode: TaskCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/process-task-relation/${taskCode}/upstream`, |
||||
method: 'delete', |
||||
data, |
||||
}) |
||||
} |
@ -0,0 +1,55 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface ProjectCodeReq { |
||||
projectCode: string |
||||
} |
||||
|
||||
interface ProcessDefinitionCodeReq { |
||||
processDefinitionCode: string |
||||
} |
||||
|
||||
interface PreTaskCodesReq { |
||||
preTaskCodes: string |
||||
} |
||||
|
||||
interface PostTaskCodesReq { |
||||
postTaskCodes: string |
||||
} |
||||
|
||||
interface TaskCodeReq { |
||||
taskCode: string |
||||
} |
||||
|
||||
interface SaveReq extends ProcessDefinitionCodeReq, ProjectCodeReq { |
||||
postTaskCode: string |
||||
preTaskCode: string |
||||
} |
||||
|
||||
interface MoveReq extends ProcessDefinitionCodeReq, TaskCodeReq { |
||||
targetProcessDefinitionCode: string |
||||
} |
||||
|
||||
export { |
||||
ProjectCodeReq, |
||||
ProcessDefinitionCodeReq, |
||||
PreTaskCodesReq, |
||||
PostTaskCodesReq, |
||||
TaskCodeReq, |
||||
SaveReq, |
||||
MoveReq, |
||||
} |
@ -0,0 +1,119 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { axios } from '@/service/service' |
||||
import { |
||||
ProjectCodeReq, |
||||
IdReq, |
||||
CodeReq, |
||||
ListReq, |
||||
ProcessDefinitionCodeReq, |
||||
ScheduleReq, |
||||
WorkerGroupIdReq, |
||||
ScheduleListReq, |
||||
CreateScheduleReq, |
||||
DeleteScheduleReq, |
||||
} from './types' |
||||
|
||||
export function queryScheduleListPaging( |
||||
params: ScheduleListReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function createSchedule( |
||||
data: CreateScheduleReq & WorkerGroupIdReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryScheduleList(projectCode: ProjectCodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules/list`, |
||||
method: 'post', |
||||
}) |
||||
} |
||||
|
||||
export function previewSchedule( |
||||
data: ScheduleReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules/preview`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function updateScheduleByProcessDefinitionCode( |
||||
data: CreateScheduleReq, |
||||
projectCode: ProjectCodeReq, |
||||
code: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules/update/${code}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function updateSchedule( |
||||
data: CreateScheduleReq, |
||||
projectCode: ProjectCodeReq, |
||||
id: IdReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules/${id}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function deleteScheduleById( |
||||
data: DeleteScheduleReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules/${data.id}`, |
||||
method: 'delete', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function offline(projectCode: ProjectCodeReq, id: IdReq): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules/${id}/offline`, |
||||
method: 'post', |
||||
}) |
||||
} |
||||
|
||||
export function online(projectCode: ProjectCodeReq, id: IdReq): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/schedules/${id}/online`, |
||||
method: 'post', |
||||
}) |
||||
} |
@ -0,0 +1,88 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface ProjectCodeReq { |
||||
projectCode: number |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
interface CodeReq { |
||||
code: number |
||||
} |
||||
|
||||
interface ListReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
searchVal?: string |
||||
} |
||||
|
||||
interface ProcessDefinitionCodeReq { |
||||
processDefinitionCode: number |
||||
} |
||||
|
||||
interface ScheduleReq { |
||||
schedule?: string |
||||
} |
||||
|
||||
interface WorkerGroupIdReq { |
||||
workerGroupId?: number |
||||
} |
||||
|
||||
interface ScheduleListReq extends ListReq, ProcessDefinitionCodeReq { |
||||
processDefinitionId: number |
||||
} |
||||
|
||||
interface CreateScheduleReq extends ScheduleReq, ProcessDefinitionCodeReq { |
||||
environmentCode?: number |
||||
failureStrategy?: 'END' | 'CONTINUE' |
||||
processInstancePriority?: 'HIGHEST' | 'HIGH' | 'MEDIUM' | 'LOW' | 'LOWEST' |
||||
warningGroupId?: number |
||||
warningType?: 'NONE' | 'SUCCESS' | 'FAILURE' | 'ALL' |
||||
workerGroup?: string |
||||
} |
||||
|
||||
interface DeleteScheduleReq extends IdReq { |
||||
alertGroup?: string |
||||
createTime?: string |
||||
email?: string |
||||
phone?: string |
||||
queue?: string |
||||
queueName?: string |
||||
state?: number |
||||
tenantCode?: string |
||||
tenantId?: number |
||||
updateTime?: string |
||||
userName?: string |
||||
userPassword?: string |
||||
userType?: 'ADMIN_USER' | 'GENERAL_USER' |
||||
} |
||||
|
||||
export { |
||||
ProjectCodeReq, |
||||
IdReq, |
||||
CodeReq, |
||||
ListReq, |
||||
ProcessDefinitionCodeReq, |
||||
ScheduleReq, |
||||
WorkerGroupIdReq, |
||||
ScheduleListReq, |
||||
CreateScheduleReq, |
||||
DeleteScheduleReq, |
||||
} |
@ -0,0 +1,143 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { axios } from '@/service/service' |
||||
import { |
||||
PageReq, |
||||
ListReq, |
||||
ProjectCodeReq, |
||||
TaskDefinitionListReq, |
||||
TaskDefinitionJsonReq, |
||||
GenNumReq, |
||||
CodeReq, |
||||
TaskDefinitionJsonObjReq, |
||||
ReleaseStateReq, |
||||
VersionReq, |
||||
} from './types' |
||||
|
||||
export function queryTaskDefinitionListPaging( |
||||
params: TaskDefinitionListReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function save( |
||||
data: TaskDefinitionJsonReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function genTaskCodeList( |
||||
params: GenNumReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition/gen-task-codes`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function queryTaskDefinitionByCode( |
||||
code: CodeReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition/${code}`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function update( |
||||
data: TaskDefinitionJsonObjReq, |
||||
code: CodeReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition/${code}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function deleteTaskDefinition( |
||||
data: TaskDefinitionJsonObjReq, |
||||
code: CodeReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition/${code}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function releaseTaskDefinition( |
||||
data: ReleaseStateReq, |
||||
code: CodeReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition/${code}/release`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryVersions( |
||||
params: PageReq, |
||||
code: CodeReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition/${code}/versions`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function switchVersion( |
||||
version: VersionReq, |
||||
code: CodeReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition/${code}/versions/${version}`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function deleteVersion( |
||||
version: VersionReq, |
||||
code: CodeReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-definition/${code}/versions/${version}`, |
||||
method: 'delete', |
||||
}) |
||||
} |
@ -0,0 +1,71 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface PageReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
} |
||||
|
||||
interface ListReq extends PageReq { |
||||
searchVal?: string |
||||
} |
||||
|
||||
interface ProjectCodeReq { |
||||
projectCode: number |
||||
} |
||||
|
||||
interface TaskDefinitionListReq extends ListReq { |
||||
taskType?: string |
||||
userId?: number |
||||
} |
||||
|
||||
interface TaskDefinitionJsonReq { |
||||
taskDefinitionJson: string |
||||
} |
||||
|
||||
interface GenNumReq { |
||||
genNum: number |
||||
} |
||||
|
||||
interface CodeReq { |
||||
code: number |
||||
} |
||||
|
||||
interface TaskDefinitionJsonObjReq { |
||||
taskDefinitionJsonObj: string |
||||
} |
||||
|
||||
interface ReleaseStateReq { |
||||
releaseState: 'OFFLINE' | 'ONLINE' |
||||
} |
||||
|
||||
interface VersionReq { |
||||
version: number |
||||
} |
||||
|
||||
export { |
||||
PageReq, |
||||
ListReq, |
||||
ProjectCodeReq, |
||||
TaskDefinitionListReq, |
||||
TaskDefinitionJsonReq, |
||||
GenNumReq, |
||||
CodeReq, |
||||
TaskDefinitionJsonObjReq, |
||||
ReleaseStateReq, |
||||
VersionReq, |
||||
} |
@ -0,0 +1,37 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { axios } from '@/service/service' |
||||
import { ProjectCodeReq, IdReq, TaskListReq } from './types' |
||||
|
||||
export function queryTaskListPaging( |
||||
params: TaskListReq, |
||||
projectCode: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-instances`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function forceSuccess(id: IdReq, projectCode: ProjectCodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${projectCode}/task-instances/${id}/force-success`, |
||||
method: 'post', |
||||
}) |
||||
} |
@ -0,0 +1,40 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface ProjectCodeReq { |
||||
projectCode: number |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
interface TaskListReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
endDate?: string |
||||
executorName?: string |
||||
host?: string |
||||
processInstanceId?: number |
||||
processInstanceName?: string |
||||
searchVal?: string |
||||
startDate?: string |
||||
stateType?: string |
||||
taskName?: string |
||||
} |
||||
|
||||
export { ProjectCodeReq, IdReq, TaskListReq } |
@ -0,0 +1,65 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { axios } from '@/service/service' |
||||
import { ListReq, TenantCodeReq, TenantReq, IdReq } from './types' |
||||
|
||||
export function queryTenantListPaging(params: ListReq): any { |
||||
return axios({ |
||||
url: '/tenants', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function createTenant(data: TenantReq): any { |
||||
return axios({ |
||||
url: '/tenants', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryTenantList(): any { |
||||
return axios({ |
||||
url: '/tenants/list', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function verifyTenantCode(params: TenantCodeReq): any { |
||||
return axios({ |
||||
url: '/tenants/verify-code', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function updateTenant(data: TenantCodeReq, id: IdReq): any { |
||||
return axios({ |
||||
url: `/tenants/${id}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function deleteTenantById(id: IdReq): any { |
||||
return axios({ |
||||
url: `/tenants/${id}`, |
||||
method: 'delete', |
||||
}) |
||||
} |
@ -0,0 +1,37 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface ListReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
searchVal?: string |
||||
} |
||||
|
||||
interface TenantCodeReq { |
||||
tenantCode: string |
||||
} |
||||
|
||||
interface TenantReq extends TenantCodeReq { |
||||
queueId: number |
||||
description?: string |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
export { ListReq, TenantCodeReq, TenantReq, IdReq } |
@ -0,0 +1,34 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { axios } from '@/service/service' |
||||
import { PluginTypeReq, IdReq } from './types' |
||||
|
||||
export function queryUiPluginsByType(params: PluginTypeReq): any { |
||||
return axios({ |
||||
url: '/ui-plugins/query-by-type', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function queryUiPluginDetailById(id: IdReq): any { |
||||
return axios({ |
||||
url: `/ui-plugins/${id}`, |
||||
method: 'get', |
||||
}) |
||||
} |
@ -0,0 +1,26 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface PluginTypeReq { |
||||
pluginType: 'ALERT' | 'REGISTER' | 'TASK' |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
export { PluginTypeReq, IdReq } |
@ -0,0 +1,184 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { axios } from '@/service/service' |
||||
import { |
||||
UserNameReq, |
||||
UserNamesReq, |
||||
AlertGroupIdReq, |
||||
UserReq, |
||||
IdReq, |
||||
UserIdReq, |
||||
GrantDataSourceReq, |
||||
GrantResourceReq, |
||||
GrantProject, |
||||
ProjectCodeReq, |
||||
GrantUDFReq, |
||||
ListAllReq, |
||||
ListReq, |
||||
RegisterUserReq, |
||||
} from './types' |
||||
|
||||
export function activateUser(data: UserNameReq): any { |
||||
return axios({ |
||||
url: '/users/activate', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function authorizedUser(params: AlertGroupIdReq): any { |
||||
return axios({ |
||||
url: '/users/authed-user', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function batchActivateUser(data: UserNamesReq): any { |
||||
return axios({ |
||||
url: '/users/batch/activate', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function createUser(data: UserReq): any { |
||||
return axios({ |
||||
url: '/users/create', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function delUserById(data: IdReq): any { |
||||
return axios({ |
||||
url: '/users/delete', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function getUserInfo(): any { |
||||
return axios({ |
||||
url: '/users/get-user-info', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function grantDataSource(data: GrantDataSourceReq): any { |
||||
return axios({ |
||||
url: '/users/grant-datasource', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function grantResource(data: GrantResourceReq): any { |
||||
return axios({ |
||||
url: '/users/grant-file', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function grantProject(data: GrantProject): any { |
||||
return axios({ |
||||
url: '/users/grant-project', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function grantProjectByCode(data: ProjectCodeReq & UserIdReq): any { |
||||
return axios({ |
||||
url: '/users/grant-project-by-code', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function grantUDFFunc(data: GrantUDFReq & UserIdReq): any { |
||||
return axios({ |
||||
url: '/users/grant-udf-func', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function listUser(): any { |
||||
return axios({ |
||||
url: '/users/list', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function listAll(params: ListAllReq): any { |
||||
return axios({ |
||||
url: '/users/list-all', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function queryUserList(params: ListReq): any { |
||||
return axios({ |
||||
url: '/users/list-paging', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function registerUser(data: RegisterUserReq): any { |
||||
return axios({ |
||||
url: '/users/register', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function revokeProject(data: ProjectCodeReq & UserIdReq): any { |
||||
return axios({ |
||||
url: '/users/revoke-project', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function unauthorizedUser(params: AlertGroupIdReq): any { |
||||
return axios({ |
||||
url: '/users/unauth-user', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function updateUser(data: IdReq & UserReq): any { |
||||
return axios({ |
||||
url: '/users/update', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function verifyUserName(params: UserNameReq): any { |
||||
return axios({ |
||||
url: '/users/verify-user-name', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
@ -0,0 +1,106 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface UserNameReq { |
||||
userName?: string |
||||
} |
||||
|
||||
interface UserNamesReq { |
||||
userNames?: string |
||||
} |
||||
|
||||
interface AlertGroupIdReq { |
||||
alertgroupId: string |
||||
} |
||||
|
||||
interface UserReq { |
||||
email: string |
||||
tenantId: number |
||||
userName: string |
||||
userPassword: string |
||||
phone?: string |
||||
queue?: string |
||||
state?: number |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
interface UserIdReq { |
||||
userId: number |
||||
} |
||||
|
||||
interface GrantDataSourceReq extends UserIdReq { |
||||
datasourceIds: string |
||||
} |
||||
|
||||
interface GrantResourceReq extends UserIdReq { |
||||
resourceIds: string |
||||
} |
||||
|
||||
interface GrantProject extends UserIdReq { |
||||
projectIds: string |
||||
} |
||||
|
||||
interface ProjectCodeReq { |
||||
projectCode: string |
||||
} |
||||
|
||||
interface GrantUDFReq { |
||||
udfIds: string |
||||
} |
||||
|
||||
interface ListAllReq extends UserReq { |
||||
alertGroup?: string |
||||
createTime?: string |
||||
id?: number |
||||
queueName?: string |
||||
tenantCode?: string |
||||
updateTime?: string |
||||
userType?: 'ADMIN_USER' | 'GENERAL_USER' |
||||
} |
||||
|
||||
interface ListReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
searchVal?: string |
||||
} |
||||
|
||||
interface RegisterUserReq { |
||||
email: string |
||||
repeatPassword: string |
||||
userName: string |
||||
userPassword: string |
||||
} |
||||
|
||||
export { |
||||
UserNameReq, |
||||
UserNamesReq, |
||||
AlertGroupIdReq, |
||||
UserReq, |
||||
IdReq, |
||||
UserIdReq, |
||||
GrantDataSourceReq, |
||||
GrantResourceReq, |
||||
GrantProject, |
||||
ProjectCodeReq, |
||||
GrantUDFReq, |
||||
ListAllReq, |
||||
ListReq, |
||||
RegisterUserReq, |
||||
} |
@ -0,0 +1,56 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
import { axios } from '@/service/service' |
||||
import { ListReq, WorkerGroupReq, IdReq } from './types' |
||||
|
||||
export function queryAllWorkerGroupsPaging(params: ListReq): any { |
||||
return axios({ |
||||
url: '/worker-groups', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function saveWorkerGroup(data: WorkerGroupReq): any { |
||||
return axios({ |
||||
url: '/worker-groups', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryAllWorkerGroups(): any { |
||||
return axios({ |
||||
url: '/worker-groups/all', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function queryWorkerAddressList(): any { |
||||
return axios({ |
||||
url: '/worker-groups/worker-address-list', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function deleteById(id: IdReq): any { |
||||
return axios({ |
||||
url: `/worker-groups/${id}`, |
||||
method: 'delete', |
||||
}) |
||||
} |
@ -0,0 +1,34 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
interface ListReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
searchVal?: string |
||||
} |
||||
|
||||
interface WorkerGroupReq { |
||||
addrList: string |
||||
name: string |
||||
id?: number |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
export { ListReq, WorkerGroupReq, IdReq } |
Loading…
Reference in new issue