diff --git a/agent/init/dir/dir.go b/agent/init/dir/dir.go index 7bdc79cb9..ca8820f36 100644 --- a/agent/init/dir/dir.go +++ b/agent/init/dir/dir.go @@ -31,7 +31,7 @@ func Init() { global.Dir.RecycleBinDir, _ = fileOp.CreateDirWithPath(true, "/.1panel_clash") global.Dir.SSLLogDir, _ = fileOp.CreateDirWithPath(true, path.Join(baseDir, "1panel/log/ssl")) - loadLocalDir() + //loadLocalDir() } func loadLocalDir() { diff --git a/frontend/src/api/modules/app.ts b/frontend/src/api/modules/app.ts index 6183c28ec..9aaaa1127 100644 --- a/frontend/src/api/modules/app.ts +++ b/frontend/src/api/modules/app.ts @@ -3,123 +3,119 @@ import { ResPage } from '../interface'; import { App } from '../interface/app'; import { TimeoutEnum } from '@/enums/http-enum'; -export const SyncApp = (req: App.AppStoreSync) => { +export const syncApp = (req: App.AppStoreSync) => { return http.post('apps/sync/remote', req); }; -export const SyncLocalApp = (req: App.AppStoreSync) => { +export const syncLocalApp = (req: App.AppStoreSync) => { return http.post('apps/sync/local', req); }; -export const GetAppListUpdate = () => { - return http.get('apps/checkupdate'); -}; - -export const SearchApp = (req: App.AppReq) => { +export const searchApp = (req: App.AppReq) => { return http.post('apps/search', req); }; -export const GetApp = (key: string) => { +export const getAppByKey = (key: string) => { return http.get('apps/' + key); }; -export const GetAppTags = () => { +export const getAppTags = () => { return http.get('apps/tags'); }; -export const GetAppDetail = (appID: number, version: string, type: string) => { +export const getAppDetail = (appID: number, version: string, type: string) => { return http.get(`apps/detail/${appID}/${version}/${type}`); }; -export const GetAppDetailByID = (id: number) => { +export const getAppDetailByID = (id: number) => { return http.get(`apps/details/${id}`); }; -export const InstallApp = (install: App.AppInstall) => { +export const installApp = (install: App.AppInstall) => { return http.post('apps/install', install); }; -export const ChangePort = (params: App.ChangePort) => { +export const changePort = (params: App.ChangePort) => { return http.post('apps/installed/port/change', params); }; -export const SearchAppInstalled = (search: App.AppInstallSearch) => { +export const searchAppInstalled = (search: App.AppInstallSearch) => { return http.post>('apps/installed/search', search); }; -export const ListAppInstalled = () => { +export const listAppInstalled = () => { return http.get>('apps/installed/list'); }; -export const GetAppPort = (type: string, name: string) => { +export const getAppPort = (type: string, name: string) => { return http.post(`apps/installed/loadport`, { type: type, name: name }); }; -export const GetAppConnInfo = (type: string, name: string) => { +export const getAppConnInfo = (type: string, name: string) => { return http.post(`apps/installed/conninfo`, { type: type, name: name }); }; -export const CheckAppInstalled = (key: string, name: string) => { +export const checkAppInstalled = (key: string, name: string) => { return http.post(`apps/installed/check`, { key: key, name: name }); }; -export const AppInstalledDeleteCheck = (appInstallId: number) => { +export const appInstalledDeleteCheck = (appInstallId: number) => { return http.get(`apps/installed/delete/check/${appInstallId}`); }; -export const GetAppInstalled = (search: App.AppInstalledSearch) => { +export const getAppInstalled = (search: App.AppInstalledSearch) => { return http.post('apps/installed/search', search); }; -export const InstalledOp = (op: App.AppInstalledOp) => { +export const installedOp = (op: App.AppInstalledOp) => { return http.post('apps/installed/op', op, TimeoutEnum.T_40S); }; -export const SyncInstalledApp = () => { +export const syncInstalledApp = () => { return http.post('apps/installed/sync', {}); }; -export const GetAppService = (key: string | undefined) => { +export const getAppService = (key: string | undefined) => { return http.get(`apps/services/${key}`); }; -export const GetAppUpdateVersions = (req: App.AppUpdateVersionReq) => { +export const getAppUpdateVersions = (req: App.AppUpdateVersionReq) => { return http.post(`apps/installed/update/versions`, req); }; -export const GetAppDefaultConfig = (key: string, name: string) => { +export const getAppDefaultConfig = (key: string, name: string) => { return http.post(`apps/installed/conf`, { type: key, name: name }); }; -export const GetAppInstallParams = (id: number) => { +export const getAppInstallParams = (id: number) => { return http.get(`apps/installed/params/${id}`); }; -export const UpdateAppInstallParams = (req: any) => { +export const updateAppInstallParams = (req: any) => { return http.post(`apps/installed/params/update`, req); }; -export const IgnoreUpgrade = (req: any) => { +export const ignoreUpgrade = (req: any) => { return http.post(`apps/installed/ignore`, req); }; -export const GetIgnoredApp = () => { +export const getIgnoredApp = () => { return http.get(`apps/ignored/detail`); }; -export const UpdateInstallConfig = (req: App.AppConfigUpdate) => { +export const updateInstallConfig = (req: App.AppConfigUpdate) => { return http.post(`apps/installed/config/update`, req); }; -export const GetAppStoreConfig = () => { +export const getAppStoreConfig = () => { return http.get(`apps/store/config`); }; -export const UpdateAppStoreConfig = (req: App.AppStoreConfig) => { +export const updateAppStoreConfig = (req: App.AppStoreConfig) => { return http.post(`apps/store/update`, req); }; -export const SyncCutomAppStore = (req: App.AppStoreSync) => { +export const syncCutomAppStore = (req: App.AppStoreSync) => { return http.post(`/custom/app/sync`, req); }; diff --git a/frontend/src/api/modules/files.ts b/frontend/src/api/modules/files.ts index 0804604ab..31f74d256 100644 --- a/frontend/src/api/modules/files.ts +++ b/frontend/src/api/modules/files.ts @@ -5,87 +5,87 @@ import { ResPage } from '../interface'; import { TimeoutEnum } from '@/enums/http-enum'; import { ReqPage } from '@/api/interface'; -export const GetFilesList = (params: File.ReqFile) => { +export const getFilesList = (params: File.ReqFile) => { return http.post('files/search', params, TimeoutEnum.T_5M); }; -export const GetUploadList = (params: File.SearchUploadInfo) => { +export const getUploadList = (params: File.SearchUploadInfo) => { return http.post>('files/upload/search', params); }; -export const GetFilesTree = (params: File.ReqFile) => { +export const getFilesTree = (params: File.ReqFile) => { return http.post('files/tree', params); }; -export const CreateFile = (form: File.FileCreate) => { +export const createFile = (form: File.FileCreate) => { return http.post('files', form); }; -export const DeleteFile = (form: File.FileDelete) => { +export const deleteFile = (form: File.FileDelete) => { return http.post('files/del', form); }; -export const BatchDeleteFile = (form: File.FileBatchDelete) => { +export const batchDeleteFile = (form: File.FileBatchDelete) => { return http.post('files/batch/del', form); }; -export const ChangeFileMode = (form: File.FileCreate) => { +export const changeFileMode = (form: File.FileCreate) => { return http.post('files/mode', form); }; -export const CompressFile = (form: File.FileCompress) => { +export const compressFile = (form: File.FileCompress) => { return http.post('files/compress', form, TimeoutEnum.T_10M); }; -export const DeCompressFile = (form: File.FileDeCompress) => { +export const deCompressFile = (form: File.FileDeCompress) => { return http.post('files/decompress', form, TimeoutEnum.T_10M); }; -export const GetFileContent = (params: File.ReqFile) => { +export const getFileContent = (params: File.ReqFile) => { return http.post('files/content', params); }; -export const SaveFileContent = (params: File.FileEdit) => { +export const saveFileContent = (params: File.FileEdit) => { return http.post('files/save', params); }; -export const CheckFile = (path: string) => { +export const checkFile = (path: string) => { return http.post('files/check', { path: path }); }; -export const UploadFileData = (params: FormData, config: AxiosRequestConfig) => { +export const uploadFileData = (params: FormData, config: AxiosRequestConfig) => { return http.upload('files/upload', params, config); }; -export const ChunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => { +export const chunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => { return http.upload('files/chunkupload', params, config); }; -export const RenameRile = (params: File.FileRename) => { +export const renameRile = (params: File.FileRename) => { return http.post('files/rename', params); }; -export const ChangeOwner = (params: File.FileOwner) => { +export const changeOwner = (params: File.FileOwner) => { return http.post('files/owner', params); }; -export const WgetFile = (params: File.FileWget) => { +export const wgetFile = (params: File.FileWget) => { return http.post('files/wget', params); }; -export const MoveFile = (params: File.FileMove) => { +export const moveFile = (params: File.FileMove) => { return http.post('files/move', params, TimeoutEnum.T_5M); }; -export const DownloadFile = (params: File.FileDownload) => { +export const downloadFile = (params: File.FileDownload) => { return http.download('files/download', params, { responseType: 'blob', timeout: TimeoutEnum.T_40S }); }; -export const ComputeDirSize = (params: File.DirSizeReq) => { +export const computeDirSize = (params: File.DirSizeReq) => { return http.post('files/size', params, TimeoutEnum.T_5M); }; -export const FileKeys = () => { +export const fileKeys = () => { return http.get('files/keys'); }; @@ -101,30 +101,30 @@ export const clearRecycle = () => { return http.post('files/recycle/clear'); }; -export const SearchFavorite = (params: ReqPage) => { +export const searchFavorite = (params: ReqPage) => { return http.post>('files/favorite/search', params); }; -export const AddFavorite = (path: string) => { +export const addFavorite = (path: string) => { return http.post('files/favorite', { path: path }); }; -export const ReadByLine = (req: File.FileReadByLine) => { +export const readByLine = (req: File.FileReadByLine) => { return http.post('files/read', req); }; -export const RemoveFavorite = (id: number) => { +export const removeFavorite = (id: number) => { return http.post('files/favorite/del', { id: id }); }; -export const BatchChangeRole = (params: File.FileRole) => { +export const batchChangeRole = (params: File.FileRole) => { return http.post('files/batch/role', params); }; -export const GetRecycleStatus = () => { +export const getRecycleStatus = () => { return http.get('files/recycle/status'); }; -export const GetPathByType = (pathType: string) => { +export const getPathByType = (pathType: string) => { return http.get(`files/path/${pathType}`); }; diff --git a/frontend/src/api/modules/group.ts b/frontend/src/api/modules/group.ts index ec09de4e9..b1e3a2bc1 100644 --- a/frontend/src/api/modules/group.ts +++ b/frontend/src/api/modules/group.ts @@ -1,15 +1,15 @@ import { Group } from '../interface/group'; import http from '@/api'; -export const GetGroupList = (type: string) => { +export const getGroupList = (type: string) => { return http.post>(`/core/groups/search`, { type: type }); }; -export const CreateGroup = (params: Group.GroupCreate) => { +export const createGroup = (params: Group.GroupCreate) => { return http.post(`/core/groups`, params); }; -export const UpdateGroup = (params: Group.GroupUpdate) => { +export const updateGroup = (params: Group.GroupUpdate) => { return http.post(`/core/groups/update`, params); }; -export const DeleteGroup = (id: number) => { +export const deleteGroup = (id: number) => { return http.post(`/core/groups/del`, { id: id }); }; diff --git a/frontend/src/api/modules/host-tool.ts b/frontend/src/api/modules/host-tool.ts index c15064387..c4a32fbe7 100644 --- a/frontend/src/api/modules/host-tool.ts +++ b/frontend/src/api/modules/host-tool.ts @@ -2,42 +2,38 @@ import http from '@/api'; import { HostTool } from '../interface/host-tool'; import { TimeoutEnum } from '@/enums/http-enum'; -export const GetSupervisorStatus = () => { +export const getSupervisorStatus = () => { return http.post(`/hosts/tool`, { type: 'supervisord', operate: 'status' }); }; -export const OperateSupervisor = (operate: string) => { +export const operateSupervisor = (operate: string) => { return http.post(`/hosts/tool/operate`, { type: 'supervisord', operate: operate }); }; -export const OperateSupervisorConfig = (req: HostTool.SupersivorConfig) => { +export const operateSupervisorConfig = (req: HostTool.SupersivorConfig) => { return http.post(`/hosts/tool/config`, req); }; -export const GetSupervisorLog = () => { +export const getSupervisorLog = () => { return http.post(`/hosts/tool/log`, { type: 'supervisord' }); }; -export const InitSupervisor = (req: HostTool.SupersivorInit) => { +export const initSupervisor = (req: HostTool.SupersivorInit) => { return http.post(`/hosts/tool/init`, req); }; -export const CreateSupervisorProcess = (req: HostTool.SupersivorProcess) => { +export const createSupervisorProcess = (req: HostTool.SupersivorProcess) => { return http.post(`/hosts/tool/supervisor/process`, req); }; -export const OperateSupervisorProcess = (req: HostTool.ProcessReq) => { +export const operateSupervisorProcess = (req: HostTool.ProcessReq) => { return http.post(`/hosts/tool/supervisor/process`, req, TimeoutEnum.T_60S); }; -export const LoadProcessStatus = () => { - return http.post>(`/hosts/tool/supervisor/process/load`, {}, TimeoutEnum.T_40S); -}; - -export const GetSupervisorProcess = () => { +export const getSupervisorProcess = () => { return http.get(`/hosts/tool/supervisor/process`); }; -export const OperateSupervisorProcessFile = (req: HostTool.ProcessFileReq) => { +export const operateSupervisorProcessFile = (req: HostTool.ProcessFileReq) => { return http.post(`/hosts/tool/supervisor/process/file`, req, TimeoutEnum.T_60S); }; diff --git a/frontend/src/api/modules/nginx.ts b/frontend/src/api/modules/nginx.ts index 4f763ff46..7db458940 100644 --- a/frontend/src/api/modules/nginx.ts +++ b/frontend/src/api/modules/nginx.ts @@ -2,34 +2,34 @@ import http from '@/api'; import { File } from '../interface/file'; import { Nginx } from '../interface/nginx'; -export const GetNginx = () => { +export const getNginx = () => { return http.get(`/openresty`); }; -export const GetNginxConfigByScope = (req: Nginx.NginxScopeReq) => { +export const getNginxConfigByScope = (req: Nginx.NginxScopeReq) => { return http.post(`/openresty/scope`, req); }; -export const UpdateNginxConfigByScope = (req: Nginx.NginxConfigReq) => { +export const updateNginxConfigByScope = (req: Nginx.NginxConfigReq) => { return http.post(`/openresty/update`, req); }; -export const GetNginxStatus = () => { +export const getNginxStatus = () => { return http.get(`/openresty/status`); }; -export const UpdateNginxConfigFile = (req: Nginx.NginxFileUpdate) => { +export const updateNginxConfigFile = (req: Nginx.NginxFileUpdate) => { return http.post(`/openresty/file`, req); }; -export const BuildNginx = (req: Nginx.NginxBuildReq) => { +export const buildNginx = (req: Nginx.NginxBuildReq) => { return http.post(`/openresty/build`, req); }; -export const GetNginxModules = () => { +export const getNginxModules = () => { return http.get(`/openresty/modules`); }; -export const UpdateNginxModule = (req: Nginx.NginxModuleUpdate) => { +export const updateNginxModule = (req: Nginx.NginxModuleUpdate) => { return http.post(`/openresty/modules/update`, req); }; diff --git a/frontend/src/api/modules/process.ts b/frontend/src/api/modules/process.ts index fa0217245..af9d737c9 100644 --- a/frontend/src/api/modules/process.ts +++ b/frontend/src/api/modules/process.ts @@ -1,6 +1,6 @@ import http from '@/api'; import { Process } from '../interface/process'; -export const StopProcess = (req: Process.StopReq) => { +export const stopProcess = (req: Process.StopReq) => { return http.post(`/process/stop`, req); }; diff --git a/frontend/src/api/modules/runtime.ts b/frontend/src/api/modules/runtime.ts index b4f9eb5a4..b11cd18cd 100644 --- a/frontend/src/api/modules/runtime.ts +++ b/frontend/src/api/modules/runtime.ts @@ -110,14 +110,14 @@ export const GetSupervisorProcess = (id: number) => { return http.get(`/runtimes/supervisor/process/${id}`); }; -export const OperateSupervisorProcess = (req: Runtime.ProcessReq) => { +export const operateSupervisorProcess = (req: Runtime.ProcessReq) => { return http.post(`/runtimes/supervisor/process`, req, TimeoutEnum.T_60S); }; -export const OperateSupervisorProcessFile = (req: Runtime.ProcessFileReq) => { +export const operateSupervisorProcessFile = (req: Runtime.ProcessFileReq) => { return http.post(`/runtimes/supervisor/process/file`, req, TimeoutEnum.T_60S); }; -export const CreateSupervisorProcess = (req: Runtime.SupersivorProcess) => { +export const createSupervisorProcess = (req: Runtime.SupersivorProcess) => { return http.post(`/runtimes/supervisor/process`, req); }; diff --git a/frontend/src/api/modules/setting.ts b/frontend/src/api/modules/setting.ts index 5cf33a883..9b31f0d72 100644 --- a/frontend/src/api/modules/setting.ts +++ b/frontend/src/api/modules/setting.ts @@ -5,7 +5,7 @@ import { ResPage, SearchWithPage, DescriptionUpdate, ReqPage } from '../interfac import { Setting } from '../interface/setting'; // license -export const UploadFileData = (params: FormData) => { +export const uploadFileData = (params: FormData) => { return http.upload('/core/licenses/upload', params); }; export const SearchLicense = (params: ReqPage) => { diff --git a/frontend/src/api/modules/website.ts b/frontend/src/api/modules/website.ts index f5a9fc70f..0515d83ad 100644 --- a/frontend/src/api/modules/website.ts +++ b/frontend/src/api/modules/website.ts @@ -6,15 +6,15 @@ import { TimeoutEnum } from '@/enums/http-enum'; import { deepCopy } from '@/utils/util'; import { Base64 } from 'js-base64'; -export const SearchWebsites = (req: Website.WebSiteSearch) => { +export const searchWebsites = (req: Website.WebSiteSearch) => { return http.post>(`/websites/search`, req); }; -export const ListWebsites = () => { +export const listWebsites = () => { return http.get(`/websites/list`); }; -export const CreateWebsite = (req: Website.WebSiteCreateReq) => { +export const createWebsite = (req: Website.WebSiteCreateReq) => { let request = deepCopy(req) as Website.WebSiteCreateReq; if (request.ftpPassword) { request.ftpPassword = Base64.encode(request.ftpPassword); @@ -22,324 +22,316 @@ export const CreateWebsite = (req: Website.WebSiteCreateReq) => { return http.post(`/websites`, request, TimeoutEnum.T_10M); }; -export const OpWebsite = (req: Website.WebSiteOp) => { +export const opWebsite = (req: Website.WebSiteOp) => { return http.post(`/websites/operate`, req); }; -export const OpWebsiteLog = (req: Website.WebSiteOpLog) => { +export const opWebsiteLog = (req: Website.WebSiteOpLog) => { return http.post(`/websites/log`, req); }; -export const UpdateWebsite = (req: Website.WebSiteUpdateReq) => { +export const updateWebsite = (req: Website.WebSiteUpdateReq) => { return http.post(`/websites/update`, req); }; -export const GetWebsite = (id: number) => { +export const getWebsite = (id: number) => { return http.get(`/websites/${id}`); }; -export const GetWebsiteOptions = (req: Website.OptionReq) => { +export const getWebsiteOptions = (req: Website.OptionReq) => { return http.post(`/websites/options`, req); }; -export const GetWebsiteConfig = (id: number, type: string) => { +export const getWebsiteConfig = (id: number, type: string) => { return http.get(`/websites/${id}/config/${type}`); }; -export const DeleteWebsite = (req: Website.WebSiteDel) => { +export const deleteWebsite = (req: Website.WebSiteDel) => { return http.post(`/websites/del`, req); }; -export const ListDomains = (id: number) => { +export const listDomains = (id: number) => { return http.get(`/websites/domains/${id}`); }; -export const DeleteDomain = (req: Website.DomainDelete) => { +export const deleteDomain = (req: Website.DomainDelete) => { return http.post(`/websites/domains/del/`, req); }; -export const CreateDomain = (req: Website.DomainCreate) => { +export const createDomain = (req: Website.DomainCreate) => { return http.post(`/websites/domains`, req); }; -export const UpdateDomain = (req: Website.DomainUpdate) => { +export const updateDomain = (req: Website.DomainUpdate) => { return http.post(`/websites/domains/update`, req); }; -export const GetNginxConfig = (req: Website.NginxScopeReq) => { +export const getNginxConfig = (req: Website.NginxScopeReq) => { return http.post(`/websites/config`, req); }; -export const UpdateNginxConfig = (req: Website.NginxConfigReq) => { +export const updateNginxConfig = (req: Website.NginxConfigReq) => { return http.post(`/websites/config/update`, req); }; -export const SearchDnsAccount = (req: ReqPage) => { +export const searchDnsAccount = (req: ReqPage) => { return http.post>(`/websites/dns/search`, req); }; -export const CreateDnsAccount = (req: Website.DnsAccountCreate) => { +export const createDnsAccount = (req: Website.DnsAccountCreate) => { return http.post(`/websites/dns`, req); }; -export const UpdateDnsAccount = (req: Website.DnsAccountUpdate) => { +export const updateDnsAccount = (req: Website.DnsAccountUpdate) => { return http.post(`/websites/dns/update`, req); }; -export const DeleteDnsAccount = (req: Website.DelReq) => { +export const deleteDnsAccount = (req: Website.DelReq) => { return http.post(`/websites/dns/del`, req); }; -export const SearchAcmeAccount = (req: ReqPage) => { +export const searchAcmeAccount = (req: ReqPage) => { return http.post>(`/websites/acme/search`, req); }; -export const CreateAcmeAccount = (req: Website.AcmeAccountCreate) => { +export const createAcmeAccount = (req: Website.AcmeAccountCreate) => { return http.post(`/websites/acme`, req, TimeoutEnum.T_10M); }; -export const DeleteAcmeAccount = (req: Website.DelReq) => { +export const deleteAcmeAccount = (req: Website.DelReq) => { return http.post(`/websites/acme/del`, req); }; -export const SearchSSL = (req: ReqPage) => { +export const searchSSL = (req: ReqPage) => { return http.post>(`/websites/ssl/search`, req); }; -export const ListSSL = (req: Website.SSLReq) => { +export const listSSL = (req: Website.SSLReq) => { return http.post(`/websites/ssl/search`, req); }; -export const CreateSSL = (req: Website.SSLCreate) => { +export const createSSL = (req: Website.SSLCreate) => { return http.post(`/websites/ssl`, req, TimeoutEnum.T_10M); }; -export const DeleteSSL = (req: Website.DelReq) => { +export const deleteSSL = (req: Website.DelReq) => { return http.post(`/websites/ssl/del`, req); }; -export const GetWebsiteSSL = (websiteId: number) => { - return http.get(`/websites/ssl/website/${websiteId}`); -}; - -export const GetSSL = (id: number) => { +export const getSSL = (id: number) => { return http.get(`/websites/ssl/${id}`); }; -export const ApplySSL = (req: Website.SSLApply) => { - return http.post(`/websites/ssl/apply`, req); -}; - -export const ObtainSSL = (req: Website.SSLObtain) => { +export const obtainSSL = (req: Website.SSLObtain) => { return http.post(`/websites/ssl/obtain`, req); }; -export const UpdateSSL = (req: Website.SSLUpdate) => { +export const updateSSL = (req: Website.SSLUpdate) => { return http.post(`/websites/ssl/update`, req); }; -export const GetDnsResolve = (req: Website.DNSResolveReq) => { +export const getDnsResolve = (req: Website.DNSResolveReq) => { return http.post(`/websites/ssl/resolve`, req, TimeoutEnum.T_5M); }; -export const GetHTTPSConfig = (id: number) => { +export const getHTTPSConfig = (id: number) => { return http.get(`/websites/${id}/https`); }; -export const UpdateHTTPSConfig = (req: Website.HTTPSReq) => { +export const updateHTTPSConfig = (req: Website.HTTPSReq) => { return http.post(`/websites/${req.websiteId}/https`, req); }; -export const PreCheck = (req: Website.CheckReq) => { +export const preCheck = (req: Website.CheckReq) => { return http.post(`/websites/check`, req); }; -export const UpdateNginxFile = (req: Website.NginxUpdate) => { +export const updateNginxFile = (req: Website.NginxUpdate) => { return http.post(`/websites/nginx/update`, req); }; -export const ChangeDefaultServer = (req: Website.DefaultServerUpdate) => { +export const changeDefaultServer = (req: Website.DefaultServerUpdate) => { return http.post(`/websites/default/server`, req); }; -export const GetRewriteConfig = (req: Website.RewriteReq) => { +export const getRewriteConfig = (req: Website.RewriteReq) => { return http.post(`/websites/rewrite`, req); }; -export const UpdateRewriteConfig = (req: Website.RewriteUpdate) => { +export const updateRewriteConfig = (req: Website.RewriteUpdate) => { return http.post(`/websites/rewrite/update`, req); }; -export const UpdateWebsiteDir = (req: Website.DirUpdate) => { +export const updateWebsiteDir = (req: Website.DirUpdate) => { return http.post(`/websites/dir/update`, req); }; -export const UpdateWebsiteDirPermission = (req: Website.DirPermissionUpdate) => { +export const updateWebsiteDirPermission = (req: Website.DirPermissionUpdate) => { return http.post(`/websites/dir/permission`, req); }; -export const GetProxyConfig = (req: Website.ProxyReq) => { +export const getProxyConfig = (req: Website.ProxyReq) => { return http.post(`/websites/proxies`, req); }; -export const OperateProxyConfig = (req: Website.ProxyReq) => { +export const operateProxyConfig = (req: Website.ProxyReq) => { return http.post(`/websites/proxies/update`, req); }; -export const UpdateProxyConfigFile = (req: Website.ProxyFileUpdate) => { +export const updateProxyConfigFile = (req: Website.ProxyFileUpdate) => { return http.post(`/websites/proxies/file`, req); }; -export const ClearProxtCache = (req: Website.WebsiteReq) => { +export const clearProxyCache = (req: Website.WebsiteReq) => { return http.post(`/websites/proxy/clear`, req); }; -export const GetAuthConfig = (req: Website.AuthReq) => { +export const getAuthConfig = (req: Website.AuthReq) => { return http.post(`/websites/auths`, req); }; -export const OperateAuthConfig = (req: Website.NginxAuthConfig) => { +export const operateAuthConfig = (req: Website.NginxAuthConfig) => { return http.post(`/websites/auths/update`, req); }; -export const GetPathAuthConfig = (req: Website.AuthReq) => { +export const getPathAuthConfig = (req: Website.AuthReq) => { return http.post(`/websites/auths/path`, req); }; -export const OperatePathAuthConfig = (req: Website.NginxPathAuthConfig) => { +export const operatePathAuthConfig = (req: Website.NginxPathAuthConfig) => { return http.post(`/websites/auths/path/update`, req); }; -export const GetAntiLeech = (req: Website.LeechReq) => { +export const getAntiLeech = (req: Website.LeechReq) => { return http.post(`/websites/leech`, req); }; -export const UpdateAntiLeech = (req: Website.LeechConfig) => { +export const updateAntiLeech = (req: Website.LeechConfig) => { return http.post(`/websites/leech/update`, req); }; -export const GetRedirectConfig = (req: Website.WebsiteReq) => { +export const getRedirectConfig = (req: Website.WebsiteReq) => { return http.post(`/websites/redirect`, req); }; -export const OperateRedirectConfig = (req: Website.WebsiteReq) => { +export const operateRedirectConfig = (req: Website.WebsiteReq) => { return http.post(`/websites/redirect/update`, req); }; -export const UpdateRedirectConfigFile = (req: Website.RedirectFileUpdate) => { +export const updateRedirectConfigFile = (req: Website.RedirectFileUpdate) => { return http.post(`/websites/redirect/file`, req); }; -export const ChangePHPVersion = (req: Website.PHPVersionChange) => { +export const changePHPVersion = (req: Website.PHPVersionChange) => { return http.post(`/websites/php/version`, req); }; -export const GetDirConfig = (req: Website.ProxyReq) => { +export const getDirConfig = (req: Website.ProxyReq) => { return http.post(`/websites/dir`, req); }; -export const UploadSSL = (req: Website.SSLUpload) => { +export const uploadSSL = (req: Website.SSLUpload) => { return http.post(`/websites/ssl/upload`, req); }; -export const SearchCAs = (req: ReqPage) => { +export const searchCAs = (req: ReqPage) => { return http.post>(`/websites/ca/search`, req); }; -export const CreateCA = (req: Website.CACreate) => { +export const createCA = (req: Website.CACreate) => { return http.post(`/websites/ca`, req); }; -export const ObtainSSLByCA = (req: Website.SSLObtainByCA) => { +export const obtainSSLByCA = (req: Website.SSLObtainByCA) => { return http.post(`/websites/ca/obtain`, req); }; -export const DeleteCA = (req: Website.DelReq) => { +export const deleteCA = (req: Website.DelReq) => { return http.post(`/websites/ca/del`, req); }; -export const RenewSSLByCA = (req: Website.RenewSSLByCA) => { +export const renewSSLByCA = (req: Website.RenewSSLByCA) => { return http.post(`/websites/ca/renew`, req); }; -export const DownloadFile = (params: Website.SSLDownload) => { +export const downloadFile = (params: Website.SSLDownload) => { return http.download(`/websites/ssl/download`, params, { responseType: 'blob', timeout: TimeoutEnum.T_40S, }); }; -export const GetCA = (id: number) => { +export const getCA = (id: number) => { return http.get(`/websites/ca/${id}`); }; -export const GetDefaultHtml = (type: string) => { +export const getDefaultHtml = (type: string) => { return http.get(`/websites/default/html/${type}`); }; -export const UpdateDefaultHtml = (req: Website.WebsiteHtmlUpdate) => { +export const updateDefaultHtml = (req: Website.WebsiteHtmlUpdate) => { return http.post(`/websites/default/html/update`, req); }; -export const DownloadCAFile = (params: Website.SSLDownload) => { +export const downloadCAFile = (params: Website.SSLDownload) => { return http.download(`/websites/ca/download`, params, { responseType: 'blob', timeout: TimeoutEnum.T_40S, }); }; -export const GetLoadBalances = (id: number) => { +export const getLoadBalances = (id: number) => { return http.get(`/websites/${id}/lbs`); }; -export const CreateLoadBalance = (req: Website.LoadBalanceReq) => { +export const createLoadBalance = (req: Website.LoadBalanceReq) => { return http.post(`/websites/lbs/create`, req); }; -export const DeleteLoadBalance = (req: Website.LoadBalanceDel) => { +export const deleteLoadBalance = (req: Website.LoadBalanceDel) => { return http.post(`/websites/lbs/del`, req); }; -export const UpdateLoadBalance = (req: Website.LoadBalanceReq) => { +export const updateLoadBalance = (req: Website.LoadBalanceReq) => { return http.post(`/websites/lbs/update`, req); }; -export const UpdateLoadBalanceFile = (req: Website.WebsiteLBUpdateFile) => { +export const updateLoadBalanceFile = (req: Website.WebsiteLBUpdateFile) => { return http.post(`/websites/lbs/file`, req); }; -export const UpdateCacheConfig = (req: Website.WebsiteCacheConfig) => { +export const updateCacheConfig = (req: Website.WebsiteCacheConfig) => { return http.post(`/websites/proxy/config`, req); }; -export const GetCacheConfig = (id: number) => { +export const getCacheConfig = (id: number) => { return http.get(`/websites/proxy/config/${id}`); }; -export const UpdateRealIPConfig = (req: Website.WebsiteRealIPConfig) => { +export const updateRealIPConfig = (req: Website.WebsiteRealIPConfig) => { return http.post(`/websites/realip/config`, req); }; -export const GetRealIPConfig = (id: number) => { +export const getRealIPConfig = (id: number) => { return http.get(`/websites/realip/config/${id}`); }; -export const GetWebsiteResource = (id: number) => { +export const getWebsiteResource = (id: number) => { return http.get(`/websites/resource/${id}`); }; -export const GetWebsiteDatabase = () => { +export const getWebsiteDatabase = () => { return http.get(`/websites/databases`); }; -export const ChangeDatabase = (req: Website.ChangeDatabase) => { +export const changeDatabase = (req: Website.ChangeDatabase) => { return http.post(`/websites/databases`, req); }; -export const OperateCustomRewrite = (req: Website.CustomRewirte) => { +export const operateCustomRewrite = (req: Website.CustomRewirte) => { return http.post(`/websites/rewrite/custom`, req); }; -export const ListCustomRewrite = () => { +export const listCustomRewrite = () => { return http.get(`/websites/rewrite/custom`); }; diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue index e15bb695e..4f2daf9ff 100644 --- a/frontend/src/components/app-status/index.vue +++ b/frontend/src/components/app-status/index.vue @@ -73,7 +73,7 @@ diff --git a/frontend/src/views/website/runtime/php/create/index.vue b/frontend/src/views/website/runtime/php/create/index.vue index 7c3dad40a..bbb5b0c24 100644 --- a/frontend/src/views/website/runtime/php/create/index.vue +++ b/frontend/src/views/website/runtime/php/create/index.vue @@ -181,7 +181,7 @@ diff --git a/frontend/src/views/website/website/config/basic/https/index.vue b/frontend/src/views/website/website/config/basic/https/index.vue index 81d8de2dc..0baa0581a 100644 --- a/frontend/src/views/website/website/config/basic/https/index.vue +++ b/frontend/src/views/website/website/config/basic/https/index.vue @@ -44,7 +44,7 @@ @@ -175,7 +175,7 @@ diff --git a/frontend/src/views/website/website/config/basic/rewrite/custom/index.vue b/frontend/src/views/website/website/config/basic/rewrite/custom/index.vue index 7d7d79897..26c35a64d 100644 --- a/frontend/src/views/website/website/config/basic/rewrite/custom/index.vue +++ b/frontend/src/views/website/website/config/basic/rewrite/custom/index.vue @@ -17,7 +17,7 @@ diff --git a/frontend/src/views/website/website/config/resource/index.vue b/frontend/src/views/website/website/config/resource/index.vue index c5c2de29e..17f1bfdd3 100644 --- a/frontend/src/views/website/website/config/resource/index.vue +++ b/frontend/src/views/website/website/config/resource/index.vue @@ -8,7 +8,7 @@ diff --git a/frontend/src/views/website/website/nginx/status/index.vue b/frontend/src/views/website/website/nginx/status/index.vue index 44a410dec..7e15c9dfc 100644 --- a/frontend/src/views/website/website/nginx/status/index.vue +++ b/frontend/src/views/website/website/nginx/status/index.vue @@ -52,7 +52,7 @@