mirror of
https://github.com/acepanel/panel.git
synced 2026-02-07 02:07:26 +08:00
feat: 移动工具箱和跑分为独立应用
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
import { http } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 运行评分
|
||||
test: (name: string, multi: boolean): any => http.Post('/apps/benchmark/test', { name, multi })
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import { http } from '@/utils'
|
||||
|
||||
export default {
|
||||
// DNS
|
||||
dns: (): any => http.Get('/apps/toolbox/dns'),
|
||||
// 设置 DNS
|
||||
updateDns: (dns1: string, dns2: string): any => http.Post('/apps/toolbox/dns', { dns1, dns2 }),
|
||||
// SWAP
|
||||
swap: (): any => http.Get('/apps/toolbox/swap'),
|
||||
// 设置 SWAP
|
||||
updateSwap: (size: number): any => http.Post('/apps/toolbox/swap', { size }),
|
||||
// 时区
|
||||
timezone: (): any => http.Get('/apps/toolbox/timezone'),
|
||||
// 设置时区
|
||||
updateTimezone: (timezone: string): any => http.Post('/apps/toolbox/timezone', { timezone }),
|
||||
// 设置时间
|
||||
updateTime: (time: string): any => http.Post('/apps/toolbox/time', { time }),
|
||||
// 同步时间
|
||||
syncTime: (): any => http.Post('/apps/toolbox/sync_time'),
|
||||
// 主机名
|
||||
hostname: (): any => http.Get('/apps/toolbox/hostname'),
|
||||
// Hosts
|
||||
hosts: (): any => http.Get('/apps/toolbox/hosts'),
|
||||
// 设置主机名
|
||||
updateHostname: (hostname: string): any => http.Post('/apps/toolbox/hostname', { hostname }),
|
||||
// 设置 Hosts
|
||||
updateHosts: (hosts: string): any => http.Post('/apps/toolbox/hosts', { hosts }),
|
||||
// 设置 Root 密码
|
||||
updateRootPassword: (password: string): any =>
|
||||
http.Post('/apps/toolbox/root_password', { password })
|
||||
}
|
||||
6
web/src/api/panel/toolbox-benchmark/index.ts
Normal file
6
web/src/api/panel/toolbox-benchmark/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { http } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 运行评分
|
||||
test: (name: string, multi: boolean): any => http.Post('/toolbox_benchmark/test', { name, multi })
|
||||
}
|
||||
31
web/src/api/panel/toolbox-system/index.ts
Normal file
31
web/src/api/panel/toolbox-system/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { http } from '@/utils'
|
||||
|
||||
export default {
|
||||
// DNS
|
||||
dns: (): any => http.Get('/toolbox_system/dns'),
|
||||
// 设置 DNS
|
||||
updateDns: (dns1: string, dns2: string): any => http.Post('/toolbox_system/dns', { dns1, dns2 }),
|
||||
// SWAP
|
||||
swap: (): any => http.Get('/toolbox_system/swap'),
|
||||
// 设置 SWAP
|
||||
updateSwap: (size: number): any => http.Post('/toolbox_system/swap', { size }),
|
||||
// 时区
|
||||
timezone: (): any => http.Get('/toolbox_system/timezone'),
|
||||
// 设置时区
|
||||
updateTimezone: (timezone: string): any => http.Post('/toolbox_system/timezone', { timezone }),
|
||||
// 设置时间
|
||||
updateTime: (time: string): any => http.Post('/toolbox_system/time', { time }),
|
||||
// 同步时间
|
||||
syncTime: (): any => http.Post('/toolbox_system/sync_time'),
|
||||
// 主机名
|
||||
hostname: (): any => http.Get('/toolbox_system/hostname'),
|
||||
// Hosts
|
||||
hosts: (): any => http.Get('/toolbox_system/hosts'),
|
||||
// 设置主机名
|
||||
updateHostname: (hostname: string): any => http.Post('/toolbox_system/hostname', { hostname }),
|
||||
// 设置 Hosts
|
||||
updateHosts: (hosts: string): any => http.Post('/toolbox_system/hosts', { hosts }),
|
||||
// 设置 Root 密码
|
||||
updateRootPassword: (password: string): any =>
|
||||
http.Post('/toolbox_system/root_password', { password })
|
||||
}
|
||||
Reference in New Issue
Block a user