songjianet
3 years ago
committed by
GitHub
35 changed files with 1549 additions and 38 deletions
@ -0,0 +1,73 @@
|
||||
/* |
||||
* 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, GroupNameReq, IdReq, GroupReq } from './types' |
||||
|
||||
export function queryAlertGroupListPaging(params: ListReq): any { |
||||
return axios({ |
||||
url: '/alert-groups', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function createAlertGroup(data: GroupReq): any { |
||||
return axios({ |
||||
url: '/alert-groups', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function listAlertGroupById(): any { |
||||
return axios({ |
||||
url: '/alert-groups/list', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function queryAlertGroupById(data: IdReq): any { |
||||
return axios({ |
||||
url: '/alert-groups/query', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function verifyGroupName(params: GroupNameReq): any { |
||||
return axios({ |
||||
url: '/alert-groups/verify-name', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function updateAlertGroup(data: GroupReq, id: IdReq): any { |
||||
return axios({ |
||||
url: `/alert-groups/${id}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function delAlertGroupById(id: IdReq): any { |
||||
return axios({ |
||||
url: `/alert-groups/${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 GroupNameReq { |
||||
groupName: string |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
interface GroupReq extends GroupNameReq { |
||||
alertInstanceIds: string |
||||
description?: string |
||||
} |
||||
|
||||
export { ListReq, GroupNameReq, IdReq, GroupReq } |
@ -0,0 +1,81 @@
|
||||
/* |
||||
* 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, |
||||
PluginInstanceReq, |
||||
InstanceNameReq, |
||||
IdReq, |
||||
UpdatePluginInstanceReq, |
||||
} from './types' |
||||
|
||||
export function queryAlertPluginInstanceListPaging(params: ListReq): any { |
||||
return axios({ |
||||
url: '/alert-plugin-instances', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function createAlertPluginInstance(data: PluginInstanceReq): any { |
||||
return axios({ |
||||
url: '/alert-plugin-instances', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryAlertPluginInstanceList(): any { |
||||
return axios({ |
||||
url: '/alert-plugin-instances/list', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function verifyAlertInstanceName(params: InstanceNameReq): any { |
||||
return axios({ |
||||
url: '/alert-plugin-instances/verify-name', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function getAlertPluginInstance(id: IdReq): any { |
||||
return axios({ |
||||
url: `/alert-plugin-instances/${id}`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function updateAlertPluginInstance( |
||||
data: UpdatePluginInstanceReq, |
||||
id: IdReq |
||||
): any { |
||||
return axios({ |
||||
url: `/alert-plugin-instances/${id}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function deleteAlertPluginInstance(id: IdReq): any { |
||||
return axios({ |
||||
url: `/alert-plugin-instances/${id}`, |
||||
method: 'delete', |
||||
}) |
||||
} |
@ -0,0 +1,50 @@
|
||||
/* |
||||
* 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 PluginInstanceReq { |
||||
instanceName: string |
||||
pluginDefineId: number |
||||
pluginInstanceParams: string |
||||
} |
||||
|
||||
interface InstanceNameReq { |
||||
alertInstanceName: string |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
interface UpdatePluginInstanceReq { |
||||
alertPluginInstanceId: number |
||||
instanceName: string |
||||
pluginInstanceParams: string |
||||
} |
||||
|
||||
export { |
||||
ListReq, |
||||
PluginInstanceReq, |
||||
InstanceNameReq, |
||||
IdReq, |
||||
UpdatePluginInstanceReq, |
||||
} |
@ -0,0 +1,118 @@
|
||||
/* |
||||
* 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, |
||||
DataSourceReq, |
||||
UserIdReq, |
||||
TypeReq, |
||||
NameReq, |
||||
IdReq, |
||||
} from './types' |
||||
|
||||
export function queryDataSourceListPaging(params: ListReq): any { |
||||
return axios({ |
||||
url: '/datasources', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function createDataSource(data: DataSourceReq): any { |
||||
return axios({ |
||||
url: '/datasources', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function authedDatasource(params: UserIdReq): any { |
||||
return axios({ |
||||
url: '/datasources/authed-datasource', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function connectDataSource(data: DataSourceReq): any { |
||||
return axios({ |
||||
url: '/datasources/connect', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function getKerberosStartupState(): any { |
||||
return axios({ |
||||
url: '/datasources/kerberos-startup-state', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function queryDataSourceList(params: TypeReq): any { |
||||
return axios({ |
||||
url: '/datasources/list', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function unAuthDatasource(params: UserIdReq): any { |
||||
return axios({ |
||||
url: '/datasources/unauth-datasource', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function verifyDataSourceName(params: NameReq): any { |
||||
return axios({ |
||||
url: '/datasources/verify-name', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function queryDataSource(id: IdReq): any { |
||||
return axios({ |
||||
url: `/datasources/${id}`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function updateDataSource(data: DataSourceReq, id: IdReq): any { |
||||
return axios({ |
||||
url: `/datasources/${id}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function deleteDataSource(id: IdReq): any { |
||||
return axios({ |
||||
url: `/datasources/${id}`, |
||||
method: 'delete', |
||||
}) |
||||
} |
||||
|
||||
export function connectionTest(id: IdReq): any { |
||||
return axios({ |
||||
url: `/datasources/${id}/connect-test`, |
||||
method: 'get', |
||||
}) |
||||
} |
@ -0,0 +1,69 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
|
||||
type DataBase = |
||||
| 'MYSQL' |
||||
| 'POSTGRESQL' |
||||
| 'HIVE' |
||||
| 'SPARK' |
||||
| 'CLICKHOUSE' |
||||
| 'ORACLE' |
||||
| 'SQLSERVER' |
||||
| 'DB2' |
||||
| 'PRESTO' |
||||
| 'H2' |
||||
|
||||
interface DataSource { |
||||
database?: string |
||||
host?: string |
||||
id?: number |
||||
name?: string |
||||
note?: string |
||||
other?: object |
||||
password?: string |
||||
port?: number |
||||
type?: DataBase |
||||
userName?: string |
||||
} |
||||
|
||||
interface ListReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
searchVal?: string |
||||
} |
||||
|
||||
interface DataSourceReq { |
||||
dataSourceParam: DataSource |
||||
} |
||||
|
||||
interface UserIdReq { |
||||
userId: number |
||||
} |
||||
|
||||
interface TypeReq { |
||||
type: DataBase |
||||
} |
||||
|
||||
interface NameReq { |
||||
name: string |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
||||
|
||||
export { ListReq, DataSourceReq, UserIdReq, TypeReq, NameReq, IdReq } |
@ -0,0 +1,80 @@
|
||||
/* |
||||
* 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 { |
||||
EnvironmentReq, |
||||
EnvironmentCodeReq, |
||||
EnvironmentNameReq, |
||||
ListReq, |
||||
CodeReq, |
||||
} from './types' |
||||
|
||||
export function createEnvironment(data: EnvironmentReq): any { |
||||
return axios({ |
||||
url: '/environment/create', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function deleteEnvironmentByCode(data: EnvironmentCodeReq): any { |
||||
return axios({ |
||||
url: '/environment/delete', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryEnvironmentListPaging(params: ListReq): any { |
||||
return axios({ |
||||
url: '/environment/list-paging', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function queryEnvironmentByCode(params: EnvironmentCodeReq): any { |
||||
return axios({ |
||||
url: '/environment/query-by-code', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function queryAllEnvironmentList(): any { |
||||
return axios({ |
||||
url: '/environment/query-environment-list', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function updateEnvironment(data: EnvironmentReq & CodeReq): any { |
||||
return axios({ |
||||
url: '/environment/update', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function verifyEnvironment(data: EnvironmentNameReq): any { |
||||
return axios({ |
||||
url: '/environment/verify-environment', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
@ -0,0 +1,49 @@
|
||||
/* |
||||
* 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 EnvironmentReq { |
||||
config: string |
||||
name: string |
||||
description?: string |
||||
workerGroups?: string |
||||
} |
||||
|
||||
interface EnvironmentCodeReq { |
||||
environmentCode: number |
||||
} |
||||
|
||||
interface EnvironmentNameReq { |
||||
environmentName: string |
||||
} |
||||
|
||||
interface ListReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
searchVal?: string |
||||
} |
||||
|
||||
interface CodeReq { |
||||
code: number |
||||
} |
||||
|
||||
export { |
||||
EnvironmentReq, |
||||
EnvironmentCodeReq, |
||||
EnvironmentNameReq, |
||||
ListReq, |
||||
CodeReq, |
||||
} |
@ -0,0 +1,54 @@
|
||||
/* |
||||
* 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 { |
||||
ExecuteReq, |
||||
ProjectCodeReq, |
||||
ProcessDefinitionCodeReq, |
||||
ProcessInstanceReq, |
||||
} from './types' |
||||
|
||||
export function execute(data: ExecuteReq, code: ProjectCodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/executors/execute`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function startCheckProcessDefinition( |
||||
data: ProcessDefinitionCodeReq, |
||||
code: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/executors/start-check`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function startProcessInstance( |
||||
data: ProcessInstanceReq, |
||||
code: ProjectCodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/executors/start-process-instance`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
@ -0,0 +1,75 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
|
||||
type Execute = |
||||
| 'NONE' |
||||
| 'REPEAT_RUNNING' |
||||
| 'RECOVER_SUSPENDED_PROCESS' |
||||
| 'START_FAILURE_TASK_PROCESS' |
||||
| 'STOP' |
||||
| 'PAUSE' |
||||
|
||||
type Exec = |
||||
| 'START_PROCESS' |
||||
| 'START_CURRENT_TASK_PROCESS' |
||||
| 'RECOVER_TOLERANCE_FAULT_PROCESS' |
||||
| 'RECOVER_SUSPENDED_PROCESS' |
||||
| 'START_FAILURE_TASK_PROCESS' |
||||
| 'COMPLEMENT_DATA' |
||||
| 'SCHEDULER' |
||||
| 'REPEAT_RUNNING' |
||||
| 'PAUSE' |
||||
| 'STOP' |
||||
| 'RECOVER_WAITING_THREAD' |
||||
|
||||
interface ExecuteReq { |
||||
executeType: Execute |
||||
processInstanceId: number |
||||
} |
||||
|
||||
interface ProjectCodeReq { |
||||
projectCode: number |
||||
} |
||||
|
||||
interface ProcessDefinitionCodeReq { |
||||
processDefinitionCode: number |
||||
} |
||||
|
||||
interface ProcessInstanceReq extends ProcessDefinitionCodeReq { |
||||
failureStrategy: 'END' | 'CONTINUE' |
||||
processInstancePriority: 'HIGHEST' | 'HIGH' | 'MEDIUM' | 'LOW' | 'LOWEST' |
||||
scheduleTime: string |
||||
warningGroupId: number |
||||
warningType: 'NONE' | 'SUCCESS' | 'FAILURE' | 'ALL' |
||||
dryRun?: number |
||||
environmentCode?: number |
||||
execType?: Exec |
||||
expectedParallelismNumber?: number |
||||
runMode?: 'RUN_MODE_SERIAL' | 'RUN_MODE_PARALLEL' |
||||
startNodeList?: string |
||||
startParams?: string |
||||
taskDependType?: 'TASK_ONLY' | 'TASK_PRE' | 'TASK_POST' |
||||
timeout?: number |
||||
workerGroup?: string |
||||
} |
||||
|
||||
export { |
||||
ExecuteReq, |
||||
ProjectCodeReq, |
||||
ProcessDefinitionCodeReq, |
||||
ProcessInstanceReq, |
||||
} |
@ -0,0 +1,35 @@
|
||||
/* |
||||
* 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 { IdReq, LogReq } from './types' |
||||
|
||||
export function queryLog(params: LogReq): any { |
||||
return axios({ |
||||
url: '/log/detail', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function downloadTaskLog(params: IdReq): any { |
||||
return axios({ |
||||
url: '/log/download-log', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
@ -0,0 +1,27 @@
|
||||
/* |
||||
* 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 IdReq { |
||||
taskInstanceId: number |
||||
} |
||||
|
||||
interface LogReq extends IdReq { |
||||
limit: number |
||||
skipLineNum: number |
||||
} |
||||
|
||||
export { IdReq, LogReq } |
@ -0,0 +1,27 @@
|
||||
/* |
||||
* 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 { LoginReq } from './types' |
||||
|
||||
export function queryLog(data: LoginReq): any { |
||||
return axios({ |
||||
url: '/login', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
@ -0,0 +1,23 @@
|
||||
/* |
||||
* 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 LoginReq { |
||||
userName: string |
||||
userPassword: string |
||||
} |
||||
|
||||
export { LoginReq } |
@ -0,0 +1,39 @@
|
||||
/* |
||||
* 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' |
||||
|
||||
export function queryDatabaseState(): any { |
||||
return axios({ |
||||
url: '/monitor/databases', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function listMaster(): any { |
||||
return axios({ |
||||
url: '/monitor/masters', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function listWorker(): any { |
||||
return axios({ |
||||
url: '/monitor/workers', |
||||
method: 'get', |
||||
}) |
||||
} |
@ -0,0 +1,16 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
@ -0,0 +1,244 @@
|
||||
/* |
||||
* 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 { |
||||
CodeReq, |
||||
CodesReq, |
||||
FileReq, |
||||
NameReq, |
||||
ReleaseStateReq, |
||||
VersionReq, |
||||
LimitReq, |
||||
PageReq, |
||||
ListReq, |
||||
ProcessDefinitionReq, |
||||
TargetCodeReq, |
||||
} from './types' |
||||
|
||||
export function queryListPaging(params: PageReq & ListReq, code: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function createProcessDefinition( |
||||
data: ProcessDefinitionReq & NameReq, |
||||
code: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryAllByProjectCode(code: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/all`, |
||||
method: 'post', |
||||
}) |
||||
} |
||||
|
||||
export function batchCopyByCodes( |
||||
data: TargetCodeReq & CodesReq, |
||||
code: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/batch-copy`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function batchDeleteByCodes(data: CodesReq, code: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/batch-delete`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function batchExportByCodes(data: CodesReq, code: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/batch-export`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function batchMoveByCodes( |
||||
data: TargetCodeReq & CodesReq, |
||||
code: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/batch-move`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function getTaskListByDefinitionCodes( |
||||
params: CodesReq, |
||||
code: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/batch-query-tasks`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function importProcessDefinition(data: FileReq, code: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/import`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryList(code: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/list`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function queryProcessDefinitionByName( |
||||
params: NameReq, |
||||
code: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/query-by-name`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function querySimpleList(code: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/simple-list`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function verifyName(params: NameReq, code: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/verify-name`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function queryProcessDefinitionByCode( |
||||
code: CodeReq, |
||||
processCode: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function update( |
||||
data: ProcessDefinitionReq & NameReq & ReleaseStateReq, |
||||
code: CodeReq, |
||||
processCode: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}`, |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function deleteByCode(code: CodeReq, processCode: CodeReq): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}`, |
||||
method: 'delete', |
||||
}) |
||||
} |
||||
|
||||
export function release( |
||||
data: NameReq & ReleaseStateReq, |
||||
code: CodeReq, |
||||
processCode: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}/release`, |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function getTasksByDefinitionCode( |
||||
code: CodeReq, |
||||
processCode: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}/tasks`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function queryVersions( |
||||
params: PageReq, |
||||
code: CodeReq, |
||||
processCode: CodeReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}/versions`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function switchVersion( |
||||
code: CodeReq, |
||||
processCode: CodeReq, |
||||
version: VersionReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}/versions/${version}`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function deleteVersion( |
||||
code: CodeReq, |
||||
processCode: CodeReq, |
||||
version: VersionReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}/versions/${version}`, |
||||
method: 'delete', |
||||
}) |
||||
} |
||||
|
||||
export function viewTree( |
||||
code: CodeReq, |
||||
processCode: CodeReq, |
||||
params: LimitReq |
||||
): any { |
||||
return axios({ |
||||
url: `/projects/${code}/process-definition/${processCode}/view-tree`, |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
@ -0,0 +1,82 @@
|
||||
/* |
||||
* 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 CodeReq { |
||||
projectCode: number |
||||
} |
||||
|
||||
interface CodesReq { |
||||
codes: string |
||||
} |
||||
|
||||
interface FileReq { |
||||
file: any |
||||
} |
||||
|
||||
interface NameReq { |
||||
name: string |
||||
} |
||||
|
||||
interface ReleaseStateReq { |
||||
releaseState: 'OFFLINE' | 'ONLINE' |
||||
} |
||||
|
||||
interface VersionReq { |
||||
version: number |
||||
} |
||||
|
||||
interface LimitReq { |
||||
limit: number |
||||
} |
||||
|
||||
interface PageReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
} |
||||
|
||||
interface ListReq extends PageReq { |
||||
searchVal?: string |
||||
userId?: number |
||||
} |
||||
|
||||
interface ProcessDefinitionReq extends NameReq { |
||||
locations: string |
||||
taskDefinitionJson: string |
||||
taskRelationJson: string |
||||
tenantCode: string |
||||
description?: string |
||||
globalParams?: string |
||||
timeout?: number |
||||
} |
||||
|
||||
interface TargetCodeReq { |
||||
targetProjectCode: number |
||||
} |
||||
|
||||
export { |
||||
CodeReq, |
||||
CodesReq, |
||||
FileReq, |
||||
NameReq, |
||||
ReleaseStateReq, |
||||
VersionReq, |
||||
LimitReq, |
||||
PageReq, |
||||
ListReq, |
||||
ProcessDefinitionReq, |
||||
TargetCodeReq, |
||||
} |
@ -0,0 +1,16 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
@ -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 CodeReq { |
||||
projectCode: number |
||||
} |
||||
|
||||
interface ProcessInstanceListReq { |
||||
pageNo: number |
||||
pageSize: number |
||||
endDate?: string |
||||
executorName?: string |
||||
host?: string |
||||
processDefineCode?: number |
||||
processDefiniteCode?: string |
||||
searchVal?: string |
||||
startDate?: string |
||||
stateType?: string |
||||
} |
||||
|
||||
interface BatchDeleteReq { |
||||
processInstanceIds: string |
||||
projectName: string |
||||
alertGroup?: string |
||||
createTime?: string |
||||
email?: string |
||||
id?: number |
||||
phone?: string |
||||
queue?: string |
||||
queueName?: string |
||||
state?: number |
||||
tenantCode?: string |
||||
tenantId?: number |
||||
updateTime?: string |
||||
userName?: string |
||||
userPassword?: string |
||||
userType?: string |
||||
} |
||||
|
||||
interface SubIdReq { |
||||
subId: number |
||||
} |
||||
|
||||
interface TaskReq { |
||||
taskCode: string |
||||
taskId: number |
||||
} |
||||
|
||||
interface LongestReq { |
||||
endTime: string |
||||
size: number |
||||
startTime: string |
||||
} |
||||
|
||||
interface IdReq { |
||||
id: number |
||||
} |
@ -0,0 +1,57 @@
|
||||
/* |
||||
* 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 { CodeReq, StateReq } from './types' |
||||
|
||||
export function countCommandState(): any { |
||||
return axios({ |
||||
url: '/projects/analysis/command-state-count', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function countDefinitionByUser(params: CodeReq): any { |
||||
return axios({ |
||||
url: '/projects/analysis/define-user-count', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function countProcessInstanceState(params: StateReq): any { |
||||
return axios({ |
||||
url: '/projects/analysis/process-state-count', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function countQueueState(): any { |
||||
return axios({ |
||||
url: '/projects/analysis/queue-count', |
||||
method: 'get', |
||||
}) |
||||
} |
||||
|
||||
export function countTaskState(params: StateReq): any { |
||||
return axios({ |
||||
url: '/projects/analysis/task-state-count', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
@ -0,0 +1,27 @@
|
||||
/* |
||||
* 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 CodeReq { |
||||
projectCode?: number |
||||
} |
||||
|
||||
interface StateReq extends CodeReq { |
||||
endDate?: string |
||||
startDate?: string |
||||
} |
||||
|
||||
export { CodeReq, StateReq } |
@ -0,0 +1,25 @@
|
||||
/* |
||||
* 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' |
||||
|
||||
export function signOut(): any { |
||||
return axios({ |
||||
url: '/signOut', |
||||
method: 'post', |
||||
}) |
||||
} |
@ -0,0 +1,16 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
@ -0,0 +1,51 @@
|
||||
/* |
||||
* 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, TokenReq, UserReq, UpdateTokenReq } from './types' |
||||
|
||||
export function queryAccessTokenList(params: ListReq): any { |
||||
return axios({ |
||||
url: '/access-tokens', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function createToken(data: TokenReq): any { |
||||
return axios({ |
||||
url: '/access-tokens', |
||||
method: 'post', |
||||
data, |
||||
}) |
||||
} |
||||
|
||||
export function queryAccessTokenByUser(params: UserReq): any { |
||||
return axios({ |
||||
url: '/access-tokens', |
||||
method: 'get', |
||||
params, |
||||
}) |
||||
} |
||||
|
||||
export function updateToken(data: UpdateTokenReq): any { |
||||
return axios({ |
||||
url: '/access-tokens', |
||||
method: 'put', |
||||
data, |
||||
}) |
||||
} |
@ -0,0 +1,51 @@
|
||||
/* |
||||
* 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 TokenReq { |
||||
expireTime: string |
||||
userId: number |
||||
token?: string |
||||
} |
||||
|
||||
interface UserReq { |
||||
userId?: number |
||||
} |
||||
|
||||
interface UpdateTokenReq extends TokenReq { |
||||
id: number |
||||
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?: string |
||||
} |
||||
|
||||
export { ListReq, TokenReq, UserReq, UpdateTokenReq } |
Loading…
Reference in new issue