snapshot: AnsibleManager拆分前快照
This commit is contained in:
1 parent
16205fdb2b
commit
e6d9f364e5
13 files changed
+660
-103
No files matched your search
@@ -191,6 +191,9 @@ export const alertApi = {
|
||||
deleteRule: async (id: number | string) => {
|
||||
return http.delete(`/alerts/rules/${id}`);
|
||||
},
|
||||
batchDeleteRules: async (ids: number[]) => {
|
||||
return http.delete('/alerts/rules/batch-delete', { ids });
|
||||
},
|
||||
toggleRule: async (id: number | string) => {
|
||||
return http.post(`/alerts/rules/${id}/toggle`);
|
||||
},
|
||||
@@ -285,6 +288,9 @@ export const cronJobApi = {
|
||||
executeJob: async (id: number | string) => {
|
||||
return http.post(`/cron-jobs/${id}/execute`);
|
||||
},
|
||||
batchDelete: async (ids: number[]) => {
|
||||
return http.delete('/cron-jobs/batch-delete', { ids });
|
||||
},
|
||||
};
|
||||
|
||||
// ==================== 脚本 API ====================
|
||||
@@ -304,6 +310,9 @@ export const scriptApi = {
|
||||
deleteScript: async (id: number | string) => {
|
||||
return http.delete(`/scripts/${id}`);
|
||||
},
|
||||
batchDelete: async (ids: number[]) => {
|
||||
return http.post('/scripts/batch-delete', { ids });
|
||||
},
|
||||
executeScript: async (id: number | string) => {
|
||||
return http.post(`/scripts/${id}/execute`);
|
||||
},
|
||||
@@ -488,6 +497,10 @@ export const regionApi = {
|
||||
delete: async (id: number | string) => {
|
||||
return http.delete(`/regions/${id}`);
|
||||
},
|
||||
// 批量删除 // Logan.Li
|
||||
batchDelete: async (ids: number[]) => {
|
||||
return http.delete('/regions/batch-delete', { ids });
|
||||
},
|
||||
};
|
||||
|
||||
// ==================== 资源模型 API ====================
|
||||
@@ -580,6 +593,10 @@ export const ansibleApi = {
|
||||
deletePlaybook: async (id: number | string) => {
|
||||
return http.delete(`/ansible/playbooks/${id}`);
|
||||
},
|
||||
// 批量删除 Playbook // Logan.Li
|
||||
batchDeletePlaybooks: async (ids: number[]) => {
|
||||
return http.delete('/ansible/playbooks/batch-delete', { ids });
|
||||
},
|
||||
executePlaybook: async (id: number | string) => {
|
||||
return http.post(`/ansible/playbooks/${id}/execute`);
|
||||
},
|
||||
|
||||
@@ -75,8 +75,8 @@ export const http = {
|
||||
request<T>('POST', url, body),
|
||||
put: <T = any>(url: string, body?: any) =>
|
||||
request<T>('PUT', url, body),
|
||||
delete: <T = any>(url: string) =>
|
||||
request<T>('DELETE', url),
|
||||
delete: <T = any>(url: string, body?: any) =>
|
||||
request<T>('DELETE', url, body),
|
||||
};
|
||||
|
||||
export default http;
|
||||
Reference in new issue
Block a user