mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 19:27:20 +08:00
feat: 设置页面初步完善及前端import lint
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 保护列表
|
||||
jails: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取配置
|
||||
config: (service: string): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取配置
|
||||
config: (): Promise<AxiosResponse<any>> => request.get('/apps/gitea/config'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 负载状态
|
||||
load: (): Promise<AxiosResponse<any>> => request.get('/apps/mysql/load'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 负载状态
|
||||
load: (): Promise<AxiosResponse<any>> => request.get('/apps/openresty/load'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 负载状态
|
||||
load: (version: number): Promise<AxiosResponse<any>> => request.get(`/apps/php/${version}/load`),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取信息
|
||||
info: (): Promise<AxiosResponse<any>> => request.get('/apps/phpmyadmin/info'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取注册表配置
|
||||
registryConfig: (): Promise<AxiosResponse<any>> => request.get('/apps/podman/registryConfig'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 负载状态
|
||||
load: (): Promise<AxiosResponse<any>> => request.get('/apps/postgresql/load'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 列表
|
||||
list: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 负载状态
|
||||
load: (): Promise<AxiosResponse<any>> => request.get('/apps/redis/load'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取配置
|
||||
config: (): Promise<AxiosResponse<any>> => request.get('/apps/rsync/config'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 列表
|
||||
list: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 服务名称
|
||||
service: (): Promise<AxiosResponse<any>> => request.get('/apps/supervisor/service'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// DNS
|
||||
dns: (): Promise<AxiosResponse<any>> => request.get('/apps/toolbox/dns'),
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取应用列表
|
||||
list: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/app/list', { params: { page, limit } }),
|
||||
// 安装应用
|
||||
install: (slug: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/app/install', { slug }),
|
||||
install: (slug: string): Promise<AxiosResponse<any>> => request.post('/app/install', { slug }),
|
||||
// 卸载应用
|
||||
uninstall: (slug: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/app/uninstall', { slug }),
|
||||
// 更新应用
|
||||
update: (slug: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/app/update', { slug }),
|
||||
update: (slug: string): Promise<AxiosResponse<any>> => request.post('/app/update', { slug }),
|
||||
// 设置首页显示
|
||||
updateShow: (slug: string, show: boolean): Promise<AxiosResponse<any>> =>
|
||||
request.post('/app/updateShow', { slug, show }),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// CA 供应商列表
|
||||
caProviders: (): Promise<AxiosResponse<any>> => request.get('/cert/caProviders'),
|
||||
@@ -19,8 +20,7 @@ export default {
|
||||
userUpdate: (id: number, data: any): Promise<AxiosResponse<any>> =>
|
||||
request.put(`/cert/users/${id}`, data),
|
||||
// ACME 用户删除
|
||||
userDelete: (id: number): Promise<AxiosResponse<any>> =>
|
||||
request.delete(`/cert/users/${id}`),
|
||||
userDelete: (id: number): Promise<AxiosResponse<any>> => request.delete(`/cert/users/${id}`),
|
||||
// DNS 记录列表
|
||||
dns: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/cert/dns', { params: { page, limit } }),
|
||||
@@ -44,15 +44,13 @@ export default {
|
||||
certUpdate: (id: number, data: any): Promise<AxiosResponse<any>> =>
|
||||
request.put(`/cert/certs/${id}`, data),
|
||||
// 证书删除
|
||||
certDelete: (id: number): Promise<AxiosResponse<any>> =>
|
||||
request.delete(`/cert/certs/${id}`),
|
||||
certDelete: (id: number): Promise<AxiosResponse<any>> => request.delete(`/cert/certs/${id}`),
|
||||
// 签发
|
||||
obtain: (id: number): Promise<AxiosResponse<any>> => request.post(`/cert/obtain`, { id }),
|
||||
// 续签
|
||||
renew: (id: number): Promise<AxiosResponse<any>> => request.post(`/cert/renew`, { id }),
|
||||
// 获取 DNS 记录
|
||||
manualDNS: (id: number): Promise<AxiosResponse<any>> =>
|
||||
request.post(`/cert/manualDNS`, { id }),
|
||||
manualDNS: (id: number): Promise<AxiosResponse<any>> => request.post(`/cert/manualDNS`, { id }),
|
||||
// 部署
|
||||
deploy: (id: number, website_id: number): Promise<AxiosResponse<any>> =>
|
||||
request.post(`/cert/deploy`, { id, website_id })
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取容器列表
|
||||
containerList: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取任务列表
|
||||
list: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 创建文件/文件夹
|
||||
create: (path: string, dir: boolean): Promise<AxiosResponse<any>> =>
|
||||
@@ -12,8 +13,7 @@ export default {
|
||||
save: (path: string, content: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/file/save', { path, content }),
|
||||
// 删除文件
|
||||
delete: (path: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/file/delete', { path }),
|
||||
delete: (path: string): Promise<AxiosResponse<any>> => request.post('/file/delete', { path }),
|
||||
// 上传文件
|
||||
upload: (path: string, formData: FormData, onProgress: any): Promise<AxiosResponse<any>> => {
|
||||
formData.append('path', path)
|
||||
@@ -42,8 +42,7 @@ export default {
|
||||
mode: string,
|
||||
owner: string,
|
||||
group: string
|
||||
): Promise<AxiosResponse<any>> =>
|
||||
request.post('/file/permission', { path, mode, owner, group }),
|
||||
): Promise<AxiosResponse<any>> => request.post('/file/permission', { path, mode, owner, group }),
|
||||
// 压缩文件
|
||||
archive: (paths: string[], file: string): Promise<AxiosResponse<any>> =>
|
||||
request.post('/file/archive', { paths, file }),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 面板信息
|
||||
panel: (): Promise<Response> => fetch('/api/info/panel'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 开关
|
||||
switch: (monitor: boolean): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取防火墙状态
|
||||
firewallStatus: (): Promise<AxiosResponse<any>> => request.get('/safe/firewallStatus'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取设置
|
||||
list: (): Promise<AxiosResponse<any>> => request.get('/setting'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取信息
|
||||
info: (): Promise<AxiosResponse<any>> => request.get('/ssh/info'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 服务状态
|
||||
status: (service: string): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取状态
|
||||
status: (): Promise<AxiosResponse<any>> => request.get('/task/status'),
|
||||
@@ -8,8 +9,7 @@ export default {
|
||||
list: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/task/list', { params: { page, limit } }),
|
||||
// 获取任务日志
|
||||
log: (id: number): Promise<AxiosResponse<any>> =>
|
||||
request.get('/task/log', { params: { id } }),
|
||||
log: (id: number): Promise<AxiosResponse<any>> => request.get('/task/log', { params: { id } }),
|
||||
// 删除任务
|
||||
delete: (id: number): Promise<AxiosResponse<any>> => request.post('/task/delete', { id })
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 登录
|
||||
login: (username: string, password: string): Promise<AxiosResponse<any>> =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { request } from '@/utils'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 列表
|
||||
list: (page: number, limit: number): Promise<AxiosResponse<any>> =>
|
||||
|
||||
Reference in New Issue
Block a user