mirror of
https://github.com/acepanel/panel.git
synced 2026-02-06 16:21:03 +08:00
fix: remove database app manage page
This commit is contained in:
@@ -22,43 +22,5 @@ export default {
|
||||
rootPassword: (): Promise<AxiosResponse<any>> => request.get('/apps/mysql/rootPassword'),
|
||||
// 修改 root 密码
|
||||
setRootPassword: (password: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/mysql/rootPassword', { password }),
|
||||
// 数据库列表
|
||||
databases: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/apps/mysql/databases', { params: { page, limit } }),
|
||||
// 创建数据库
|
||||
addDatabase: (database: any): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/mysql/databases', database),
|
||||
// 删除数据库
|
||||
deleteDatabase: (database: string): Promise<AxiosResponse<any>> =>
|
||||
request.delete('/apps/mysql/databases', { params: { database } }),
|
||||
// 备份列表
|
||||
backups: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/apps/mysql/backups', { params: { page, limit } }),
|
||||
// 创建备份
|
||||
createBackup: (database: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/mysql/backups', { database }),
|
||||
// 上传备份
|
||||
uploadBackup: (backup: any): Promise<AxiosResponse<any>> =>
|
||||
request.put('/apps/mysql/backups', backup),
|
||||
// 删除备份
|
||||
deleteBackup: (name: string): Promise<AxiosResponse<any>> =>
|
||||
request.delete('/apps/mysql/backups', { params: { name } }),
|
||||
// 还原备份
|
||||
restoreBackup: (backup: string, database: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/mysql/backups/restore', { backup, database }),
|
||||
// 用户列表
|
||||
users: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/apps/mysql/users', { params: { page, limit } }),
|
||||
// 创建用户
|
||||
addUser: (user: any): Promise<AxiosResponse<any>> => request.post('/apps/mysql/users', user),
|
||||
// 删除用户
|
||||
deleteUser: (user: string): Promise<AxiosResponse<any>> =>
|
||||
request.delete('/apps/mysql/users', { params: { user } }),
|
||||
// 设置用户密码
|
||||
setUserPassword: (user: string, password: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/mysql/users/password', { user, password }),
|
||||
// 设置用户权限
|
||||
setUserPrivileges: (user: string, database: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/mysql/users/privileges', { user, database })
|
||||
request.post('/apps/mysql/rootPassword', { password })
|
||||
}
|
||||
|
||||
@@ -18,40 +18,5 @@ export default {
|
||||
// 获取日志
|
||||
log: (): Promise<AxiosResponse<any>> => request.get('/apps/postgresql/log'),
|
||||
// 清空错误日志
|
||||
clearLog: (): Promise<AxiosResponse<any>> => request.post('/apps/postgresql/clearLog'),
|
||||
// 数据库列表
|
||||
databases: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/apps/postgresql/databases', { params: { page, limit } }),
|
||||
// 创建数据库
|
||||
addDatabase: (database: any): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/postgresql/databases', database),
|
||||
// 删除数据库
|
||||
deleteDatabase: (database: string): Promise<AxiosResponse<any>> =>
|
||||
request.delete('/apps/postgresql/databases', { params: { database } }),
|
||||
// 备份列表
|
||||
backups: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/apps/postgresql/backups', { params: { page, limit } }),
|
||||
// 创建备份
|
||||
createBackup: (database: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/postgresql/backups', { database }),
|
||||
// 上传备份
|
||||
uploadBackup: (backup: any): Promise<AxiosResponse<any>> =>
|
||||
request.put('/apps/postgresql/backups', backup),
|
||||
// 删除备份
|
||||
deleteBackup: (name: string): Promise<AxiosResponse<any>> =>
|
||||
request.delete('/apps/postgresql/backups', { params: { name } }),
|
||||
// 还原备份
|
||||
restoreBackup: (backup: string, database: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/postgresql/backups/restore', { backup, database }),
|
||||
// 角色列表
|
||||
roles: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/apps/postgresql/roles', { params: { page, limit } }),
|
||||
// 创建角色
|
||||
addRole: (user: any): Promise<AxiosResponse<any>> => request.post('/apps/postgresql/roles', user),
|
||||
// 删除角色
|
||||
deleteRole: (user: string): Promise<AxiosResponse<any>> =>
|
||||
request.delete('/apps/postgresql/roles', { params: { user } }),
|
||||
// 设置角色密码
|
||||
setRolePassword: (user: string, password: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/apps/postgresql/roles/password', { user, password })
|
||||
clearLog: (): Promise<AxiosResponse<any>> => request.post('/apps/postgresql/clearLog')
|
||||
}
|
||||
|
||||
@@ -5,19 +5,19 @@ import { request } from '@/utils'
|
||||
export default {
|
||||
// 获取任务列表
|
||||
list: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/cron/list', { params: { page, limit } }),
|
||||
request.get('/cron', { params: { page, limit } }),
|
||||
// 获取任务脚本
|
||||
script: (id: number): Promise<AxiosResponse<any>> => request.get('/cron/' + id),
|
||||
// 添加任务
|
||||
add: (task: any): Promise<AxiosResponse<any>> => request.post('/cron/add', task),
|
||||
get: (id: number): Promise<AxiosResponse<any>> => request.get('/cron/' + id),
|
||||
// 创建任务
|
||||
create: (task: any): Promise<AxiosResponse<any>> => request.post('/cron', task),
|
||||
// 修改任务
|
||||
update: (id: number, name: string, time: string, script: string): Promise<AxiosResponse<any>> =>
|
||||
request.put('/cron/' + id, { name, time, script }),
|
||||
// 删除任务
|
||||
delete: (id: number): Promise<AxiosResponse<any>> => request.delete('/cron/' + id),
|
||||
// 获取任务日志
|
||||
log: (id: number): Promise<AxiosResponse<any>> => request.get('/cron/log/' + id),
|
||||
log: (id: number): Promise<AxiosResponse<any>> => request.get('/cron/' + id + '/log'),
|
||||
// 修改任务状态
|
||||
status: (id: number, status: boolean): Promise<AxiosResponse<any>> =>
|
||||
request.post('/cron/status', { id, status })
|
||||
request.post('/cron/' + id + '/status', { status })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user