mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
feat: Standardized interface name capitalization (#7770)
This commit is contained in:
parent
6a8e41937d
commit
90354451d2
@ -31,7 +31,7 @@ func Init() {
|
|||||||
global.Dir.RecycleBinDir, _ = fileOp.CreateDirWithPath(true, "/.1panel_clash")
|
global.Dir.RecycleBinDir, _ = fileOp.CreateDirWithPath(true, "/.1panel_clash")
|
||||||
global.Dir.SSLLogDir, _ = fileOp.CreateDirWithPath(true, path.Join(baseDir, "1panel/log/ssl"))
|
global.Dir.SSLLogDir, _ = fileOp.CreateDirWithPath(true, path.Join(baseDir, "1panel/log/ssl"))
|
||||||
|
|
||||||
loadLocalDir()
|
//loadLocalDir()
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadLocalDir() {
|
func loadLocalDir() {
|
||||||
|
@ -3,123 +3,119 @@ import { ResPage } from '../interface';
|
|||||||
import { App } from '../interface/app';
|
import { App } from '../interface/app';
|
||||||
import { TimeoutEnum } from '@/enums/http-enum';
|
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);
|
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);
|
return http.post('apps/sync/local', req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppListUpdate = () => {
|
export const searchApp = (req: App.AppReq) => {
|
||||||
return http.get<App.AppUpdateRes>('apps/checkupdate');
|
|
||||||
};
|
|
||||||
|
|
||||||
export const SearchApp = (req: App.AppReq) => {
|
|
||||||
return http.post<App.AppResPage>('apps/search', req);
|
return http.post<App.AppResPage>('apps/search', req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetApp = (key: string) => {
|
export const getAppByKey = (key: string) => {
|
||||||
return http.get<App.AppDTO>('apps/' + key);
|
return http.get<App.AppDTO>('apps/' + key);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppTags = () => {
|
export const getAppTags = () => {
|
||||||
return http.get<App.Tag[]>('apps/tags');
|
return http.get<App.Tag[]>('apps/tags');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppDetail = (appID: number, version: string, type: string) => {
|
export const getAppDetail = (appID: number, version: string, type: string) => {
|
||||||
return http.get<App.AppDetail>(`apps/detail/${appID}/${version}/${type}`);
|
return http.get<App.AppDetail>(`apps/detail/${appID}/${version}/${type}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppDetailByID = (id: number) => {
|
export const getAppDetailByID = (id: number) => {
|
||||||
return http.get<App.AppDetail>(`apps/details/${id}`);
|
return http.get<App.AppDetail>(`apps/details/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const InstallApp = (install: App.AppInstall) => {
|
export const installApp = (install: App.AppInstall) => {
|
||||||
return http.post<any>('apps/install', install);
|
return http.post<any>('apps/install', install);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ChangePort = (params: App.ChangePort) => {
|
export const changePort = (params: App.ChangePort) => {
|
||||||
return http.post<any>('apps/installed/port/change', params);
|
return http.post<any>('apps/installed/port/change', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SearchAppInstalled = (search: App.AppInstallSearch) => {
|
export const searchAppInstalled = (search: App.AppInstallSearch) => {
|
||||||
return http.post<ResPage<App.AppInstallDto>>('apps/installed/search', search);
|
return http.post<ResPage<App.AppInstallDto>>('apps/installed/search', search);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ListAppInstalled = () => {
|
export const listAppInstalled = () => {
|
||||||
return http.get<Array<App.AppInstalledInfo>>('apps/installed/list');
|
return http.get<Array<App.AppInstalledInfo>>('apps/installed/list');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppPort = (type: string, name: string) => {
|
export const getAppPort = (type: string, name: string) => {
|
||||||
return http.post<number>(`apps/installed/loadport`, { type: type, name: name });
|
return http.post<number>(`apps/installed/loadport`, { type: type, name: name });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppConnInfo = (type: string, name: string) => {
|
export const getAppConnInfo = (type: string, name: string) => {
|
||||||
return http.post<App.DatabaseConnInfo>(`apps/installed/conninfo`, { type: type, name: name });
|
return http.post<App.DatabaseConnInfo>(`apps/installed/conninfo`, { type: type, name: name });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CheckAppInstalled = (key: string, name: string) => {
|
export const checkAppInstalled = (key: string, name: string) => {
|
||||||
return http.post<App.CheckInstalled>(`apps/installed/check`, { key: key, name: name });
|
return http.post<App.CheckInstalled>(`apps/installed/check`, { key: key, name: name });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const AppInstalledDeleteCheck = (appInstallId: number) => {
|
export const appInstalledDeleteCheck = (appInstallId: number) => {
|
||||||
return http.get<App.AppInstallResource[]>(`apps/installed/delete/check/${appInstallId}`);
|
return http.get<App.AppInstallResource[]>(`apps/installed/delete/check/${appInstallId}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppInstalled = (search: App.AppInstalledSearch) => {
|
export const getAppInstalled = (search: App.AppInstalledSearch) => {
|
||||||
return http.post<App.AppInstalled[]>('apps/installed/search', search);
|
return http.post<App.AppInstalled[]>('apps/installed/search', search);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const InstalledOp = (op: App.AppInstalledOp) => {
|
export const installedOp = (op: App.AppInstalledOp) => {
|
||||||
return http.post<any>('apps/installed/op', op, TimeoutEnum.T_40S);
|
return http.post<any>('apps/installed/op', op, TimeoutEnum.T_40S);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SyncInstalledApp = () => {
|
export const syncInstalledApp = () => {
|
||||||
return http.post<any>('apps/installed/sync', {});
|
return http.post<any>('apps/installed/sync', {});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppService = (key: string | undefined) => {
|
export const getAppService = (key: string | undefined) => {
|
||||||
return http.get<App.AppService[]>(`apps/services/${key}`);
|
return http.get<App.AppService[]>(`apps/services/${key}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppUpdateVersions = (req: App.AppUpdateVersionReq) => {
|
export const getAppUpdateVersions = (req: App.AppUpdateVersionReq) => {
|
||||||
return http.post<any>(`apps/installed/update/versions`, req);
|
return http.post<any>(`apps/installed/update/versions`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppDefaultConfig = (key: string, name: string) => {
|
export const getAppDefaultConfig = (key: string, name: string) => {
|
||||||
return http.post<string>(`apps/installed/conf`, { type: key, name: name });
|
return http.post<string>(`apps/installed/conf`, { type: key, name: name });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppInstallParams = (id: number) => {
|
export const getAppInstallParams = (id: number) => {
|
||||||
return http.get<App.AppConfig>(`apps/installed/params/${id}`);
|
return http.get<App.AppConfig>(`apps/installed/params/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateAppInstallParams = (req: any) => {
|
export const updateAppInstallParams = (req: any) => {
|
||||||
return http.post<any>(`apps/installed/params/update`, req);
|
return http.post<any>(`apps/installed/params/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IgnoreUpgrade = (req: any) => {
|
export const ignoreUpgrade = (req: any) => {
|
||||||
return http.post<any>(`apps/installed/ignore`, req);
|
return http.post<any>(`apps/installed/ignore`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetIgnoredApp = () => {
|
export const getIgnoredApp = () => {
|
||||||
return http.get<App.IgnoredApp>(`apps/ignored/detail`);
|
return http.get<App.IgnoredApp>(`apps/ignored/detail`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateInstallConfig = (req: App.AppConfigUpdate) => {
|
export const updateInstallConfig = (req: App.AppConfigUpdate) => {
|
||||||
return http.post(`apps/installed/config/update`, req);
|
return http.post(`apps/installed/config/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAppStoreConfig = () => {
|
export const getAppStoreConfig = () => {
|
||||||
return http.get<App.AppStoreConfig>(`apps/store/config`);
|
return http.get<App.AppStoreConfig>(`apps/store/config`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateAppStoreConfig = (req: App.AppStoreConfig) => {
|
export const updateAppStoreConfig = (req: App.AppStoreConfig) => {
|
||||||
return http.post(`apps/store/update`, req);
|
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);
|
return http.post(`/custom/app/sync`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,87 +5,87 @@ import { ResPage } from '../interface';
|
|||||||
import { TimeoutEnum } from '@/enums/http-enum';
|
import { TimeoutEnum } from '@/enums/http-enum';
|
||||||
import { ReqPage } from '@/api/interface';
|
import { ReqPage } from '@/api/interface';
|
||||||
|
|
||||||
export const GetFilesList = (params: File.ReqFile) => {
|
export const getFilesList = (params: File.ReqFile) => {
|
||||||
return http.post<File.File>('files/search', params, TimeoutEnum.T_5M);
|
return http.post<File.File>('files/search', params, TimeoutEnum.T_5M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetUploadList = (params: File.SearchUploadInfo) => {
|
export const getUploadList = (params: File.SearchUploadInfo) => {
|
||||||
return http.post<ResPage<File.UploadInfo>>('files/upload/search', params);
|
return http.post<ResPage<File.UploadInfo>>('files/upload/search', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetFilesTree = (params: File.ReqFile) => {
|
export const getFilesTree = (params: File.ReqFile) => {
|
||||||
return http.post<File.FileTree[]>('files/tree', params);
|
return http.post<File.FileTree[]>('files/tree', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateFile = (form: File.FileCreate) => {
|
export const createFile = (form: File.FileCreate) => {
|
||||||
return http.post<File.File>('files', form);
|
return http.post<File.File>('files', form);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeleteFile = (form: File.FileDelete) => {
|
export const deleteFile = (form: File.FileDelete) => {
|
||||||
return http.post<File.File>('files/del', form);
|
return http.post<File.File>('files/del', form);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BatchDeleteFile = (form: File.FileBatchDelete) => {
|
export const batchDeleteFile = (form: File.FileBatchDelete) => {
|
||||||
return http.post('files/batch/del', form);
|
return http.post('files/batch/del', form);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ChangeFileMode = (form: File.FileCreate) => {
|
export const changeFileMode = (form: File.FileCreate) => {
|
||||||
return http.post<File.File>('files/mode', form);
|
return http.post<File.File>('files/mode', form);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CompressFile = (form: File.FileCompress) => {
|
export const compressFile = (form: File.FileCompress) => {
|
||||||
return http.post<File.File>('files/compress', form, TimeoutEnum.T_10M);
|
return http.post<File.File>('files/compress', form, TimeoutEnum.T_10M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeCompressFile = (form: File.FileDeCompress) => {
|
export const deCompressFile = (form: File.FileDeCompress) => {
|
||||||
return http.post<File.File>('files/decompress', form, TimeoutEnum.T_10M);
|
return http.post<File.File>('files/decompress', form, TimeoutEnum.T_10M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetFileContent = (params: File.ReqFile) => {
|
export const getFileContent = (params: File.ReqFile) => {
|
||||||
return http.post<File.File>('files/content', params);
|
return http.post<File.File>('files/content', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SaveFileContent = (params: File.FileEdit) => {
|
export const saveFileContent = (params: File.FileEdit) => {
|
||||||
return http.post<File.File>('files/save', params);
|
return http.post<File.File>('files/save', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CheckFile = (path: string) => {
|
export const checkFile = (path: string) => {
|
||||||
return http.post<boolean>('files/check', { path: path });
|
return http.post<boolean>('files/check', { path: path });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UploadFileData = (params: FormData, config: AxiosRequestConfig) => {
|
export const uploadFileData = (params: FormData, config: AxiosRequestConfig) => {
|
||||||
return http.upload<File.File>('files/upload', params, config);
|
return http.upload<File.File>('files/upload', params, config);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ChunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => {
|
export const chunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => {
|
||||||
return http.upload<File.File>('files/chunkupload', params, config);
|
return http.upload<File.File>('files/chunkupload', params, config);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const RenameRile = (params: File.FileRename) => {
|
export const renameRile = (params: File.FileRename) => {
|
||||||
return http.post<File.File>('files/rename', params);
|
return http.post<File.File>('files/rename', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ChangeOwner = (params: File.FileOwner) => {
|
export const changeOwner = (params: File.FileOwner) => {
|
||||||
return http.post<File.File>('files/owner', params);
|
return http.post<File.File>('files/owner', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const WgetFile = (params: File.FileWget) => {
|
export const wgetFile = (params: File.FileWget) => {
|
||||||
return http.post<File.FileWgetRes>('files/wget', params);
|
return http.post<File.FileWgetRes>('files/wget', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MoveFile = (params: File.FileMove) => {
|
export const moveFile = (params: File.FileMove) => {
|
||||||
return http.post<File.File>('files/move', params, TimeoutEnum.T_5M);
|
return http.post<File.File>('files/move', params, TimeoutEnum.T_5M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DownloadFile = (params: File.FileDownload) => {
|
export const downloadFile = (params: File.FileDownload) => {
|
||||||
return http.download<BlobPart>('files/download', params, { responseType: 'blob', timeout: TimeoutEnum.T_40S });
|
return http.download<BlobPart>('files/download', params, { responseType: 'blob', timeout: TimeoutEnum.T_40S });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ComputeDirSize = (params: File.DirSizeReq) => {
|
export const computeDirSize = (params: File.DirSizeReq) => {
|
||||||
return http.post<File.DirSizeRes>('files/size', params, TimeoutEnum.T_5M);
|
return http.post<File.DirSizeRes>('files/size', params, TimeoutEnum.T_5M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FileKeys = () => {
|
export const fileKeys = () => {
|
||||||
return http.get<File.FileKeys>('files/keys');
|
return http.get<File.FileKeys>('files/keys');
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -101,30 +101,30 @@ export const clearRecycle = () => {
|
|||||||
return http.post<any>('files/recycle/clear');
|
return http.post<any>('files/recycle/clear');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SearchFavorite = (params: ReqPage) => {
|
export const searchFavorite = (params: ReqPage) => {
|
||||||
return http.post<ResPage<File.Favorite>>('files/favorite/search', params);
|
return http.post<ResPage<File.Favorite>>('files/favorite/search', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const AddFavorite = (path: string) => {
|
export const addFavorite = (path: string) => {
|
||||||
return http.post<any>('files/favorite', { path: path });
|
return http.post<any>('files/favorite', { path: path });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ReadByLine = (req: File.FileReadByLine) => {
|
export const readByLine = (req: File.FileReadByLine) => {
|
||||||
return http.post<any>('files/read', req);
|
return http.post<any>('files/read', req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const RemoveFavorite = (id: number) => {
|
export const removeFavorite = (id: number) => {
|
||||||
return http.post<any>('files/favorite/del', { id: id });
|
return http.post<any>('files/favorite/del', { id: id });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BatchChangeRole = (params: File.FileRole) => {
|
export const batchChangeRole = (params: File.FileRole) => {
|
||||||
return http.post<any>('files/batch/role', params);
|
return http.post<any>('files/batch/role', params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetRecycleStatus = () => {
|
export const getRecycleStatus = () => {
|
||||||
return http.get<string>('files/recycle/status');
|
return http.get<string>('files/recycle/status');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetPathByType = (pathType: string) => {
|
export const getPathByType = (pathType: string) => {
|
||||||
return http.get<string>(`files/path/${pathType}`);
|
return http.get<string>(`files/path/${pathType}`);
|
||||||
};
|
};
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { Group } from '../interface/group';
|
import { Group } from '../interface/group';
|
||||||
import http from '@/api';
|
import http from '@/api';
|
||||||
|
|
||||||
export const GetGroupList = (type: string) => {
|
export const getGroupList = (type: string) => {
|
||||||
return http.post<Array<Group.GroupInfo>>(`/core/groups/search`, { type: type });
|
return http.post<Array<Group.GroupInfo>>(`/core/groups/search`, { type: type });
|
||||||
};
|
};
|
||||||
export const CreateGroup = (params: Group.GroupCreate) => {
|
export const createGroup = (params: Group.GroupCreate) => {
|
||||||
return http.post<Group.GroupCreate>(`/core/groups`, params);
|
return http.post<Group.GroupCreate>(`/core/groups`, params);
|
||||||
};
|
};
|
||||||
export const UpdateGroup = (params: Group.GroupUpdate) => {
|
export const updateGroup = (params: Group.GroupUpdate) => {
|
||||||
return http.post(`/core/groups/update`, params);
|
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 });
|
return http.post(`/core/groups/del`, { id: id });
|
||||||
};
|
};
|
||||||
|
@ -2,42 +2,38 @@ import http from '@/api';
|
|||||||
import { HostTool } from '../interface/host-tool';
|
import { HostTool } from '../interface/host-tool';
|
||||||
import { TimeoutEnum } from '@/enums/http-enum';
|
import { TimeoutEnum } from '@/enums/http-enum';
|
||||||
|
|
||||||
export const GetSupervisorStatus = () => {
|
export const getSupervisorStatus = () => {
|
||||||
return http.post<HostTool.HostTool>(`/hosts/tool`, { type: 'supervisord', operate: 'status' });
|
return http.post<HostTool.HostTool>(`/hosts/tool`, { type: 'supervisord', operate: 'status' });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OperateSupervisor = (operate: string) => {
|
export const operateSupervisor = (operate: string) => {
|
||||||
return http.post<any>(`/hosts/tool/operate`, { type: 'supervisord', operate: operate });
|
return http.post<any>(`/hosts/tool/operate`, { type: 'supervisord', operate: operate });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OperateSupervisorConfig = (req: HostTool.SupersivorConfig) => {
|
export const operateSupervisorConfig = (req: HostTool.SupersivorConfig) => {
|
||||||
return http.post<HostTool.SupersivorConfigRes>(`/hosts/tool/config`, req);
|
return http.post<HostTool.SupersivorConfigRes>(`/hosts/tool/config`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetSupervisorLog = () => {
|
export const getSupervisorLog = () => {
|
||||||
return http.post<any>(`/hosts/tool/log`, { type: 'supervisord' });
|
return http.post<any>(`/hosts/tool/log`, { type: 'supervisord' });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const InitSupervisor = (req: HostTool.SupersivorInit) => {
|
export const initSupervisor = (req: HostTool.SupersivorInit) => {
|
||||||
return http.post<any>(`/hosts/tool/init`, req);
|
return http.post<any>(`/hosts/tool/init`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateSupervisorProcess = (req: HostTool.SupersivorProcess) => {
|
export const createSupervisorProcess = (req: HostTool.SupersivorProcess) => {
|
||||||
return http.post<any>(`/hosts/tool/supervisor/process`, req);
|
return http.post<any>(`/hosts/tool/supervisor/process`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OperateSupervisorProcess = (req: HostTool.ProcessReq) => {
|
export const operateSupervisorProcess = (req: HostTool.ProcessReq) => {
|
||||||
return http.post<any>(`/hosts/tool/supervisor/process`, req, TimeoutEnum.T_60S);
|
return http.post<any>(`/hosts/tool/supervisor/process`, req, TimeoutEnum.T_60S);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LoadProcessStatus = () => {
|
export const getSupervisorProcess = () => {
|
||||||
return http.post<Array<HostTool.ProcessStatus>>(`/hosts/tool/supervisor/process/load`, {}, TimeoutEnum.T_40S);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const GetSupervisorProcess = () => {
|
|
||||||
return http.get<HostTool.SupersivorProcess[]>(`/hosts/tool/supervisor/process`);
|
return http.get<HostTool.SupersivorProcess[]>(`/hosts/tool/supervisor/process`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OperateSupervisorProcessFile = (req: HostTool.ProcessFileReq) => {
|
export const operateSupervisorProcessFile = (req: HostTool.ProcessFileReq) => {
|
||||||
return http.post<any>(`/hosts/tool/supervisor/process/file`, req, TimeoutEnum.T_60S);
|
return http.post<any>(`/hosts/tool/supervisor/process/file`, req, TimeoutEnum.T_60S);
|
||||||
};
|
};
|
||||||
|
@ -2,34 +2,34 @@ import http from '@/api';
|
|||||||
import { File } from '../interface/file';
|
import { File } from '../interface/file';
|
||||||
import { Nginx } from '../interface/nginx';
|
import { Nginx } from '../interface/nginx';
|
||||||
|
|
||||||
export const GetNginx = () => {
|
export const getNginx = () => {
|
||||||
return http.get<File.File>(`/openresty`);
|
return http.get<File.File>(`/openresty`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetNginxConfigByScope = (req: Nginx.NginxScopeReq) => {
|
export const getNginxConfigByScope = (req: Nginx.NginxScopeReq) => {
|
||||||
return http.post<Nginx.NginxParam[]>(`/openresty/scope`, req);
|
return http.post<Nginx.NginxParam[]>(`/openresty/scope`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateNginxConfigByScope = (req: Nginx.NginxConfigReq) => {
|
export const updateNginxConfigByScope = (req: Nginx.NginxConfigReq) => {
|
||||||
return http.post(`/openresty/update`, req);
|
return http.post(`/openresty/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetNginxStatus = () => {
|
export const getNginxStatus = () => {
|
||||||
return http.get<Nginx.NginxStatus>(`/openresty/status`);
|
return http.get<Nginx.NginxStatus>(`/openresty/status`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateNginxConfigFile = (req: Nginx.NginxFileUpdate) => {
|
export const updateNginxConfigFile = (req: Nginx.NginxFileUpdate) => {
|
||||||
return http.post(`/openresty/file`, req);
|
return http.post(`/openresty/file`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BuildNginx = (req: Nginx.NginxBuildReq) => {
|
export const buildNginx = (req: Nginx.NginxBuildReq) => {
|
||||||
return http.post(`/openresty/build`, req);
|
return http.post(`/openresty/build`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetNginxModules = () => {
|
export const getNginxModules = () => {
|
||||||
return http.get<Nginx.NginxBuildConfig>(`/openresty/modules`);
|
return http.get<Nginx.NginxBuildConfig>(`/openresty/modules`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateNginxModule = (req: Nginx.NginxModuleUpdate) => {
|
export const updateNginxModule = (req: Nginx.NginxModuleUpdate) => {
|
||||||
return http.post(`/openresty/modules/update`, req);
|
return http.post(`/openresty/modules/update`, req);
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import http from '@/api';
|
import http from '@/api';
|
||||||
import { Process } from '../interface/process';
|
import { Process } from '../interface/process';
|
||||||
|
|
||||||
export const StopProcess = (req: Process.StopReq) => {
|
export const stopProcess = (req: Process.StopReq) => {
|
||||||
return http.post<any>(`/process/stop`, req);
|
return http.post<any>(`/process/stop`, req);
|
||||||
};
|
};
|
||||||
|
@ -110,14 +110,14 @@ export const GetSupervisorProcess = (id: number) => {
|
|||||||
return http.get<HostTool.ProcessStatus[]>(`/runtimes/supervisor/process/${id}`);
|
return http.get<HostTool.ProcessStatus[]>(`/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);
|
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<string>(`/runtimes/supervisor/process/file`, req, TimeoutEnum.T_60S);
|
return http.post<string>(`/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);
|
return http.post(`/runtimes/supervisor/process`, req);
|
||||||
};
|
};
|
||||||
|
@ -5,7 +5,7 @@ import { ResPage, SearchWithPage, DescriptionUpdate, ReqPage } from '../interfac
|
|||||||
import { Setting } from '../interface/setting';
|
import { Setting } from '../interface/setting';
|
||||||
|
|
||||||
// license
|
// license
|
||||||
export const UploadFileData = (params: FormData) => {
|
export const uploadFileData = (params: FormData) => {
|
||||||
return http.upload('/core/licenses/upload', params);
|
return http.upload('/core/licenses/upload', params);
|
||||||
};
|
};
|
||||||
export const SearchLicense = (params: ReqPage) => {
|
export const SearchLicense = (params: ReqPage) => {
|
||||||
|
@ -6,15 +6,15 @@ import { TimeoutEnum } from '@/enums/http-enum';
|
|||||||
import { deepCopy } from '@/utils/util';
|
import { deepCopy } from '@/utils/util';
|
||||||
import { Base64 } from 'js-base64';
|
import { Base64 } from 'js-base64';
|
||||||
|
|
||||||
export const SearchWebsites = (req: Website.WebSiteSearch) => {
|
export const searchWebsites = (req: Website.WebSiteSearch) => {
|
||||||
return http.post<ResPage<Website.WebsiteRes>>(`/websites/search`, req);
|
return http.post<ResPage<Website.WebsiteRes>>(`/websites/search`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ListWebsites = () => {
|
export const listWebsites = () => {
|
||||||
return http.get<Website.WebsiteDTO>(`/websites/list`);
|
return http.get<Website.WebsiteDTO>(`/websites/list`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateWebsite = (req: Website.WebSiteCreateReq) => {
|
export const createWebsite = (req: Website.WebSiteCreateReq) => {
|
||||||
let request = deepCopy(req) as Website.WebSiteCreateReq;
|
let request = deepCopy(req) as Website.WebSiteCreateReq;
|
||||||
if (request.ftpPassword) {
|
if (request.ftpPassword) {
|
||||||
request.ftpPassword = Base64.encode(request.ftpPassword);
|
request.ftpPassword = Base64.encode(request.ftpPassword);
|
||||||
@ -22,324 +22,316 @@ export const CreateWebsite = (req: Website.WebSiteCreateReq) => {
|
|||||||
return http.post<any>(`/websites`, request, TimeoutEnum.T_10M);
|
return http.post<any>(`/websites`, request, TimeoutEnum.T_10M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OpWebsite = (req: Website.WebSiteOp) => {
|
export const opWebsite = (req: Website.WebSiteOp) => {
|
||||||
return http.post<any>(`/websites/operate`, req);
|
return http.post<any>(`/websites/operate`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OpWebsiteLog = (req: Website.WebSiteOpLog) => {
|
export const opWebsiteLog = (req: Website.WebSiteOpLog) => {
|
||||||
return http.post<Website.WebSiteLog>(`/websites/log`, req);
|
return http.post<Website.WebSiteLog>(`/websites/log`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateWebsite = (req: Website.WebSiteUpdateReq) => {
|
export const updateWebsite = (req: Website.WebSiteUpdateReq) => {
|
||||||
return http.post<any>(`/websites/update`, req);
|
return http.post<any>(`/websites/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetWebsite = (id: number) => {
|
export const getWebsite = (id: number) => {
|
||||||
return http.get<Website.WebsiteDTO>(`/websites/${id}`);
|
return http.get<Website.WebsiteDTO>(`/websites/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetWebsiteOptions = (req: Website.OptionReq) => {
|
export const getWebsiteOptions = (req: Website.OptionReq) => {
|
||||||
return http.post<any>(`/websites/options`, req);
|
return http.post<any>(`/websites/options`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetWebsiteConfig = (id: number, type: string) => {
|
export const getWebsiteConfig = (id: number, type: string) => {
|
||||||
return http.get<File.File>(`/websites/${id}/config/${type}`);
|
return http.get<File.File>(`/websites/${id}/config/${type}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeleteWebsite = (req: Website.WebSiteDel) => {
|
export const deleteWebsite = (req: Website.WebSiteDel) => {
|
||||||
return http.post<any>(`/websites/del`, req);
|
return http.post<any>(`/websites/del`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ListDomains = (id: number) => {
|
export const listDomains = (id: number) => {
|
||||||
return http.get<Website.Domain[]>(`/websites/domains/${id}`);
|
return http.get<Website.Domain[]>(`/websites/domains/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeleteDomain = (req: Website.DomainDelete) => {
|
export const deleteDomain = (req: Website.DomainDelete) => {
|
||||||
return http.post<any>(`/websites/domains/del/`, req);
|
return http.post<any>(`/websites/domains/del/`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateDomain = (req: Website.DomainCreate) => {
|
export const createDomain = (req: Website.DomainCreate) => {
|
||||||
return http.post<any>(`/websites/domains`, req);
|
return http.post<any>(`/websites/domains`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateDomain = (req: Website.DomainUpdate) => {
|
export const updateDomain = (req: Website.DomainUpdate) => {
|
||||||
return http.post<any>(`/websites/domains/update`, req);
|
return http.post<any>(`/websites/domains/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetNginxConfig = (req: Website.NginxScopeReq) => {
|
export const getNginxConfig = (req: Website.NginxScopeReq) => {
|
||||||
return http.post<Website.NginxScopeConfig>(`/websites/config`, req);
|
return http.post<Website.NginxScopeConfig>(`/websites/config`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateNginxConfig = (req: Website.NginxConfigReq) => {
|
export const updateNginxConfig = (req: Website.NginxConfigReq) => {
|
||||||
return http.post<any>(`/websites/config/update`, req);
|
return http.post<any>(`/websites/config/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SearchDnsAccount = (req: ReqPage) => {
|
export const searchDnsAccount = (req: ReqPage) => {
|
||||||
return http.post<ResPage<Website.DnsAccount>>(`/websites/dns/search`, req);
|
return http.post<ResPage<Website.DnsAccount>>(`/websites/dns/search`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateDnsAccount = (req: Website.DnsAccountCreate) => {
|
export const createDnsAccount = (req: Website.DnsAccountCreate) => {
|
||||||
return http.post<any>(`/websites/dns`, req);
|
return http.post<any>(`/websites/dns`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateDnsAccount = (req: Website.DnsAccountUpdate) => {
|
export const updateDnsAccount = (req: Website.DnsAccountUpdate) => {
|
||||||
return http.post<any>(`/websites/dns/update`, req);
|
return http.post<any>(`/websites/dns/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeleteDnsAccount = (req: Website.DelReq) => {
|
export const deleteDnsAccount = (req: Website.DelReq) => {
|
||||||
return http.post<any>(`/websites/dns/del`, req);
|
return http.post<any>(`/websites/dns/del`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SearchAcmeAccount = (req: ReqPage) => {
|
export const searchAcmeAccount = (req: ReqPage) => {
|
||||||
return http.post<ResPage<Website.AcmeAccount>>(`/websites/acme/search`, req);
|
return http.post<ResPage<Website.AcmeAccount>>(`/websites/acme/search`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateAcmeAccount = (req: Website.AcmeAccountCreate) => {
|
export const createAcmeAccount = (req: Website.AcmeAccountCreate) => {
|
||||||
return http.post<Website.AcmeAccount>(`/websites/acme`, req, TimeoutEnum.T_10M);
|
return http.post<Website.AcmeAccount>(`/websites/acme`, req, TimeoutEnum.T_10M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeleteAcmeAccount = (req: Website.DelReq) => {
|
export const deleteAcmeAccount = (req: Website.DelReq) => {
|
||||||
return http.post<any>(`/websites/acme/del`, req);
|
return http.post<any>(`/websites/acme/del`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SearchSSL = (req: ReqPage) => {
|
export const searchSSL = (req: ReqPage) => {
|
||||||
return http.post<ResPage<Website.SSLDTO>>(`/websites/ssl/search`, req);
|
return http.post<ResPage<Website.SSLDTO>>(`/websites/ssl/search`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ListSSL = (req: Website.SSLReq) => {
|
export const listSSL = (req: Website.SSLReq) => {
|
||||||
return http.post<Website.SSLDTO[]>(`/websites/ssl/search`, req);
|
return http.post<Website.SSLDTO[]>(`/websites/ssl/search`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateSSL = (req: Website.SSLCreate) => {
|
export const createSSL = (req: Website.SSLCreate) => {
|
||||||
return http.post<Website.SSLCreate>(`/websites/ssl`, req, TimeoutEnum.T_10M);
|
return http.post<Website.SSLCreate>(`/websites/ssl`, req, TimeoutEnum.T_10M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeleteSSL = (req: Website.DelReq) => {
|
export const deleteSSL = (req: Website.DelReq) => {
|
||||||
return http.post<any>(`/websites/ssl/del`, req);
|
return http.post<any>(`/websites/ssl/del`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetWebsiteSSL = (websiteId: number) => {
|
export const getSSL = (id: number) => {
|
||||||
return http.get<Website.SSL>(`/websites/ssl/website/${websiteId}`);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const GetSSL = (id: number) => {
|
|
||||||
return http.get<Website.SSL>(`/websites/ssl/${id}`);
|
return http.get<Website.SSL>(`/websites/ssl/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ApplySSL = (req: Website.SSLApply) => {
|
export const obtainSSL = (req: Website.SSLObtain) => {
|
||||||
return http.post<Website.SSLApply>(`/websites/ssl/apply`, req);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const ObtainSSL = (req: Website.SSLObtain) => {
|
|
||||||
return http.post<any>(`/websites/ssl/obtain`, req);
|
return http.post<any>(`/websites/ssl/obtain`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateSSL = (req: Website.SSLUpdate) => {
|
export const updateSSL = (req: Website.SSLUpdate) => {
|
||||||
return http.post<any>(`/websites/ssl/update`, req);
|
return http.post<any>(`/websites/ssl/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetDnsResolve = (req: Website.DNSResolveReq) => {
|
export const getDnsResolve = (req: Website.DNSResolveReq) => {
|
||||||
return http.post<Website.DNSResolve[]>(`/websites/ssl/resolve`, req, TimeoutEnum.T_5M);
|
return http.post<Website.DNSResolve[]>(`/websites/ssl/resolve`, req, TimeoutEnum.T_5M);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetHTTPSConfig = (id: number) => {
|
export const getHTTPSConfig = (id: number) => {
|
||||||
return http.get<Website.HTTPSConfig>(`/websites/${id}/https`);
|
return http.get<Website.HTTPSConfig>(`/websites/${id}/https`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateHTTPSConfig = (req: Website.HTTPSReq) => {
|
export const updateHTTPSConfig = (req: Website.HTTPSReq) => {
|
||||||
return http.post<Website.HTTPSConfig>(`/websites/${req.websiteId}/https`, req);
|
return http.post<Website.HTTPSConfig>(`/websites/${req.websiteId}/https`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PreCheck = (req: Website.CheckReq) => {
|
export const preCheck = (req: Website.CheckReq) => {
|
||||||
return http.post<Website.CheckRes[]>(`/websites/check`, req);
|
return http.post<Website.CheckRes[]>(`/websites/check`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateNginxFile = (req: Website.NginxUpdate) => {
|
export const updateNginxFile = (req: Website.NginxUpdate) => {
|
||||||
return http.post<any>(`/websites/nginx/update`, req);
|
return http.post<any>(`/websites/nginx/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ChangeDefaultServer = (req: Website.DefaultServerUpdate) => {
|
export const changeDefaultServer = (req: Website.DefaultServerUpdate) => {
|
||||||
return http.post<any>(`/websites/default/server`, req);
|
return http.post<any>(`/websites/default/server`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetRewriteConfig = (req: Website.RewriteReq) => {
|
export const getRewriteConfig = (req: Website.RewriteReq) => {
|
||||||
return http.post<Website.RewriteRes>(`/websites/rewrite`, req);
|
return http.post<Website.RewriteRes>(`/websites/rewrite`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateRewriteConfig = (req: Website.RewriteUpdate) => {
|
export const updateRewriteConfig = (req: Website.RewriteUpdate) => {
|
||||||
return http.post<any>(`/websites/rewrite/update`, req);
|
return http.post<any>(`/websites/rewrite/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateWebsiteDir = (req: Website.DirUpdate) => {
|
export const updateWebsiteDir = (req: Website.DirUpdate) => {
|
||||||
return http.post<any>(`/websites/dir/update`, req);
|
return http.post<any>(`/websites/dir/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateWebsiteDirPermission = (req: Website.DirPermissionUpdate) => {
|
export const updateWebsiteDirPermission = (req: Website.DirPermissionUpdate) => {
|
||||||
return http.post<any>(`/websites/dir/permission`, req);
|
return http.post<any>(`/websites/dir/permission`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetProxyConfig = (req: Website.ProxyReq) => {
|
export const getProxyConfig = (req: Website.ProxyReq) => {
|
||||||
return http.post<Website.ProxyConfig[]>(`/websites/proxies`, req);
|
return http.post<Website.ProxyConfig[]>(`/websites/proxies`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OperateProxyConfig = (req: Website.ProxyReq) => {
|
export const operateProxyConfig = (req: Website.ProxyReq) => {
|
||||||
return http.post<any>(`/websites/proxies/update`, req);
|
return http.post<any>(`/websites/proxies/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateProxyConfigFile = (req: Website.ProxyFileUpdate) => {
|
export const updateProxyConfigFile = (req: Website.ProxyFileUpdate) => {
|
||||||
return http.post<any>(`/websites/proxies/file`, req);
|
return http.post<any>(`/websites/proxies/file`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ClearProxtCache = (req: Website.WebsiteReq) => {
|
export const clearProxyCache = (req: Website.WebsiteReq) => {
|
||||||
return http.post(`/websites/proxy/clear`, req);
|
return http.post(`/websites/proxy/clear`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAuthConfig = (req: Website.AuthReq) => {
|
export const getAuthConfig = (req: Website.AuthReq) => {
|
||||||
return http.post<Website.AuthConfig>(`/websites/auths`, req);
|
return http.post<Website.AuthConfig>(`/websites/auths`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OperateAuthConfig = (req: Website.NginxAuthConfig) => {
|
export const operateAuthConfig = (req: Website.NginxAuthConfig) => {
|
||||||
return http.post<any>(`/websites/auths/update`, req);
|
return http.post<any>(`/websites/auths/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetPathAuthConfig = (req: Website.AuthReq) => {
|
export const getPathAuthConfig = (req: Website.AuthReq) => {
|
||||||
return http.post<Website.NginxPathAuthConfig[]>(`/websites/auths/path`, req);
|
return http.post<Website.NginxPathAuthConfig[]>(`/websites/auths/path`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OperatePathAuthConfig = (req: Website.NginxPathAuthConfig) => {
|
export const operatePathAuthConfig = (req: Website.NginxPathAuthConfig) => {
|
||||||
return http.post(`/websites/auths/path/update`, req);
|
return http.post(`/websites/auths/path/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetAntiLeech = (req: Website.LeechReq) => {
|
export const getAntiLeech = (req: Website.LeechReq) => {
|
||||||
return http.post<Website.LeechConfig>(`/websites/leech`, req);
|
return http.post<Website.LeechConfig>(`/websites/leech`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateAntiLeech = (req: Website.LeechConfig) => {
|
export const updateAntiLeech = (req: Website.LeechConfig) => {
|
||||||
return http.post<any>(`/websites/leech/update`, req);
|
return http.post<any>(`/websites/leech/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetRedirectConfig = (req: Website.WebsiteReq) => {
|
export const getRedirectConfig = (req: Website.WebsiteReq) => {
|
||||||
return http.post<Website.RedirectConfig[]>(`/websites/redirect`, req);
|
return http.post<Website.RedirectConfig[]>(`/websites/redirect`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OperateRedirectConfig = (req: Website.WebsiteReq) => {
|
export const operateRedirectConfig = (req: Website.WebsiteReq) => {
|
||||||
return http.post<any>(`/websites/redirect/update`, req);
|
return http.post<any>(`/websites/redirect/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateRedirectConfigFile = (req: Website.RedirectFileUpdate) => {
|
export const updateRedirectConfigFile = (req: Website.RedirectFileUpdate) => {
|
||||||
return http.post<any>(`/websites/redirect/file`, req);
|
return http.post<any>(`/websites/redirect/file`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ChangePHPVersion = (req: Website.PHPVersionChange) => {
|
export const changePHPVersion = (req: Website.PHPVersionChange) => {
|
||||||
return http.post<any>(`/websites/php/version`, req);
|
return http.post<any>(`/websites/php/version`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetDirConfig = (req: Website.ProxyReq) => {
|
export const getDirConfig = (req: Website.ProxyReq) => {
|
||||||
return http.post<Website.DirConfig>(`/websites/dir`, req);
|
return http.post<Website.DirConfig>(`/websites/dir`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UploadSSL = (req: Website.SSLUpload) => {
|
export const uploadSSL = (req: Website.SSLUpload) => {
|
||||||
return http.post<any>(`/websites/ssl/upload`, req);
|
return http.post<any>(`/websites/ssl/upload`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SearchCAs = (req: ReqPage) => {
|
export const searchCAs = (req: ReqPage) => {
|
||||||
return http.post<ResPage<Website.CA>>(`/websites/ca/search`, req);
|
return http.post<ResPage<Website.CA>>(`/websites/ca/search`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateCA = (req: Website.CACreate) => {
|
export const createCA = (req: Website.CACreate) => {
|
||||||
return http.post<Website.CA>(`/websites/ca`, req);
|
return http.post<Website.CA>(`/websites/ca`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ObtainSSLByCA = (req: Website.SSLObtainByCA) => {
|
export const obtainSSLByCA = (req: Website.SSLObtainByCA) => {
|
||||||
return http.post<any>(`/websites/ca/obtain`, req);
|
return http.post<any>(`/websites/ca/obtain`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DeleteCA = (req: Website.DelReq) => {
|
export const deleteCA = (req: Website.DelReq) => {
|
||||||
return http.post<any>(`/websites/ca/del`, req);
|
return http.post<any>(`/websites/ca/del`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const RenewSSLByCA = (req: Website.RenewSSLByCA) => {
|
export const renewSSLByCA = (req: Website.RenewSSLByCA) => {
|
||||||
return http.post<any>(`/websites/ca/renew`, req);
|
return http.post<any>(`/websites/ca/renew`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DownloadFile = (params: Website.SSLDownload) => {
|
export const downloadFile = (params: Website.SSLDownload) => {
|
||||||
return http.download<BlobPart>(`/websites/ssl/download`, params, {
|
return http.download<BlobPart>(`/websites/ssl/download`, params, {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
timeout: TimeoutEnum.T_40S,
|
timeout: TimeoutEnum.T_40S,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetCA = (id: number) => {
|
export const getCA = (id: number) => {
|
||||||
return http.get<Website.CADTO>(`/websites/ca/${id}`);
|
return http.get<Website.CADTO>(`/websites/ca/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetDefaultHtml = (type: string) => {
|
export const getDefaultHtml = (type: string) => {
|
||||||
return http.get<Website.WebsiteHtml>(`/websites/default/html/${type}`);
|
return http.get<Website.WebsiteHtml>(`/websites/default/html/${type}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateDefaultHtml = (req: Website.WebsiteHtmlUpdate) => {
|
export const updateDefaultHtml = (req: Website.WebsiteHtmlUpdate) => {
|
||||||
return http.post(`/websites/default/html/update`, req);
|
return http.post(`/websites/default/html/update`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DownloadCAFile = (params: Website.SSLDownload) => {
|
export const downloadCAFile = (params: Website.SSLDownload) => {
|
||||||
return http.download<BlobPart>(`/websites/ca/download`, params, {
|
return http.download<BlobPart>(`/websites/ca/download`, params, {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
timeout: TimeoutEnum.T_40S,
|
timeout: TimeoutEnum.T_40S,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetLoadBalances = (id: number) => {
|
export const getLoadBalances = (id: number) => {
|
||||||
return http.get<Website.NginxUpstream[]>(`/websites/${id}/lbs`);
|
return http.get<Website.NginxUpstream[]>(`/websites/${id}/lbs`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CreateLoadBalance = (req: Website.LoadBalanceReq) => {
|
export const createLoadBalance = (req: Website.LoadBalanceReq) => {
|
||||||
return http.post(`/websites/lbs/create`, req);
|
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);
|
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);
|
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);
|
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);
|
return http.post(`/websites/proxy/config`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetCacheConfig = (id: number) => {
|
export const getCacheConfig = (id: number) => {
|
||||||
return http.get<Website.WebsiteCacheConfig>(`/websites/proxy/config/${id}`);
|
return http.get<Website.WebsiteCacheConfig>(`/websites/proxy/config/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UpdateRealIPConfig = (req: Website.WebsiteRealIPConfig) => {
|
export const updateRealIPConfig = (req: Website.WebsiteRealIPConfig) => {
|
||||||
return http.post(`/websites/realip/config`, req);
|
return http.post(`/websites/realip/config`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetRealIPConfig = (id: number) => {
|
export const getRealIPConfig = (id: number) => {
|
||||||
return http.get<Website.WebsiteRealIPConfig>(`/websites/realip/config/${id}`);
|
return http.get<Website.WebsiteRealIPConfig>(`/websites/realip/config/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetWebsiteResource = (id: number) => {
|
export const getWebsiteResource = (id: number) => {
|
||||||
return http.get<Website.WebsiteResource[]>(`/websites/resource/${id}`);
|
return http.get<Website.WebsiteResource[]>(`/websites/resource/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const GetWebsiteDatabase = () => {
|
export const getWebsiteDatabase = () => {
|
||||||
return http.get<Website.WebsiteDatabase[]>(`/websites/databases`);
|
return http.get<Website.WebsiteDatabase[]>(`/websites/databases`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ChangeDatabase = (req: Website.ChangeDatabase) => {
|
export const changeDatabase = (req: Website.ChangeDatabase) => {
|
||||||
return http.post(`/websites/databases`, req);
|
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);
|
return http.post(`/websites/rewrite/custom`, req);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ListCustomRewrite = () => {
|
export const listCustomRewrite = () => {
|
||||||
return http.get<string[]>(`/websites/rewrite/custom`);
|
return http.get<string[]>(`/websites/rewrite/custom`);
|
||||||
};
|
};
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { CheckAppInstalled, InstalledOp } from '@/api/modules/app';
|
import { checkAppInstalled, installedOp } from '@/api/modules/app';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import Status from '@/components/status/index.vue';
|
import Status from '@/components/status/index.vue';
|
||||||
import { ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
@ -117,7 +117,7 @@ const setting = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onCheck = async (key: any, name: any) => {
|
const onCheck = async (key: any, name: any) => {
|
||||||
await CheckAppInstalled(key, name)
|
await checkAppInstalled(key, name)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
data.value = res.data;
|
data.value = res.data;
|
||||||
em('isExist', res.data);
|
em('isExist', res.data);
|
||||||
@ -147,7 +147,7 @@ const onOperate = async (operation: string) => {
|
|||||||
em('update:maskShow', true);
|
em('update:maskShow', true);
|
||||||
em('update:loading', true);
|
em('update:loading', true);
|
||||||
em('before');
|
em('before');
|
||||||
InstalledOp(operateReq)
|
installedOp(operateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
em('update:loading', false);
|
em('update:loading', false);
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { CreateFile, GetFilesList } from '@/api/modules/files';
|
import { createFile, getFilesList } from '@/api/modules/files';
|
||||||
import { Folder, HomeFilled, Close } from '@element-plus/icons-vue';
|
import { Folder, HomeFilled, Close } from '@element-plus/icons-vue';
|
||||||
import BreadCrumbs from '@/components/bread-crumbs/index.vue';
|
import BreadCrumbs from '@/components/bread-crumbs/index.vue';
|
||||||
import BreadCrumbItem from '@/components/bread-crumbs/bread-crumbs-item.vue';
|
import BreadCrumbItem from '@/components/bread-crumbs/bread-crumbs-item.vue';
|
||||||
@ -239,7 +239,7 @@ const jump = async (index: number) => {
|
|||||||
const search = async (req: File.ReqFile) => {
|
const search = async (req: File.ReqFile) => {
|
||||||
req.dir = props.dir;
|
req.dir = props.dir;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await GetFilesList(req)
|
await getFilesList(req)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
data.value = res.data.items || [];
|
data.value = res.data.items || [];
|
||||||
req.path = res.data.path;
|
req.path = res.data.path;
|
||||||
@ -313,7 +313,7 @@ const createFolder = async (row: any) => {
|
|||||||
let addItem = {};
|
let addItem = {};
|
||||||
Object.assign(addItem, addForm);
|
Object.assign(addItem, addForm);
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
CreateFile(addItem as File.FileCreate)
|
createFile(addItem as File.FileCreate)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
row.isCreate = false;
|
row.isCreate = false;
|
||||||
disBtn.value = false;
|
disBtn.value = false;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import type { ElForm } from 'element-plus';
|
import type { ElForm } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { GetGroupList } from '@/api/modules/group';
|
import { getGroupList } from '@/api/modules/group';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
interface DialogProps {
|
interface DialogProps {
|
||||||
@ -56,7 +56,7 @@ const rules = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const loadGroups = async (groupName: string) => {
|
const loadGroups = async (groupName: string) => {
|
||||||
const res = await GetGroupList(dialogData.value.groupType);
|
const res = await getGroupList(dialogData.value.groupType);
|
||||||
groupList.value = res.data;
|
groupList.value = res.data;
|
||||||
for (const group of groupList.value) {
|
for (const group of groupList.value) {
|
||||||
if (group.name === groupName) {
|
if (group.name === groupName) {
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
v-if="!row.edit"
|
v-if="!row.edit"
|
||||||
:disabled="row.isDefault"
|
:disabled="row.isDefault"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="deleteGroup($index)"
|
@click="removeGroup($index)"
|
||||||
>
|
>
|
||||||
{{ $t('commons.button.delete') }}
|
{{ $t('commons.button.delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { CreateGroup, DeleteGroup, GetGroupList, UpdateGroup } from '@/api/modules/group';
|
import { createGroup, deleteGroup, getGroupList, updateGroup } from '@/api/modules/group';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { Group } from '@/api/interface/group';
|
import { Group } from '@/api/interface/group';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
@ -95,7 +95,7 @@ const acceptParams = (params: DialogProps): void => {
|
|||||||
const emit = defineEmits<{ (e: 'search'): void }>();
|
const emit = defineEmits<{ (e: 'search'): void }>();
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
GetGroupList(type.value).then((res) => {
|
getGroupList(type.value).then((res) => {
|
||||||
data.value = res.data || [];
|
data.value = res.data || [];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -108,12 +108,12 @@ const saveGroup = async (formEl: FormInstance, group: Group.GroupInfo) => {
|
|||||||
}
|
}
|
||||||
group.type = type.value;
|
group.type = type.value;
|
||||||
if (group.id == 0) {
|
if (group.id == 0) {
|
||||||
CreateGroup(group).then(() => {
|
createGroup(group).then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
search();
|
search();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
UpdateGroup(group).then(() => {
|
updateGroup(group).then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
search();
|
search();
|
||||||
});
|
});
|
||||||
@ -124,7 +124,7 @@ const saveGroup = async (formEl: FormInstance, group: Group.GroupInfo) => {
|
|||||||
const setDefault = (group: Group.GroupInfo) => {
|
const setDefault = (group: Group.GroupInfo) => {
|
||||||
group.isDefault = true;
|
group.isDefault = true;
|
||||||
group.type = type.value;
|
group.type = type.value;
|
||||||
UpdateGroup(group).then(() => {
|
updateGroup(group).then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
search();
|
search();
|
||||||
});
|
});
|
||||||
@ -149,11 +149,11 @@ const openCreate = () => {
|
|||||||
data.value.unshift(g);
|
data.value.unshift(g);
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteGroup = (index: number) => {
|
const removeGroup = (index: number) => {
|
||||||
const group = data.value[index];
|
const group = data.value[index];
|
||||||
|
|
||||||
if (group.id > 0) {
|
if (group.id > 0) {
|
||||||
DeleteGroup(group.id).then(() => {
|
deleteGroup(group.id).then(() => {
|
||||||
data.value.splice(index, 1);
|
data.value.splice(index, 1);
|
||||||
MsgSuccess(i18n.global.t('commons.msg.deleteSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.deleteSuccess'));
|
||||||
});
|
});
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { UploadFileData } from '@/api/modules/setting';
|
import { uploadFileData } from '@/api/modules/setting';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile, genFileId } from 'element-plus';
|
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile, genFileId } from 'element-plus';
|
||||||
import { useTheme } from '@/global/use-theme';
|
import { useTheme } from '@/global/use-theme';
|
||||||
@ -89,7 +89,7 @@ const submit = async () => {
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file.raw);
|
formData.append('file', file.raw);
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await UploadFileData(formData)
|
await uploadFileData(formData)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
globalStore.isProductPro = true;
|
globalStore.isProductPro = true;
|
||||||
const xpackRes = await getXpackSetting();
|
const xpackRes = await getXpackSetting();
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, onMounted, onUnmounted, reactive, ref } from 'vue';
|
import { nextTick, onMounted, onUnmounted, reactive, ref } from 'vue';
|
||||||
import { downloadFile } from '@/utils/util';
|
import { downloadFile } from '@/utils/util';
|
||||||
import { ReadByLine } from '@/api/modules/files';
|
import { readByLine } from '@/api/modules/files';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import bus from '@/global/bus';
|
import bus from '@/global/bus';
|
||||||
import hightlight from '@/components/hightlight/index.vue';
|
import hightlight from '@/components/hightlight/index.vue';
|
||||||
@ -188,7 +188,7 @@ const getContent = async (pre: boolean) => {
|
|||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
emit('update:isReading', true);
|
emit('update:isReading', true);
|
||||||
|
|
||||||
const res = await ReadByLine(readReq);
|
const res = await readByLine(readReq);
|
||||||
logPath.value = res.data.path;
|
logPath.value = res.data.path;
|
||||||
firstLoading.value = false;
|
firstLoading.value = false;
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ import { computeSize, newUUID } from '@/utils/util';
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile, genFileId } from 'element-plus';
|
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile, genFileId } from 'element-plus';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { BatchDeleteFile, CheckFile, ChunkUploadFileData, GetUploadList } from '@/api/modules/files';
|
import { batchDeleteFile, checkFile, chunkUploadFileData, getUploadList } from '@/api/modules/files';
|
||||||
import { loadBaseDir } from '@/api/modules/setting';
|
import { loadBaseDir } from '@/api/modules/setting';
|
||||||
import { MsgError, MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
import { handleRecoverByUpload } from '@/api/modules/backup';
|
import { handleRecoverByUpload } from '@/api/modules/backup';
|
||||||
@ -206,7 +206,7 @@ const search = async () => {
|
|||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
path: baseDir.value,
|
path: baseDir.value,
|
||||||
};
|
};
|
||||||
const res = await GetUploadList(params);
|
const res = await getUploadList(params);
|
||||||
data.value = res.data.items || [];
|
data.value = res.data.items || [];
|
||||||
paginationConfig.total = res.data.total;
|
paginationConfig.total = res.data.total;
|
||||||
};
|
};
|
||||||
@ -304,7 +304,7 @@ const onSubmit = async () => {
|
|||||||
MsgError(i18n.global.t('commons.msg.fileNameErr'));
|
MsgError(i18n.global.t('commons.msg.fileNameErr'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const res = await CheckFile(baseDir.value + file.raw.name);
|
const res = await checkFile(baseDir.value + file.raw.name);
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
MsgError(i18n.global.t('commons.msg.fileExist'));
|
MsgError(i18n.global.t('commons.msg.fileExist'));
|
||||||
return;
|
return;
|
||||||
@ -337,7 +337,7 @@ const submitUpload = async (file: any) => {
|
|||||||
formData.append('chunkCount', chunkCount.toString());
|
formData.append('chunkCount', chunkCount.toString());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await ChunkUploadFileData(formData, {
|
await chunkUploadFileData(formData, {
|
||||||
onUploadProgress: (progressEvent) => {
|
onUploadProgress: (progressEvent) => {
|
||||||
const progress = Math.round(
|
const progress = Math.round(
|
||||||
((uploadedChunkCount + progressEvent.loaded / progressEvent.total) * 100) / chunkCount,
|
((uploadedChunkCount + progressEvent.loaded / progressEvent.total) * 100) / chunkCount,
|
||||||
@ -379,7 +379,7 @@ const onBatchDelete = async (row: File.File | null) => {
|
|||||||
i18n.global.t('commons.button.import'),
|
i18n.global.t('commons.button.import'),
|
||||||
i18n.global.t('commons.button.delete'),
|
i18n.global.t('commons.button.delete'),
|
||||||
]),
|
]),
|
||||||
api: BatchDeleteFile,
|
api: batchDeleteFile,
|
||||||
params: { paths: files, isDir: false },
|
params: { paths: files, isDir: false },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -51,6 +51,7 @@ const GlobalStore = defineStore({
|
|||||||
(state.themeConfig.theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches),
|
(state.themeConfig.theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches),
|
||||||
isDarkGoldTheme: (state) => state.themeConfig.primary === '#F0BE96' && state.isProductPro,
|
isDarkGoldTheme: (state) => state.themeConfig.primary === '#F0BE96' && state.isProductPro,
|
||||||
docsUrl: (state) => (state.isIntl ? 'https://docs.1panel.hk' : 'https://1panel.cn/docs'),
|
docsUrl: (state) => (state.isIntl ? 'https://docs.1panel.hk' : 'https://1panel.cn/docs'),
|
||||||
|
isMaster: (state) => state.currentNode === 'local',
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
setOpenMenuTabs(openMenuTabs: boolean) {
|
setOpenMenuTabs(openMenuTabs: boolean) {
|
||||||
|
@ -182,11 +182,11 @@
|
|||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { onMounted, reactive, ref, computed } from 'vue';
|
import { onMounted, reactive, ref, computed } from 'vue';
|
||||||
import {
|
import {
|
||||||
GetAppTags,
|
getAppTags,
|
||||||
SearchApp,
|
searchApp,
|
||||||
SyncApp,
|
syncApp,
|
||||||
SyncCutomAppStore,
|
syncCutomAppStore,
|
||||||
SyncLocalApp,
|
syncLocalApp,
|
||||||
getCurrentNodeCustomAppConfig,
|
getCurrentNodeCustomAppConfig,
|
||||||
} from '@/api/modules/app';
|
} from '@/api/modules/app';
|
||||||
import Install from '../detail/install/index.vue';
|
import Install from '../detail/install/index.vue';
|
||||||
@ -243,7 +243,7 @@ const search = async (req: App.AppReq) => {
|
|||||||
req.pageSize = paginationConfig.pageSize;
|
req.pageSize = paginationConfig.pageSize;
|
||||||
req.page = paginationConfig.currentPage;
|
req.page = paginationConfig.currentPage;
|
||||||
localStorage.setItem('app-page-size', req.pageSize + '');
|
localStorage.setItem('app-page-size', req.pageSize + '');
|
||||||
await SearchApp(req)
|
await searchApp(req)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
apps.value = res.data.items;
|
apps.value = res.data.items;
|
||||||
paginationConfig.total = res.data.total;
|
paginationConfig.total = res.data.total;
|
||||||
@ -251,7 +251,7 @@ const search = async (req: App.AppReq) => {
|
|||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
GetAppTags().then((res) => {
|
getAppTags().then((res) => {
|
||||||
tags.value = res.data;
|
tags.value = res.data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -291,9 +291,9 @@ const sync = async () => {
|
|||||||
try {
|
try {
|
||||||
let res;
|
let res;
|
||||||
if (isProductPro.value && syncCustomAppstore.value) {
|
if (isProductPro.value && syncCustomAppstore.value) {
|
||||||
res = await SyncCutomAppStore(syncReq);
|
res = await syncCutomAppStore(syncReq);
|
||||||
} else {
|
} else {
|
||||||
res = await SyncApp(syncReq);
|
res = await syncApp(syncReq);
|
||||||
}
|
}
|
||||||
if (res.message != '') {
|
if (res.message != '') {
|
||||||
MsgSuccess(res.message);
|
MsgSuccess(res.message);
|
||||||
@ -313,7 +313,7 @@ const syncLocal = () => {
|
|||||||
taskID: taskID,
|
taskID: taskID,
|
||||||
};
|
};
|
||||||
syncing.value = true;
|
syncing.value = true;
|
||||||
SyncLocalApp(syncReq)
|
syncLocalApp(syncReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
openTaskLog(taskID);
|
openTaskLog(taskID);
|
||||||
canUpdate.value = false;
|
canUpdate.value = false;
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GetApp, GetAppDetail } from '@/api/modules/app';
|
import { getAppByKey, getAppDetail } from '@/api/modules/app';
|
||||||
import MdEditor from 'md-editor-v3';
|
import MdEditor from 'md-editor-v3';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import Install from './install/index.vue';
|
import Install from './install/index.vue';
|
||||||
@ -105,7 +105,7 @@ const handleClose = () => {
|
|||||||
const getApp = async () => {
|
const getApp = async () => {
|
||||||
loadingApp.value = true;
|
loadingApp.value = true;
|
||||||
try {
|
try {
|
||||||
const res = await GetApp(appKey.value);
|
const res = await getAppByKey(appKey.value);
|
||||||
app.value = res.data;
|
app.value = res.data;
|
||||||
app.value.icon = 'data:image/png;base64,' + res.data.icon;
|
app.value.icon = 'data:image/png;base64,' + res.data.icon;
|
||||||
version.value = app.value.versions[0];
|
version.value = app.value.versions[0];
|
||||||
@ -118,7 +118,7 @@ const getApp = async () => {
|
|||||||
const getDetail = async (id: number, version: string) => {
|
const getDetail = async (id: number, version: string) => {
|
||||||
loadingDetail.value = true;
|
loadingDetail.value = true;
|
||||||
try {
|
try {
|
||||||
const res = await GetAppDetail(id, version, 'app');
|
const res = await getAppDetail(id, version, 'app');
|
||||||
appDetail.value = res.data;
|
appDetail.value = res.data;
|
||||||
if (appDetail.value.architectures != '') {
|
if (appDetail.value.architectures != '') {
|
||||||
architectures.value = appDetail.value.architectures.split(',');
|
architectures.value = appDetail.value.architectures.split(',');
|
||||||
|
@ -121,7 +121,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup name="appInstall">
|
<script lang="ts" setup name="appInstall">
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { GetApp, GetAppDetail, InstallApp } from '@/api/modules/app';
|
import { getAppByKey, getAppDetail, installApp } from '@/api/modules/app';
|
||||||
import { Rules, checkNumberRange } from '@/global/form-rules';
|
import { Rules, checkNumberRange } from '@/global/form-rules';
|
||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
@ -217,7 +217,7 @@ const acceptParams = async (props: InstallRrops) => {
|
|||||||
if (props.app.versions != undefined) {
|
if (props.app.versions != undefined) {
|
||||||
installData.value = props;
|
installData.value = props;
|
||||||
} else {
|
} else {
|
||||||
const res = await GetApp(props.app.key);
|
const res = await getAppByKey(props.app.key);
|
||||||
installData.value.app = res.data;
|
installData.value.app = res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,17 +225,17 @@ const acceptParams = async (props: InstallRrops) => {
|
|||||||
appVersions.value = app.versions;
|
appVersions.value = app.versions;
|
||||||
if (appVersions.value.length > 0) {
|
if (appVersions.value.length > 0) {
|
||||||
req.version = appVersions.value[0];
|
req.version = appVersions.value[0];
|
||||||
getAppDetail(appVersions.value[0]);
|
getDetail(appVersions.value[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
req.name = props.app.key;
|
req.name = props.app.key;
|
||||||
open.value = true;
|
open.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAppDetail = async (version: string) => {
|
const getDetail = async (version: string) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
const res = await GetAppDetail(installData.value.app.id, version, 'app');
|
const res = await getAppDetail(installData.value.app.id, version, 'app');
|
||||||
req.appDetailId = res.data.id;
|
req.appDetailId = res.data.id;
|
||||||
req.dockerCompose = res.data.dockerCompose;
|
req.dockerCompose = res.data.dockerCompose;
|
||||||
isHostMode.value = res.data.hostMode;
|
isHostMode.value = res.data.hostMode;
|
||||||
@ -286,7 +286,7 @@ const install = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
const taskID = newUUID();
|
const taskID = newUUID();
|
||||||
req.taskID = taskID;
|
req.taskID = taskID;
|
||||||
InstallApp(req)
|
installApp(req)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
handleClose();
|
handleClose();
|
||||||
openTaskLog(taskID);
|
openTaskLog(taskID);
|
||||||
|
@ -110,11 +110,11 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, reactive, ref } from 'vue';
|
import { computed, onMounted, reactive, ref } from 'vue';
|
||||||
import { getRandomStr } from '@/utils/util';
|
import { getRandomStr } from '@/utils/util';
|
||||||
import { GetAppService } from '@/api/modules/app';
|
import { getAppService } from '@/api/modules/app';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { getDBName } from '@/utils/util';
|
import { getDBName } from '@/utils/util';
|
||||||
import { GetPathByType } from '@/api/modules/files';
|
import { getPathByType } from '@/api/modules/files';
|
||||||
|
|
||||||
interface ParamObj extends App.FromField {
|
interface ParamObj extends App.FromField {
|
||||||
services: App.AppService[];
|
services: App.AppService[];
|
||||||
@ -188,7 +188,7 @@ const handleParams = () => {
|
|||||||
form[p.envKey] = p.default;
|
form[p.envKey] = p.default;
|
||||||
}
|
}
|
||||||
if (p.type == 'text' && p.envKey == 'WEBSITE_DIR') {
|
if (p.type == 'text' && p.envKey == 'WEBSITE_DIR') {
|
||||||
GetPathByType('websiteDir').then((res) => {
|
getPathByType('websiteDir').then((res) => {
|
||||||
form[p.envKey] = res.data;
|
form[p.envKey] = res.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ const handleParams = () => {
|
|||||||
|
|
||||||
const getServices = async (childKey: string, key: string | undefined, pObj: ParamObj | undefined) => {
|
const getServices = async (childKey: string, key: string | undefined, pObj: ParamObj | undefined) => {
|
||||||
pObj.services = [];
|
pObj.services = [];
|
||||||
await GetAppService(key).then((res) => {
|
await getAppService(key).then((res) => {
|
||||||
pObj.services = res.data || [];
|
pObj.services = res.data || [];
|
||||||
form[childKey] = '';
|
form[childKey] = '';
|
||||||
if (res.data && res.data.length > 0) {
|
if (res.data && res.data.length > 0) {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { SearchAppInstalled } from '@/api/modules/app';
|
import { searchAppInstalled } from '@/api/modules/app';
|
||||||
import bus from '@/global/bus';
|
import bus from '@/global/bus';
|
||||||
let showButton = ref(false);
|
let showButton = ref(false);
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ const buttons = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
SearchAppInstalled({ update: true, page: 1, pageSize: 100 })
|
searchAppInstalled({ update: true, page: 1, pageSize: 100 })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.items) {
|
if (res.data.items) {
|
||||||
buttons[2].count = res.data.items.length;
|
buttons[2].count = res.data.items.length;
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { InstalledOp } from '@/api/modules/app';
|
import { installedOp } from '@/api/modules/app';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
@ -118,7 +118,7 @@ const onConfirm = () => {
|
|||||||
forceDelete: true,
|
forceDelete: true,
|
||||||
deleteDB: true,
|
deleteDB: true,
|
||||||
};
|
};
|
||||||
InstalledOp(deleteReq).then(() => {
|
installedOp(deleteReq).then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
open.value = false;
|
open.value = false;
|
||||||
em('close', open);
|
em('close', open);
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { onBeforeUnmount, ref } from 'vue';
|
import { onBeforeUnmount, ref } from 'vue';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { InstalledOp } from '@/api/modules/app';
|
import { installedOp } from '@/api/modules/app';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import bus from '@/global/bus';
|
import bus from '@/global/bus';
|
||||||
import TaskLog from '@/components/task-log/index.vue';
|
import TaskLog from '@/components/task-log/index.vue';
|
||||||
@ -97,7 +97,7 @@ const acceptParams = async (app: App.AppInstallDto) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
InstalledOp(deleteReq.value).then(() => {
|
installedOp(deleteReq.value).then(() => {
|
||||||
handleClose();
|
handleClose();
|
||||||
taskLogRef.value.openWithTaskID(deleteReq.value.taskID);
|
taskLogRef.value.openWithTaskID(deleteReq.value.taskID);
|
||||||
bus.emit('update', true);
|
bus.emit('update', true);
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { GetAppInstallParams, UpdateAppInstallParams, UpdateInstallConfig } from '@/api/modules/app';
|
import { getAppInstallParams, updateAppInstallParams, updateInstallConfig } from '@/api/modules/app';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { Rules, checkNumberRange } from '@/global/form-rules';
|
import { Rules, checkNumberRange } from '@/global/form-rules';
|
||||||
@ -185,7 +185,7 @@ const editParam = () => {
|
|||||||
const get = async () => {
|
const get = async () => {
|
||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await GetAppInstallParams(Number(paramData.value.id));
|
const res = await getAppInstallParams(Number(paramData.value.id));
|
||||||
const configParams = res.data.params || [];
|
const configParams = res.data.params || [];
|
||||||
if (configParams && configParams.length > 0) {
|
if (configParams && configParams.length > 0) {
|
||||||
configParams.forEach((d) => {
|
configParams.forEach((d) => {
|
||||||
@ -263,7 +263,7 @@ const submit = async (formEl: FormInstance) => {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await UpdateAppInstallParams(submitModel.value);
|
await updateAppInstallParams(submitModel.value);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
@ -276,7 +276,7 @@ const submit = async (formEl: FormInstance) => {
|
|||||||
|
|
||||||
const updateAppConfig = async () => {
|
const updateAppConfig = async () => {
|
||||||
try {
|
try {
|
||||||
await UpdateInstallConfig({
|
await updateInstallConfig({
|
||||||
installID: Number(paramData.value.id),
|
installID: Number(paramData.value.id),
|
||||||
webUI: appConfigUpdate.value.webUI,
|
webUI: appConfigUpdate.value.webUI,
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</DrawerPro>
|
</DrawerPro>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GetIgnoredApp, IgnoreUpgrade } from '@/api/modules/app';
|
import { getIgnoredApp, ignoreUpgrade } from '@/api/modules/app';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@ -54,14 +54,14 @@ const acceptParams = () => {
|
|||||||
|
|
||||||
const getApps = async () => {
|
const getApps = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await GetIgnoredApp();
|
const res = await getIgnoredApp();
|
||||||
apps.value = res.data;
|
apps.value = res.data;
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
const cancelIgnore = async (id: number) => {
|
const cancelIgnore = async (id: number) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await IgnoreUpgrade({ detailID: id, operate: 'cancel' })
|
await ignoreUpgrade({ detailID: id, operate: 'cancel' })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
})
|
})
|
||||||
|
@ -365,12 +365,12 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import {
|
||||||
SearchAppInstalled,
|
searchAppInstalled,
|
||||||
InstalledOp,
|
installedOp,
|
||||||
SyncInstalledApp,
|
syncInstalledApp,
|
||||||
AppInstalledDeleteCheck,
|
appInstalledDeleteCheck,
|
||||||
GetAppTags,
|
getAppTags,
|
||||||
GetAppStoreConfig,
|
getAppStoreConfig,
|
||||||
} from '@/api/modules/app';
|
} from '@/api/modules/app';
|
||||||
import { onMounted, onUnmounted, reactive, ref } from 'vue';
|
import { onMounted, onUnmounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@ -456,7 +456,7 @@ const sync = () => {
|
|||||||
.then(async () => {
|
.then(async () => {
|
||||||
syncLoading.value = true;
|
syncLoading.value = true;
|
||||||
try {
|
try {
|
||||||
await SyncInstalledApp();
|
await syncInstalledApp();
|
||||||
MsgSuccess(i18n.global.t('app.syncSuccess'));
|
MsgSuccess(i18n.global.t('app.syncSuccess'));
|
||||||
search();
|
search();
|
||||||
} finally {
|
} finally {
|
||||||
@ -491,10 +491,10 @@ const getTagValue = (key: string) => {
|
|||||||
const search = async () => {
|
const search = async () => {
|
||||||
searchReq.page = paginationConfig.currentPage;
|
searchReq.page = paginationConfig.currentPage;
|
||||||
searchReq.pageSize = paginationConfig.pageSize;
|
searchReq.pageSize = paginationConfig.pageSize;
|
||||||
const res = await SearchAppInstalled(searchReq);
|
const res = await searchAppInstalled(searchReq);
|
||||||
data.value = res.data.items;
|
data.value = res.data.items;
|
||||||
paginationConfig.total = res.data.total;
|
paginationConfig.total = res.data.total;
|
||||||
GetAppTags().then((res) => {
|
getAppTags().then((res) => {
|
||||||
tags.value = res.data;
|
tags.value = res.data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -505,7 +505,7 @@ const openOperate = (row: any, op: string) => {
|
|||||||
if (op == 'upgrade' || op == 'ignore') {
|
if (op == 'upgrade' || op == 'ignore') {
|
||||||
upgradeRef.value.acceptParams(row.id, row.name, row.dockerCompose, op, row.app);
|
upgradeRef.value.acceptParams(row.id, row.name, row.dockerCompose, op, row.app);
|
||||||
} else if (op == 'delete') {
|
} else if (op == 'delete') {
|
||||||
AppInstalledDeleteCheck(row.id).then(async (res) => {
|
appInstalledDeleteCheck(row.id).then(async (res) => {
|
||||||
const items = res.data;
|
const items = res.data;
|
||||||
if (res.data && res.data.length > 0) {
|
if (res.data && res.data.length > 0) {
|
||||||
checkRef.value.acceptParams({ items: items, key: row.appKey, installID: row.id });
|
checkRef.value.acceptParams({ items: items, key: row.appKey, installID: row.id });
|
||||||
@ -525,7 +525,7 @@ const openIgnore = () => {
|
|||||||
const operate = async () => {
|
const operate = async () => {
|
||||||
open.value = false;
|
open.value = false;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await InstalledOp(operateReq)
|
await installedOp(operateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
searchReq.sync = true;
|
searchReq.sync = true;
|
||||||
@ -700,9 +700,9 @@ const toLink = (link: string) => {
|
|||||||
window.open(link, '_blank');
|
window.open(link, '_blank');
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAppstoreConfig = async () => {
|
const getConfig = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await GetAppStoreConfig();
|
const res = await getAppStoreConfig();
|
||||||
if (res.data.defaultDomain != '') {
|
if (res.data.defaultDomain != '') {
|
||||||
defaultLink.value = res.data.defaultDomain;
|
defaultLink.value = res.data.defaultDomain;
|
||||||
}
|
}
|
||||||
@ -710,7 +710,7 @@ const getAppstoreConfig = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getAppstoreConfig();
|
getConfig();
|
||||||
const path = router.currentRoute.value.path;
|
const path = router.currentRoute.value.path;
|
||||||
if (path == '/apps/upgrade') {
|
if (path == '/apps/upgrade') {
|
||||||
activeName.value = i18n.global.t('app.canUpgrade');
|
activeName.value = i18n.global.t('app.canUpgrade');
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { GetAppUpdateVersions, IgnoreUpgrade, InstalledOp } from '@/api/modules/app';
|
import { getAppUpdateVersions, ignoreUpgrade, installedOp } from '@/api/modules/app';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElMessageBox, FormInstance } from 'element-plus';
|
import { ElMessageBox, FormInstance } from 'element-plus';
|
||||||
import { reactive, ref, onBeforeUnmount } from 'vue';
|
import { reactive, ref, onBeforeUnmount } from 'vue';
|
||||||
@ -174,7 +174,7 @@ const getVersions = async (version: string) => {
|
|||||||
req['updateVersion'] = version;
|
req['updateVersion'] = version;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await GetAppUpdateVersions(req);
|
const res = await getAppUpdateVersions(req);
|
||||||
versions.value = res.data || [];
|
versions.value = res.data || [];
|
||||||
if (res.data != null && res.data.length > 0) {
|
if (res.data != null && res.data.length > 0) {
|
||||||
let item = res.data[0];
|
let item = res.data[0];
|
||||||
@ -202,7 +202,7 @@ const operate = async () => {
|
|||||||
}
|
}
|
||||||
const taskID = uuidv4();
|
const taskID = uuidv4();
|
||||||
operateReq.taskID = taskID;
|
operateReq.taskID = taskID;
|
||||||
await InstalledOp(operateReq)
|
await installedOp(operateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
bus.emit('upgrade', true);
|
bus.emit('upgrade', true);
|
||||||
handleClose();
|
handleClose();
|
||||||
@ -212,7 +212,7 @@ const operate = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await IgnoreUpgrade(operateReq)
|
await ignoreUpgrade(operateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
bus.emit('upgrade', true);
|
bus.emit('upgrade', true);
|
||||||
|
@ -26,7 +26,7 @@ import { reactive, ref } from 'vue';
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { UpdateAppStoreConfig } from '@/api/modules/app';
|
import { updateAppStoreConfig } from '@/api/modules/app';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const emit = defineEmits<{ (e: 'close'): void }>();
|
const emit = defineEmits<{ (e: 'close'): void }>();
|
||||||
@ -71,7 +71,7 @@ const submit = async () => {
|
|||||||
const req = {
|
const req = {
|
||||||
defaultDomain: defaultDomain,
|
defaultDomain: defaultDomain,
|
||||||
};
|
};
|
||||||
await UpdateAppStoreConfig(req);
|
await updateAppStoreConfig(req);
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<span class="input-help">{{ $t('app.defaultWebDomainHepler') }}</span>
|
<span class="input-help">{{ $t('app.defaultWebDomainHepler') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<CustomSetting v-if="isProductPro && globalStore.isMaster" />
|
<CustomSetting v-if="globalStore.isMasterProductPro" />
|
||||||
<el-form-item v-if="!globalStore.isMaster && useCustomApp">
|
<el-form-item v-if="!globalStore.isMaster && useCustomApp">
|
||||||
<el-text type="warning">{{ $t('app.customAppHelper') }}</el-text>
|
<el-text type="warning">{{ $t('app.customAppHelper') }}</el-text>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GetAppStoreConfig, getCurrentNodeCustomAppConfig } from '@/api/modules/app';
|
import { getAppStoreConfig, getCurrentNodeCustomAppConfig } from '@/api/modules/app';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { FormRules } from 'element-plus';
|
import { FormRules } from 'element-plus';
|
||||||
import CustomSetting from '@/xpack/views/appstore/index.vue';
|
import CustomSetting from '@/xpack/views/appstore/index.vue';
|
||||||
@ -82,7 +82,7 @@ function getUrl(url: string) {
|
|||||||
const search = async () => {
|
const search = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
const res = await GetAppStoreConfig();
|
const res = await getAppStoreConfig();
|
||||||
if (res.data.defaultDomain != '') {
|
if (res.data.defaultDomain != '') {
|
||||||
const url = getUrl(res.data.defaultDomain);
|
const url = getUrl(res.data.defaultDomain);
|
||||||
if (url) {
|
if (url) {
|
||||||
@ -104,7 +104,7 @@ const setDefaultDomain = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getNodeConfig = async () => {
|
const getNodeConfig = async () => {
|
||||||
if (globalStore.isMaster) {
|
if (globalStore.isMasterProductPro) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const res = await getCurrentNodeCustomAppConfig();
|
const res = await getCurrentNodeCustomAppConfig();
|
||||||
|
@ -535,12 +535,12 @@ import { Cronjob } from '@/api/interface/cronjob';
|
|||||||
import { addCronjob, editCronjob, loadNextHandle } from '@/api/modules/cronjob';
|
import { addCronjob, editCronjob, loadNextHandle } from '@/api/modules/cronjob';
|
||||||
import CodemirrorPro from '@/components/codemirror-pro/index.vue';
|
import CodemirrorPro from '@/components/codemirror-pro/index.vue';
|
||||||
import { listDbItems } from '@/api/modules/database';
|
import { listDbItems } from '@/api/modules/database';
|
||||||
import { GetWebsiteOptions } from '@/api/modules/website';
|
import { getWebsiteOptions } from '@/api/modules/website';
|
||||||
import { MsgError, MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { listContainer } from '@/api/modules/container';
|
import { listContainer } from '@/api/modules/container';
|
||||||
import { Database } from '@/api/interface/database';
|
import { Database } from '@/api/interface/database';
|
||||||
import { ListAppInstalled } from '@/api/modules/app';
|
import { listAppInstalled } from '@/api/modules/app';
|
||||||
import {
|
import {
|
||||||
loadDefaultSpec,
|
loadDefaultSpec,
|
||||||
loadDefaultSpecCustom,
|
loadDefaultSpecCustom,
|
||||||
@ -962,12 +962,12 @@ const loadShellUsers = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const loadAppInstalls = async () => {
|
const loadAppInstalls = async () => {
|
||||||
const res = await ListAppInstalled();
|
const res = await listAppInstalled();
|
||||||
appOptions.value = res.data || [];
|
appOptions.value = res.data || [];
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadWebsites = async () => {
|
const loadWebsites = async () => {
|
||||||
const res = await GetWebsiteOptions({});
|
const res = await getWebsiteOptions({});
|
||||||
websiteOptions.value = res.data || [];
|
websiteOptions.value = res.data || [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ import i18n from '@/lang';
|
|||||||
import { ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { listDbItems } from '@/api/modules/database';
|
import { listDbItems } from '@/api/modules/database';
|
||||||
import { ListAppInstalled } from '@/api/modules/app';
|
import { listAppInstalled } from '@/api/modules/app';
|
||||||
import { shortcuts } from '@/utils/shortcuts';
|
import { shortcuts } from '@/utils/shortcuts';
|
||||||
import TaskLog from '@/components/task-log/log-without-dialog.vue';
|
import TaskLog from '@/components/task-log/log-without-dialog.vue';
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dialogData.value.rowData.type === 'app') {
|
if (dialogData.value.rowData.type === 'app') {
|
||||||
const res = await ListAppInstalled();
|
const res = await listAppInstalled();
|
||||||
let itemApps = res.data || [];
|
let itemApps = res.data || [];
|
||||||
for (const item of itemApps) {
|
for (const item of itemApps) {
|
||||||
if (item.id == dialogData.value.rowData.appID) {
|
if (item.id == dialogData.value.rowData.appID) {
|
||||||
|
@ -109,7 +109,7 @@ import i18n from '@/lang';
|
|||||||
import { ElForm } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { getDatabase, loadRemoteAccess, updateMysqlAccess, updateMysqlPassword } from '@/api/modules/database';
|
import { getDatabase, loadRemoteAccess, updateMysqlAccess, updateMysqlPassword } from '@/api/modules/database';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { GetAppConnInfo } from '@/api/modules/app';
|
import { getAppConnInfo } from '@/api/modules/app';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { getRandomStr } from '@/utils/util';
|
import { getRandomStr } from '@/utils/util';
|
||||||
import { getSettingInfo } from '@/api/modules/setting';
|
import { getSettingInfo } from '@/api/modules/setting';
|
||||||
@ -185,7 +185,7 @@ const loadSystemIP = async () => {
|
|||||||
|
|
||||||
const loadPassword = async () => {
|
const loadPassword = async () => {
|
||||||
if (form.from === 'local') {
|
if (form.from === 'local') {
|
||||||
const res = await GetAppConnInfo(form.type, form.database);
|
const res = await getAppConnInfo(form.type, form.database);
|
||||||
form.status = res.data.status;
|
form.status = res.data.status;
|
||||||
form.password = res.data.password || '';
|
form.password = res.data.password || '';
|
||||||
form.port = res.data.port || 3306;
|
form.port = res.data.port || 3306;
|
||||||
|
@ -286,7 +286,7 @@ import {
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Database } from '@/api/interface/database';
|
import { Database } from '@/api/interface/database';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { GetAppPort } from '@/api/modules/app';
|
import { getAppPort } from '@/api/modules/app';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
@ -473,12 +473,12 @@ const getAppDetail = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const loadPhpMyAdminPort = async () => {
|
const loadPhpMyAdminPort = async () => {
|
||||||
const res = await GetAppPort('phpmyadmin', '');
|
const res = await getAppPort('phpmyadmin', '');
|
||||||
phpadminPort.value = res.data;
|
phpadminPort.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadAdminerPort = async () => {
|
const loadAdminerPort = async () => {
|
||||||
const res = await GetAppPort('adminer', '');
|
const res = await getAppPort('adminer', '');
|
||||||
adminerPort.value = res.data;
|
adminerPort.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ import SlowLog from '@/views/database/mysql/setting/slow-log/index.vue';
|
|||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import { loadDBFile, loadDBBaseInfo, loadMysqlVariables, updateDBFile } from '@/api/modules/database';
|
import { loadDBFile, loadDBBaseInfo, loadMysqlVariables, updateDBFile } from '@/api/modules/database';
|
||||||
import { ChangePort, CheckAppInstalled, GetAppDefaultConfig } from '@/api/modules/app';
|
import { changePort, checkAppInstalled, getAppDefaultConfig } from '@/api/modules/app';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -203,7 +203,7 @@ const onSubmitChangePort = async () => {
|
|||||||
port: baseInfo.port,
|
port: baseInfo.port,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await ChangePort(params)
|
await changePort(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
@ -236,7 +236,7 @@ function callback(error: any) {
|
|||||||
|
|
||||||
const getDefaultConfig = async () => {
|
const getDefaultConfig = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await GetAppDefaultConfig(props.type, props.database)
|
await getAppDefaultConfig(props.type, props.database)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
mysqlConf.value = res.data;
|
mysqlConf.value = res.data;
|
||||||
useOld.value = true;
|
useOld.value = true;
|
||||||
@ -332,7 +332,7 @@ const goUpgrade = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onLoadInfo = async () => {
|
const onLoadInfo = async () => {
|
||||||
await CheckAppInstalled(props.type, props.database).then((res) => {
|
await checkAppInstalled(props.type, props.database).then((res) => {
|
||||||
mysqlName.value = res.data.name;
|
mysqlName.value = res.data.name;
|
||||||
mysqlStatus.value = res.data.status;
|
mysqlStatus.value = res.data.status;
|
||||||
mysqlVersion.value = res.data.version;
|
mysqlVersion.value = res.data.version;
|
||||||
|
@ -111,7 +111,7 @@ import i18n from '@/lang';
|
|||||||
import { ElForm } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { getDatabase, updatePostgresqlPassword } from '@/api/modules/database';
|
import { getDatabase, updatePostgresqlPassword } from '@/api/modules/database';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { GetAppConnInfo } from '@/api/modules/app';
|
import { getAppConnInfo } from '@/api/modules/app';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { getRandomStr } from '@/utils/util';
|
import { getRandomStr } from '@/utils/util';
|
||||||
import { getSettingInfo } from '@/api/modules/setting';
|
import { getSettingInfo } from '@/api/modules/setting';
|
||||||
@ -185,7 +185,7 @@ const loadSystemIP = async () => {
|
|||||||
|
|
||||||
const loadPassword = async () => {
|
const loadPassword = async () => {
|
||||||
if (form.from === 'local') {
|
if (form.from === 'local') {
|
||||||
const res = await GetAppConnInfo(form.type, form.database);
|
const res = await getAppConnInfo(form.type, form.database);
|
||||||
form.status = res.data.status;
|
form.status = res.data.status;
|
||||||
form.username = res.data.username || '';
|
form.username = res.data.username || '';
|
||||||
form.password = res.data.password || '';
|
form.password = res.data.password || '';
|
||||||
|
@ -253,7 +253,7 @@ import {
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Database } from '@/api/interface/database';
|
import { Database } from '@/api/interface/database';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { GetAppPort } from '@/api/modules/app';
|
import { getAppPort } from '@/api/modules/app';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
@ -437,7 +437,7 @@ const getAppDetail = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const loadPGAdminPort = async () => {
|
const loadPGAdminPort = async () => {
|
||||||
const res = await GetAppPort('pgadmin4', '');
|
const res = await getAppPort('pgadmin4', '');
|
||||||
pgadminPort.value = res.data;
|
pgadminPort.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ import ContainerLog from '@/components/container-log/index.vue';
|
|||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import { loadDBFile, loadDBBaseInfo, updateDBFile } from '@/api/modules/database';
|
import { loadDBFile, loadDBBaseInfo, updateDBFile } from '@/api/modules/database';
|
||||||
import { ChangePort, CheckAppInstalled } from '@/api/modules/app';
|
import { changePort, checkAppInstalled } from '@/api/modules/app';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -122,7 +122,7 @@ const onSubmitChangePort = async () => {
|
|||||||
port: baseInfo.port,
|
port: baseInfo.port,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await ChangePort(params)
|
await changePort(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
@ -211,7 +211,7 @@ const goUpgrade = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onLoadInfo = async () => {
|
const onLoadInfo = async () => {
|
||||||
await CheckAppInstalled(props.type, props.database).then((res) => {
|
await checkAppInstalled(props.type, props.database).then((res) => {
|
||||||
postgresqlName.value = res.data.name;
|
postgresqlName.value = res.data.name;
|
||||||
postgresqlStatus.value = res.data.status;
|
postgresqlStatus.value = res.data.status;
|
||||||
postgresqlVersion.value = res.data.version;
|
postgresqlVersion.value = res.data.version;
|
||||||
|
@ -100,7 +100,7 @@ import i18n from '@/lang';
|
|||||||
import { ElForm } from 'element-plus';
|
import { ElForm } from 'element-plus';
|
||||||
import { changeRedisPassword, getDatabase } from '@/api/modules/database';
|
import { changeRedisPassword, getDatabase } from '@/api/modules/database';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { GetAppConnInfo } from '@/api/modules/app';
|
import { getAppConnInfo } from '@/api/modules/app';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { getRandomStr } from '@/utils/util';
|
import { getRandomStr } from '@/utils/util';
|
||||||
import { getSettingInfo } from '@/api/modules/setting';
|
import { getSettingInfo } from '@/api/modules/setting';
|
||||||
@ -164,7 +164,7 @@ const random = async () => {
|
|||||||
|
|
||||||
const loadPassword = async () => {
|
const loadPassword = async () => {
|
||||||
if (form.from === 'local') {
|
if (form.from === 'local') {
|
||||||
const res = await GetAppConnInfo('redis', form.database);
|
const res = await getAppConnInfo('redis', form.database);
|
||||||
form.status = res.data.status;
|
form.status = res.data.status;
|
||||||
form.password = res.data.password || '';
|
form.password = res.data.password || '';
|
||||||
form.port = res.data.port || 3306;
|
form.port = res.data.port || 3306;
|
||||||
|
@ -144,7 +144,7 @@ import Terminal from '@/components/terminal/index.vue';
|
|||||||
import AppStatus from '@/components/app-status/index.vue';
|
import AppStatus from '@/components/app-status/index.vue';
|
||||||
import QuickCmd from '@/views/database/redis/command/index.vue';
|
import QuickCmd from '@/views/database/redis/command/index.vue';
|
||||||
import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';
|
import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';
|
||||||
import { CheckAppInstalled } from '@/api/modules/app';
|
import { checkAppInstalled } from '@/api/modules/app';
|
||||||
import router from '@/routers';
|
import router from '@/routers';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import { listDatabases, checkRedisCli, installRedisCli } from '@/api/modules/database';
|
import { listDatabases, checkRedisCli, installRedisCli } from '@/api/modules/database';
|
||||||
@ -312,7 +312,7 @@ const initTerminal = async () => {
|
|||||||
isRefresh.value = !isRefresh.value;
|
isRefresh.value = !isRefresh.value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await CheckAppInstalled('redis', currentDBName.value)
|
await checkAppInstalled('redis', currentDBName.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
redisIsExist.value = res.data.isExist;
|
redisIsExist.value = res.data.isExist;
|
||||||
redisStatus.value = res.data.status;
|
redisStatus.value = res.data.status;
|
||||||
|
@ -122,7 +122,7 @@ import Persistence from '@/views/database/redis/setting/persistence/index.vue';
|
|||||||
import { loadDBFile, loadRedisConf, updateRedisConf, updateDBFile } from '@/api/modules/database';
|
import { loadDBFile, loadRedisConf, updateRedisConf, updateDBFile } from '@/api/modules/database';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { checkNumberRange, Rules } from '@/global/form-rules';
|
import { checkNumberRange, Rules } from '@/global/form-rules';
|
||||||
import { ChangePort, GetAppDefaultConfig } from '@/api/modules/app';
|
import { changePort, getAppDefaultConfig } from '@/api/modules/app';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@ -226,7 +226,7 @@ const onChangePort = async (formEl: FormInstance | undefined) => {
|
|||||||
port: form.port,
|
port: form.port,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await ChangePort(params)
|
await changePort(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
@ -270,7 +270,7 @@ const submitForm = async () => {
|
|||||||
|
|
||||||
const getDefaultConfig = async () => {
|
const getDefaultConfig = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await GetAppDefaultConfig('redis', '')
|
await getAppDefaultConfig('redis', '')
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
redisConf.value = res.data;
|
redisConf.value = res.data;
|
||||||
useOld.value = true;
|
useOld.value = true;
|
||||||
|
@ -180,7 +180,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GetAppStoreConfig, InstalledOp } from '@/api/modules/app';
|
import { getAppStoreConfig, installedOp } from '@/api/modules/app';
|
||||||
import { changeLauncherStatus, loadAppLauncher, loadAppLauncherOption } from '@/api/modules/dashboard';
|
import { changeLauncherStatus, loadAppLauncher, loadAppLauncherOption } from '@/api/modules/dashboard';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
@ -206,7 +206,7 @@ const defaultLink = ref('');
|
|||||||
const acceptParams = (): void => {
|
const acceptParams = (): void => {
|
||||||
search();
|
search();
|
||||||
loadOption();
|
loadOption();
|
||||||
getAppStoreConfig();
|
getConfig();
|
||||||
};
|
};
|
||||||
|
|
||||||
const goInstall = (key: string, type: string) => {
|
const goInstall = (key: string, type: string) => {
|
||||||
@ -257,9 +257,9 @@ const toLink = (link: string) => {
|
|||||||
window.open(link, '_blank');
|
window.open(link, '_blank');
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAppStoreConfig = async () => {
|
const getConfig = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await GetAppStoreConfig();
|
const res = await getAppStoreConfig();
|
||||||
if (res.data.defaultDomain != '') {
|
if (res.data.defaultDomain != '') {
|
||||||
defaultLink.value = res.data.defaultDomain;
|
defaultLink.value = res.data.defaultDomain;
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@ const onOperate = async (operation: string, row: any) => {
|
|||||||
operate: operation,
|
operate: operation,
|
||||||
detailId: row.detailId,
|
detailId: row.detailId,
|
||||||
};
|
};
|
||||||
await InstalledOp(params)
|
await installedOp(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { BatchChangeRole } from '@/api/modules/files';
|
import { batchChangeRole } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import FileRole from '@/components/file-role/index.vue';
|
import FileRole from '@/components/file-role/index.vue';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -87,7 +87,7 @@ const submit = async () => {
|
|||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
BatchChangeRole(addForm)
|
batchChangeRole(addForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { ChangeFileMode } from '@/api/modules/files';
|
import { changeFileMode } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import FileRole from '@/components/file-role/index.vue';
|
import FileRole from '@/components/file-role/index.vue';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -50,7 +50,7 @@ const getMode = (val: number) => {
|
|||||||
|
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
ChangeFileMode(form.value)
|
changeFileMode(form.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ChangeOwner } from '@/api/modules/files';
|
import { changeOwner } from '@/api/modules/files';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
@ -78,7 +78,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
ChangeOwner(addForm)
|
changeOwner(addForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -152,7 +152,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GetFileContent, GetFilesTree, SaveFileContent } from '@/api/modules/files';
|
import { getFileContent, getFilesTree, saveFileContent } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgError, MsgInfo, MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgInfo, MsgSuccess } from '@/utils/message';
|
||||||
import * as monaco from 'monaco-editor';
|
import * as monaco from 'monaco-editor';
|
||||||
@ -456,7 +456,7 @@ const quickSave = () => {
|
|||||||
const saveContent = () => {
|
const saveContent = () => {
|
||||||
if (isEdit.value) {
|
if (isEdit.value) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
SaveFileContent(form.value)
|
saveFileContent(form.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
isEdit.value = false;
|
isEdit.value = false;
|
||||||
@ -561,7 +561,7 @@ const getContent = (path: string, extension: string) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
GetFileContent(codeReq)
|
getFileContent(codeReq)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
form.value.content = res.data.content;
|
form.value.content = res.data.content;
|
||||||
oldFileContent.value = res.data.content;
|
oldFileContent.value = res.data.content;
|
||||||
@ -612,7 +612,7 @@ const search = async (path: string) => {
|
|||||||
req.sortBy = 'name';
|
req.sortBy = 'name';
|
||||||
req.sortOrder = 'ascending';
|
req.sortOrder = 'ascending';
|
||||||
}
|
}
|
||||||
return await GetFilesTree(req);
|
return await getFilesTree(req);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getUpData = async () => {
|
const getUpData = async () => {
|
||||||
|
@ -48,7 +48,7 @@ import { File } from '@/api/interface/file';
|
|||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { CompressExtension, CompressType } from '@/enums/files';
|
import { CompressExtension, CompressType } from '@/enums/files';
|
||||||
import { CompressFile } from '@/api/modules/files';
|
import { compressFile } from '@/api/modules/files';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
Object.assign(addItem, form.value);
|
Object.assign(addItem, form.value);
|
||||||
addItem['name'] = form.value.name + extension.value;
|
addItem['name'] = form.value.name + extension.value;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
CompressFile(addItem as File.FileCompress)
|
compressFile(addItem as File.FileCompress)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('file.compressSuccess'));
|
MsgSuccess(i18n.global.t('file.compressSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
import { ref, reactive, computed } from 'vue';
|
import { ref, reactive, computed } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { CreateFile } from '@/api/modules/files';
|
import { createFile } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import FileRole from '@/components/file-role/index.vue';
|
import FileRole from '@/components/file-role/index.vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
@ -117,7 +117,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
addItem['mode'] = undefined;
|
addItem['mode'] = undefined;
|
||||||
}
|
}
|
||||||
addItem['name'] = addForm.name.trim();
|
addItem['name'] = addForm.name.trim();
|
||||||
CreateFile(addItem as File.FileCreate)
|
createFile(addItem as File.FileCreate)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -37,7 +37,7 @@ import { reactive, ref } from 'vue';
|
|||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { DeCompressFile } from '@/api/modules/files';
|
import { deCompressFile } from '@/api/modules/files';
|
||||||
import { Mimetypes } from '@/global/mimetype';
|
import { Mimetypes } from '@/global/mimetype';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -89,7 +89,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
DeCompressFile(form.value)
|
deCompressFile(form.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('file.deCompressSuccess'));
|
MsgSuccess(i18n.global.t('file.deCompressSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -58,7 +58,7 @@ import i18n from '@/lang';
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { getIcon } from '@/utils/util';
|
import { getIcon } from '@/utils/util';
|
||||||
import { DeleteFile, GetRecycleStatus } from '@/api/modules/files';
|
import { deleteFile, getRecycleStatus } from '@/api/modules/files';
|
||||||
import { MsgSuccess, MsgWarning } from '@/utils/message';
|
import { MsgSuccess, MsgWarning } from '@/utils/message';
|
||||||
import { loadBaseDir } from '@/api/modules/setting';
|
import { loadBaseDir } from '@/api/modules/setting';
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ const acceptParams = (props: File.File[]) => {
|
|||||||
|
|
||||||
const getStatus = async () => {
|
const getStatus = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await GetRecycleStatus();
|
const res = await getRecycleStatus();
|
||||||
recycleStatus.value = res.data;
|
recycleStatus.value = res.data;
|
||||||
if (recycleStatus.value === 'disable') {
|
if (recycleStatus.value === 'disable') {
|
||||||
forceDelete.value = true;
|
forceDelete.value = true;
|
||||||
@ -100,7 +100,7 @@ const onConfirm = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pros.push(DeleteFile({ path: s['path'], isDir: s['isDir'], forceDelete: forceDelete.value }));
|
pros.push(deleteFile({ path: s['path'], isDir: s['isDir'], forceDelete: forceDelete.value }));
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
Promise.all(pros)
|
Promise.all(pros)
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ComputeDirSize, GetFileContent } from '@/api/modules/files';
|
import { computeDirSize, getFileContent } from '@/api/modules/files';
|
||||||
import { computeSize } from '@/utils/util';
|
import { computeSize } from '@/utils/util';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { dateFormatSimple } from '@/utils/util';
|
import { dateFormatSimple } from '@/utils/util';
|
||||||
@ -64,7 +64,7 @@ const handleClose = () => {
|
|||||||
|
|
||||||
const acceptParams = async (params: InfoProps): Promise<void> => {
|
const acceptParams = async (params: InfoProps): Promise<void> => {
|
||||||
props.value = params;
|
props.value = params;
|
||||||
GetFileContent({ path: params.path, expand: false, page: 1, pageSize: 1, isDetail: true }).then((res) => {
|
getFileContent({ path: params.path, expand: false, page: 1, pageSize: 1, isDetail: true }).then((res) => {
|
||||||
data.value = res.data;
|
data.value = res.data;
|
||||||
open.value = true;
|
open.value = true;
|
||||||
});
|
});
|
||||||
@ -75,7 +75,7 @@ const getDirSize = async (row: any) => {
|
|||||||
path: row.path,
|
path: row.path,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await ComputeDirSize(req)
|
await computeDirSize(req)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
data.value.dirSize = res.data.size;
|
data.value.dirSize = res.data.size;
|
||||||
})
|
})
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { CompressExtension, CompressType } from '@/enums/files';
|
import { CompressExtension, CompressType } from '@/enums/files';
|
||||||
import { computed, reactive, ref } from 'vue';
|
import { computed, reactive, ref } from 'vue';
|
||||||
import { DownloadFile } from '@/api/modules/files';
|
import { downloadFile } from '@/api/modules/files';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
Object.assign(addItem, addForm.value);
|
Object.assign(addItem, addForm.value);
|
||||||
addItem['name'] = addForm.value.name + extension.value;
|
addItem['name'] = addForm.value.name + extension.value;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
DownloadFile(addItem as File.FileDownload)
|
downloadFile(addItem as File.FileDownload)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const downloadUrl = window.URL.createObjectURL(new Blob([res]));
|
const downloadUrl = window.URL.createObjectURL(new Blob([res]));
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { SearchFavorite, RemoveFavorite } from '@/api/modules/files';
|
import { searchFavorite, removeFavorite } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ const search = async () => {
|
|||||||
try {
|
try {
|
||||||
req.page = paginationConfig.currentPage;
|
req.page = paginationConfig.currentPage;
|
||||||
req.pageSize = paginationConfig.pageSize;
|
req.pageSize = paginationConfig.pageSize;
|
||||||
const res = await SearchFavorite(req);
|
const res = await searchFavorite(req);
|
||||||
data.value = res.data.items;
|
data.value = res.data.items;
|
||||||
paginationConfig.total = res.data.total;
|
paginationConfig.total = res.data.total;
|
||||||
open.value = true;
|
open.value = true;
|
||||||
@ -54,7 +54,7 @@ const singleDel = async (id: number) => {
|
|||||||
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
try {
|
try {
|
||||||
await RemoveFavorite(id);
|
await removeFavorite(id);
|
||||||
search();
|
search();
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
});
|
});
|
||||||
|
@ -3,16 +3,16 @@
|
|||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="flex-shrink-0 flex items-center mr-4">
|
<div class="flex-shrink-0 flex items-center mr-4">
|
||||||
<el-tooltip :content="$t('file.back')" placement="top">
|
<el-tooltip :content="$t('file.back')" placement="top">
|
||||||
<el-button :icon="Back" @click="back" circle />
|
<el-button icon="Back" @click="back" circle />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('file.right')" placement="top">
|
<el-tooltip :content="$t('file.right')" placement="top">
|
||||||
<el-button :icon="Right" @click="right" circle />
|
<el-button icon="Right" @click="right" circle />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('file.top')" placement="top">
|
<el-tooltip :content="$t('file.top')" placement="top">
|
||||||
<el-button :icon="Top" @click="top" circle :disabled="paths.length == 0" />
|
<el-button icon="Top" @click="top" circle :disabled="paths.length == 0" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('file.refresh')" placement="top">
|
<el-tooltip :content="$t('file.refresh')" placement="top">
|
||||||
<el-button :icon="Refresh" circle @click="search" />
|
<el-button icon="Refresh" circle @click="search" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@ -107,9 +107,7 @@
|
|||||||
<el-button plain @click="openPaste">{{ $t('file.paste') }}({{ fileMove.count }})</el-button>
|
<el-button plain @click="openPaste">{{ $t('file.paste') }}({{ fileMove.count }})</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip class="box-item" effect="dark" :content="$t('file.cancel')" placement="bottom">
|
<el-tooltip class="box-item" effect="dark" :content="$t('file.cancel')" placement="bottom">
|
||||||
<el-button plain class="close" @click="closeMove">
|
<el-button plain class="close" icon="Close" @click="closeMove"></el-button>
|
||||||
<el-icon class="close-icon"><Close /></el-icon>
|
|
||||||
</el-button>
|
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</template>
|
</template>
|
||||||
@ -205,15 +203,15 @@
|
|||||||
link
|
link
|
||||||
type="warning"
|
type="warning"
|
||||||
size="large"
|
size="large"
|
||||||
:icon="StarFilled"
|
icon="StarFilled"
|
||||||
@click="removeFavorite(row.favoriteID)"
|
@click="remove(row.favoriteID)"
|
||||||
></el-button>
|
></el-button>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hoveredRowIndex === $index"
|
v-if="hoveredRowIndex === $index"
|
||||||
link
|
link
|
||||||
:icon="Star"
|
icon="Star"
|
||||||
@click="addFavorite(row)"
|
@click="addToFavorite(row)"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -304,15 +302,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, reactive, ref, computed } from '@vue/runtime-core';
|
import { nextTick, onMounted, reactive, ref, computed } from '@vue/runtime-core';
|
||||||
import {
|
import {
|
||||||
GetFilesList,
|
getFilesList,
|
||||||
GetFileContent,
|
getFileContent,
|
||||||
ComputeDirSize,
|
computeDirSize,
|
||||||
AddFavorite,
|
addFavorite,
|
||||||
RemoveFavorite,
|
removeFavorite,
|
||||||
SearchFavorite,
|
searchFavorite,
|
||||||
} from '@/api/modules/files';
|
} from '@/api/modules/files';
|
||||||
import { computeSize, copyText, dateFormat, getFileType, getIcon, getRandomStr, downloadFile } from '@/utils/util';
|
import { computeSize, copyText, dateFormat, getFileType, getIcon, getRandomStr, downloadFile } from '@/utils/util';
|
||||||
import { StarFilled, Star, Top, Right, Close } from '@element-plus/icons-vue';
|
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { Mimetypes, Languages } from '@/global/mimetype';
|
import { Mimetypes, Languages } from '@/global/mimetype';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
@ -434,7 +431,7 @@ const search = async () => {
|
|||||||
|
|
||||||
req.page = paginationConfig.currentPage;
|
req.page = paginationConfig.currentPage;
|
||||||
req.pageSize = paginationConfig.pageSize;
|
req.pageSize = paginationConfig.pageSize;
|
||||||
await GetFilesList(req)
|
await getFilesList(req)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
handleSearchResult(res);
|
handleSearchResult(res);
|
||||||
})
|
})
|
||||||
@ -447,7 +444,7 @@ const search = async () => {
|
|||||||
const searchFile = async () => {
|
const searchFile = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
return await GetFilesList(req);
|
return await getFilesList(req);
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
@ -615,7 +612,7 @@ const getDirSize = async (row: any, index: number) => {
|
|||||||
path: row.path,
|
path: row.path,
|
||||||
};
|
};
|
||||||
btnLoading.value = index;
|
btnLoading.value = index;
|
||||||
await ComputeDirSize(req)
|
await computeDirSize(req)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
let newData = [...data.value];
|
let newData = [...data.value];
|
||||||
newData[index].dirSize = res.data.size;
|
newData[index].dirSize = res.data.size;
|
||||||
@ -711,7 +708,7 @@ const openCodeEditor = (path: string, extension: string) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
GetFileContent(codeReq)
|
getFileContent(codeReq)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
fileEdit.content = res.data.content;
|
fileEdit.content = res.data.content;
|
||||||
fileEdit.path = res.data.path;
|
fileEdit.path = res.data.path;
|
||||||
@ -828,20 +825,20 @@ const hideFavorite = () => {
|
|||||||
hoveredRowIndex.value = -1;
|
hoveredRowIndex.value = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
const addFavorite = async (row: File.File) => {
|
const addToFavorite = async (row: File.File) => {
|
||||||
try {
|
try {
|
||||||
await AddFavorite(row.path);
|
await addFavorite(row.path);
|
||||||
search();
|
search();
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
const removeFavorite = async (id: number) => {
|
const remove = async (id: number) => {
|
||||||
ElMessageBox.confirm(i18n.global.t('file.removeFavorite'), i18n.global.t('commons.msg.remove'), {
|
ElMessageBox.confirm(i18n.global.t('file.removeFavorite'), i18n.global.t('commons.msg.remove'), {
|
||||||
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
||||||
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
try {
|
try {
|
||||||
await RemoveFavorite(id);
|
await removeFavorite(id);
|
||||||
search();
|
search();
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
});
|
});
|
||||||
@ -849,7 +846,7 @@ const removeFavorite = async (id: number) => {
|
|||||||
|
|
||||||
const getFavoriates = async () => {
|
const getFavoriates = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await SearchFavorite(req);
|
const res = await searchFavorite(req);
|
||||||
favorites.value = res.data.items;
|
favorites.value = res.data.items;
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { CheckFile, MoveFile } from '@/api/modules/files';
|
import { checkFile, moveFile } from '@/api/modules/files';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
@ -102,7 +102,7 @@ const changeType = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const mvFile = () => {
|
const mvFile = () => {
|
||||||
MoveFile(addForm)
|
moveFile(addForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (type.value === 'cut') {
|
if (type.value === 'cut') {
|
||||||
MsgSuccess(i18n.global.t('file.moveSuccess'));
|
MsgSuccess(i18n.global.t('file.moveSuccess'));
|
||||||
@ -136,7 +136,7 @@ const acceptParams = async (props: MoveProps) => {
|
|||||||
type.value = props.type;
|
type.value = props.type;
|
||||||
if (props.name && props.name != '') {
|
if (props.name && props.name != '') {
|
||||||
oldName.value = props.name;
|
oldName.value = props.name;
|
||||||
const res = await CheckFile(props.path + '/' + props.name);
|
const res = await checkFile(props.path + '/' + props.name);
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
changeName.value = true;
|
changeName.value = true;
|
||||||
addForm.cover = false;
|
addForm.cover = false;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { FileKeys } from '@/api/modules/files';
|
import { fileKeys } from '@/api/modules/files';
|
||||||
import { computeSize } from '@/utils/util';
|
import { computeSize } from '@/utils/util';
|
||||||
import { onBeforeUnmount, ref, toRefs } from 'vue';
|
import { onBeforeUnmount, ref, toRefs } from 'vue';
|
||||||
import MsgInfo from '@/components/msg-info/index.vue';
|
import MsgInfo from '@/components/msg-info/index.vue';
|
||||||
@ -69,7 +69,7 @@ const initProcess = () => {
|
|||||||
const getKeys = () => {
|
const getKeys = () => {
|
||||||
keys.value = [];
|
keys.value = [];
|
||||||
res.value = [];
|
res.value = [];
|
||||||
FileKeys().then((res) => {
|
fileKeys().then((res) => {
|
||||||
if (res.data.keys.length > 0) {
|
if (res.data.keys.length > 0) {
|
||||||
keys.value = res.data.keys;
|
keys.value = res.data.keys;
|
||||||
initProcess();
|
initProcess();
|
||||||
|
@ -30,7 +30,7 @@ import i18n from '@/lang';
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { File } from '@/api/interface/file';
|
import { File } from '@/api/interface/file';
|
||||||
import { getIcon } from '@/utils/util';
|
import { getIcon } from '@/utils/util';
|
||||||
import { DeleteFile } from '@/api/modules/files';
|
import { deleteFile } from '@/api/modules/files';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
@ -48,7 +48,7 @@ const acceptParams = (props: File.RecycleBin[]) => {
|
|||||||
const onConfirm = () => {
|
const onConfirm = () => {
|
||||||
const pros = [];
|
const pros = [];
|
||||||
for (const s of files.value) {
|
for (const s of files.value) {
|
||||||
pros.push(DeleteFile({ path: s.from + '/' + s.rName, isDir: s.isDir, forceDelete: true }));
|
pros.push(deleteFile({ path: s.from + '/' + s.rName, isDir: s.isDir, forceDelete: true }));
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
Promise.all(pros)
|
Promise.all(pros)
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GetRecycleStatus, clearRecycle, getRecycleList, reduceFile } from '@/api/modules/files';
|
import { getRecycleStatus, clearRecycle, getRecycleList, reduceFile } from '@/api/modules/files';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { dateFormat, computeSize } from '@/utils/util';
|
import { dateFormat, computeSize } from '@/utils/util';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@ -106,7 +106,7 @@ const acceptParams = () => {
|
|||||||
|
|
||||||
const getStatus = async () => {
|
const getStatus = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await GetRecycleStatus();
|
const res = await getRecycleStatus();
|
||||||
status.value = res.data;
|
status.value = res.data;
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { RenameRile } from '@/api/modules/files';
|
import { renameRile } from '@/api/modules/files';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
@ -76,7 +76,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
addItem['oldName'] = getPath(addForm.path, oldName.value);
|
addItem['oldName'] = getPath(addForm.path, oldName.value);
|
||||||
addItem['newName'] = getPath(addForm.path, addForm.newName);
|
addItem['newName'] = getPath(addForm.path, addForm.newName);
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
RenameRile(addItem as File.FileRename)
|
renameRile(addItem as File.FileRename)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, reactive, ref } from 'vue';
|
import { nextTick, reactive, ref } from 'vue';
|
||||||
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
|
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
|
||||||
import { ChunkUploadFileData, UploadFileData } from '@/api/modules/files';
|
import { chunkUploadFileData, uploadFileData } from '@/api/modules/files';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message';
|
import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message';
|
||||||
import { Close, Document, UploadFilled } from '@element-plus/icons-vue';
|
import { Close, Document, UploadFilled } from '@element-plus/icons-vue';
|
||||||
@ -280,7 +280,7 @@ const submit = async () => {
|
|||||||
}
|
}
|
||||||
formData.append('overwrite', 'True');
|
formData.append('overwrite', 'True');
|
||||||
uploadPercent.value = 0;
|
uploadPercent.value = 0;
|
||||||
await UploadFileData(formData, {
|
await uploadFileData(formData, {
|
||||||
onUploadProgress: (progressEvent) => {
|
onUploadProgress: (progressEvent) => {
|
||||||
const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100);
|
const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100);
|
||||||
uploadPercent.value = progress;
|
uploadPercent.value = progress;
|
||||||
@ -310,7 +310,7 @@ const submit = async () => {
|
|||||||
formData.append('chunkCount', chunkCount.toString());
|
formData.append('chunkCount', chunkCount.toString());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await ChunkUploadFileData(formData, {
|
await chunkUploadFileData(formData, {
|
||||||
onUploadProgress: (progressEvent) => {
|
onUploadProgress: (progressEvent) => {
|
||||||
const progress = Math.round(
|
const progress = Math.round(
|
||||||
((uploadedChunkCount + progressEvent.loaded / progressEvent.total) * 100) / chunkCount,
|
((uploadedChunkCount + progressEvent.loaded / progressEvent.total) * 100) / chunkCount,
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { WgetFile } from '@/api/modules/files';
|
import { wgetFile } from '@/api/modules/files';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { FormInstance, FormRules } from 'element-plus';
|
import { FormInstance, FormRules } from 'element-plus';
|
||||||
@ -89,7 +89,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
WgetFile(addForm)
|
wgetFile(addForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('file.downloadStart'));
|
MsgSuccess(i18n.global.t('file.downloadStart'));
|
||||||
submitData.value = true;
|
submitData.value = true;
|
||||||
|
@ -112,7 +112,7 @@ import FireRouter from '@/views/host/process/index.vue';
|
|||||||
import { ref, onMounted, onUnmounted, nextTick, reactive } from 'vue';
|
import { ref, onMounted, onUnmounted, nextTick, reactive } from 'vue';
|
||||||
import ProcessDetail from './detail/index.vue';
|
import ProcessDetail from './detail/index.vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { StopProcess } from '@/api/modules/process';
|
import { stopProcess } from '@/api/modules/process';
|
||||||
|
|
||||||
interface SortStatus {
|
interface SortStatus {
|
||||||
prop: '';
|
prop: '';
|
||||||
@ -143,7 +143,7 @@ const buttons = [
|
|||||||
{
|
{
|
||||||
label: i18n.global.t('process.stopProcess'),
|
label: i18n.global.t('process.stopProcess'),
|
||||||
click: function (row: any) {
|
click: function (row: any) {
|
||||||
stopProcess(row);
|
stop(row);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -262,7 +262,7 @@ const search = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const stopProcess = async (row: any) => {
|
const stop = async (row: any) => {
|
||||||
opRef.value.acceptParams({
|
opRef.value.acceptParams({
|
||||||
title: i18n.global.t('process.stopProcess'),
|
title: i18n.global.t('process.stopProcess'),
|
||||||
names: [row.name],
|
names: [row.name],
|
||||||
@ -270,7 +270,7 @@ const stopProcess = async (row: any) => {
|
|||||||
i18n.global.t('menu.process'),
|
i18n.global.t('menu.process'),
|
||||||
i18n.global.t('process.stopProcess'),
|
i18n.global.t('process.stopProcess'),
|
||||||
]),
|
]),
|
||||||
api: StopProcess,
|
api: stopProcess,
|
||||||
params: { PID: row.PID },
|
params: { PID: row.PID },
|
||||||
successMsg: i18n.global.t('commons.msg.operationSuccess'),
|
successMsg: i18n.global.t('commons.msg.operationSuccess'),
|
||||||
});
|
});
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
import FireRouter from '@/views/host/ssh/index.vue';
|
import FireRouter from '@/views/host/ssh/index.vue';
|
||||||
import { ref, onMounted, onUnmounted, reactive } from 'vue';
|
import { ref, onMounted, onUnmounted, reactive } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { StopProcess } from '@/api/modules/process';
|
import { stopProcess } from '@/api/modules/process';
|
||||||
import { MsgError, MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
const sshSearch = reactive({
|
const sshSearch = reactive({
|
||||||
@ -39,7 +39,7 @@ const buttons = [
|
|||||||
{
|
{
|
||||||
label: i18n.global.t('ssh.disconnect'),
|
label: i18n.global.t('ssh.disconnect'),
|
||||||
click: function (row: any) {
|
click: function (row: any) {
|
||||||
stopProcess(row.PID);
|
stop(row.PID);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -97,7 +97,7 @@ const search = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const stopProcess = async (PID: number) => {
|
const stop = async (PID: number) => {
|
||||||
ElMessageBox.confirm(i18n.global.t('ssh.stopSSHWarn'), i18n.global.t('ssh.disconnect'), {
|
ElMessageBox.confirm(i18n.global.t('ssh.stopSSHWarn'), i18n.global.t('ssh.disconnect'), {
|
||||||
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
||||||
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||||
@ -105,7 +105,7 @@ const stopProcess = async (PID: number) => {
|
|||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
try {
|
try {
|
||||||
await StopProcess({ PID: PID });
|
await stopProcess({ PID: PID });
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
MsgError(error);
|
MsgError(error);
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ListWebsites, OpWebsiteLog } from '@/api/modules/website';
|
import { listWebsites, opWebsiteLog } from '@/api/modules/website';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { ref, nextTick } from 'vue';
|
import { ref, nextTick } from 'vue';
|
||||||
@ -89,7 +89,7 @@ const searchLog = () => {
|
|||||||
|
|
||||||
const getWebsites = async () => {
|
const getWebsites = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await ListWebsites()
|
await listWebsites()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
websites.value = res.data || [];
|
websites.value = res.data || [];
|
||||||
if (websites.value.length > 0) {
|
if (websites.value.length > 0) {
|
||||||
@ -130,12 +130,6 @@ const changeTail = () => {
|
|||||||
logRef.value.changeTail(true);
|
logRef.value.changeTail(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
// const onCloseLog = async () => {
|
|
||||||
// tailLog.value = false;
|
|
||||||
// clearInterval(Number(timer));
|
|
||||||
// timer = null;
|
|
||||||
// };
|
|
||||||
|
|
||||||
const onSubmitClean = async () => {
|
const onSubmitClean = async () => {
|
||||||
const req = {
|
const req = {
|
||||||
id: logConfig.id,
|
id: logConfig.id,
|
||||||
@ -143,7 +137,7 @@ const onSubmitClean = async () => {
|
|||||||
logType: logConfig.name,
|
logType: logConfig.name,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
OpWebsiteLog(req)
|
opWebsiteLog(req)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
searchLog();
|
searchLog();
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { dateFormatSimple, getProvider } from '@/utils/util';
|
import { dateFormatSimple, getProvider } from '@/utils/util';
|
||||||
import { ListSSL } from '@/api/modules/website';
|
import { listSSL } from '@/api/modules/website';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -172,7 +172,7 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
|
|||||||
|
|
||||||
if (params.sslInfo?.sslID) {
|
if (params.sslInfo?.sslID) {
|
||||||
form.sslID = params.sslInfo.sslID;
|
form.sslID = params.sslInfo.sslID;
|
||||||
const ssls = await ListSSL({});
|
const ssls = await listSSL({});
|
||||||
sslList.value = ssls.data || [];
|
sslList.value = ssls.data || [];
|
||||||
changeSSl(params.sslInfo?.sslID);
|
changeSSl(params.sslInfo?.sslID);
|
||||||
} else {
|
} else {
|
||||||
@ -183,7 +183,7 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
|
|||||||
const emit = defineEmits<{ (e: 'search'): void }>();
|
const emit = defineEmits<{ (e: 'search'): void }>();
|
||||||
|
|
||||||
const loadSSLs = async () => {
|
const loadSSLs = async () => {
|
||||||
const res = await ListSSL({});
|
const res = await listSSL({});
|
||||||
sslList.value = res.data || [];
|
sslList.value = res.data || [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ import type { ElForm } from 'element-plus';
|
|||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { GetGroupList } from '@/api/modules/group';
|
import { getGroupList } from '@/api/modules/group';
|
||||||
|
|
||||||
const loading = ref();
|
const loading = ref();
|
||||||
const data = ref();
|
const data = ref();
|
||||||
@ -160,7 +160,7 @@ let commandInfo = reactive<Command.CommandOperate>({
|
|||||||
const cmdVisible = ref<boolean>(false);
|
const cmdVisible = ref<boolean>(false);
|
||||||
|
|
||||||
const loadGroups = async () => {
|
const loadGroups = async () => {
|
||||||
const res = await GetGroupList('command');
|
const res = await getGroupList('command');
|
||||||
groupList.value = res.data;
|
groupList.value = res.data;
|
||||||
for (const group of groupList.value) {
|
for (const group of groupList.value) {
|
||||||
if (group.isDefault) {
|
if (group.isDefault) {
|
||||||
|
@ -32,7 +32,7 @@ import { ref, reactive } from 'vue';
|
|||||||
import type { ElForm } from 'element-plus';
|
import type { ElForm } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { editHostGroup } from '@/api/modules/terminal';
|
import { editHostGroup } from '@/api/modules/terminal';
|
||||||
import { GetGroupList } from '@/api/modules/group';
|
import { getGroupList } from '@/api/modules/group';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ const rules = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const loadGroups = async (groupName: string) => {
|
const loadGroups = async (groupName: string) => {
|
||||||
const res = await GetGroupList('host');
|
const res = await getGroupList('host');
|
||||||
groupList.value = res.data;
|
groupList.value = res.data;
|
||||||
for (const group of groupList.value) {
|
for (const group of groupList.value) {
|
||||||
if (group.name === groupName) {
|
if (group.name === groupName) {
|
||||||
|
@ -62,7 +62,7 @@ import GroupDialog from '@/components/group/index.vue';
|
|||||||
import GroupChangeDialog from '@/components/group/change.vue';
|
import GroupChangeDialog from '@/components/group/change.vue';
|
||||||
import OperateDialog from '@/views/terminal/host/operate/index.vue';
|
import OperateDialog from '@/views/terminal/host/operate/index.vue';
|
||||||
import { deleteHost, editHostGroup, searchHosts } from '@/api/modules/terminal';
|
import { deleteHost, editHostGroup, searchHosts } from '@/api/modules/terminal';
|
||||||
import { GetGroupList } from '@/api/modules/group';
|
import { getGroupList } from '@/api/modules/group';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Host } from '@/api/interface/host';
|
import { Host } from '@/api/interface/host';
|
||||||
@ -138,7 +138,7 @@ const onBatchDelete = async (row: Host.Host | null) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const loadGroups = async () => {
|
const loadGroups = async () => {
|
||||||
const res = await GetGroupList('host');
|
const res = await getGroupList('host');
|
||||||
groupList.value = res.data;
|
groupList.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ import { ref, reactive } from 'vue';
|
|||||||
import type { ElForm } from 'element-plus';
|
import type { ElForm } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { addHost, editHost, testByInfo } from '@/api/modules/terminal';
|
import { addHost, editHost, testByInfo } from '@/api/modules/terminal';
|
||||||
import { GetGroupList } from '@/api/modules/group';
|
import { getGroupList } from '@/api/modules/group';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgError, MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ function checkName(rule: any, value: any, callback: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loadGroups = async () => {
|
const loadGroups = async () => {
|
||||||
const res = await GetGroupList('host');
|
const res = await getGroupList('host');
|
||||||
groupList.value = res.data;
|
groupList.value = res.data;
|
||||||
if (dialogData.value.title === 'create') {
|
if (dialogData.value.title === 'create') {
|
||||||
for (const item of groupList.value) {
|
for (const item of groupList.value) {
|
||||||
|
@ -80,7 +80,7 @@ import { addHost, testByInfo } from '@/api/modules/terminal';
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { MsgError, MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
import { GetGroupList } from '@/api/modules/group';
|
import { getGroupList } from '@/api/modules/group';
|
||||||
|
|
||||||
const dialogVisible = ref();
|
const dialogVisible = ref();
|
||||||
const isOK = ref(false);
|
const isOK = ref(false);
|
||||||
@ -176,7 +176,7 @@ const submitAddHost = (formEl: FormInstance | undefined, ops: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const loadGroups = async () => {
|
const loadGroups = async () => {
|
||||||
const res = await GetGroupList('host');
|
const res = await getGroupList('host');
|
||||||
groupList.value = res.data;
|
groupList.value = res.data;
|
||||||
for (const item of groupList.value) {
|
for (const item of groupList.value) {
|
||||||
if (item.isDefault) {
|
if (item.isDefault) {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { HostTool } from '@/api/interface/host-tool';
|
import { HostTool } from '@/api/interface/host-tool';
|
||||||
import { GetSupervisorStatus, InitSupervisor } from '@/api/modules/host-tool';
|
import { getSupervisorStatus, initSupervisor } from '@/api/modules/host-tool';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -47,7 +47,7 @@ const data = ref({
|
|||||||
const getStatus = async () => {
|
const getStatus = async () => {
|
||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await GetSupervisorStatus();
|
const res = await getSupervisorStatus();
|
||||||
data.value = res.data.config as HostTool.Supersivor;
|
data.value = res.data.config as HostTool.Supersivor;
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -60,7 +60,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
InitSupervisor({
|
initSupervisor({
|
||||||
type: 'supervisord',
|
type: 'supervisord',
|
||||||
configPath: data.value.configPath,
|
configPath: data.value.configPath,
|
||||||
serviceName: data.value.serviceName,
|
serviceName: data.value.serviceName,
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { GetSupervisorLog } from '@/api/modules/host-tool';
|
import { getSupervisorLog } from '@/api/modules/host-tool';
|
||||||
import LogPro from '@/components/log-pro/index.vue';
|
import LogPro from '@/components/log-pro/index.vue';
|
||||||
|
|
||||||
let content = ref('');
|
let content = ref('');
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
|
|
||||||
const getConfig = async () => {
|
const getConfig = async () => {
|
||||||
const res = await GetSupervisorLog();
|
const res = await getSupervisorLog();
|
||||||
content.value = res.data;
|
content.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { OperateSupervisorConfig } from '@/api/modules/host-tool';
|
import { operateSupervisorConfig } from '@/api/modules/host-tool';
|
||||||
|
|
||||||
let data = ref();
|
let data = ref();
|
||||||
let content = ref('');
|
let content = ref('');
|
||||||
@ -20,7 +20,7 @@ let loading = ref(false);
|
|||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
OperateSupervisorConfig({ type: 'supervisord', operate: 'set', content: content.value })
|
operateSupervisorConfig({ type: 'supervisord', operate: 'set', content: content.value })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
getConfig();
|
getConfig();
|
||||||
@ -31,7 +31,7 @@ const submit = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getConfig = async () => {
|
const getConfig = async () => {
|
||||||
const res = await OperateSupervisorConfig({ type: 'supervisord', operate: 'get' });
|
const res = await operateSupervisorConfig({ type: 'supervisord', operate: 'get' });
|
||||||
data.value = res.data;
|
data.value = res.data;
|
||||||
content.value = data.value.content;
|
content.value = data.value.content;
|
||||||
};
|
};
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { CreateSupervisorProcess } from '@/api/modules/host-tool';
|
import { createSupervisorProcess } from '@/api/modules/host-tool';
|
||||||
import { Rules, checkNumberRange } from '@/global/form-rules';
|
import { Rules, checkNumberRange } from '@/global/form-rules';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@ -114,7 +114,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
process.value.numprocs = String(process.value.numprocsNum);
|
process.value.numprocs = String(process.value.numprocsNum);
|
||||||
CreateSupervisorProcess(process.value)
|
createSupervisorProcess(process.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
open.value = false;
|
open.value = false;
|
||||||
em('close', open);
|
em('close', open);
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onUnmounted, reactive, ref, watch } from 'vue';
|
import { onUnmounted, reactive, ref, watch } from 'vue';
|
||||||
import { OperateSupervisorProcessFile } from '@/api/modules/host-tool';
|
import { operateSupervisorProcessFile } from '@/api/modules/host-tool';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { TabsPaneContext } from 'element-plus';
|
import { TabsPaneContext } from 'element-plus';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -54,13 +54,9 @@ let timer: NodeJS.Timer | null = null;
|
|||||||
|
|
||||||
const em = defineEmits(['search']);
|
const em = defineEmits(['search']);
|
||||||
|
|
||||||
watch(open, (val) => {
|
|
||||||
if (screenfull.isEnabled && !val && !mobile.value) screenfull.exit();
|
|
||||||
});
|
|
||||||
|
|
||||||
const getContent = () => {
|
const getContent = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
OperateSupervisorProcessFile(req)
|
operateSupervisorProcessFile(req)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
content.value = res.data;
|
content.value = res.data;
|
||||||
})
|
})
|
||||||
@ -97,7 +93,7 @@ const submit = () => {
|
|||||||
content: content.value,
|
content: content.value,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
OperateSupervisorProcessFile(updateReq)
|
operateSupervisorProcessFile(updateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
em('search');
|
em('search');
|
||||||
open.value = false;
|
open.value = false;
|
||||||
@ -124,7 +120,7 @@ const cleanLog = async () => {
|
|||||||
title: i18n.global.t('commons.msg.clean'),
|
title: i18n.global.t('commons.msg.clean'),
|
||||||
names: [req.name],
|
names: [req.name],
|
||||||
msg: i18n.global.t('commons.msg.operatorHelper', [log, i18n.global.t('commons.msg.clean')]),
|
msg: i18n.global.t('commons.msg.operatorHelper', [log, i18n.global.t('commons.msg.clean')]),
|
||||||
api: OperateSupervisorProcessFile,
|
api: operateSupervisorProcessFile,
|
||||||
params: { name: req.name, operate: 'clear', file: req.file },
|
params: { name: req.name, operate: 'clear', file: req.file },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -145,7 +145,7 @@ import ConfigSuperVisor from './config/index.vue';
|
|||||||
import { computed, onMounted } from 'vue';
|
import { computed, onMounted } from 'vue';
|
||||||
import Create from './create/index.vue';
|
import Create from './create/index.vue';
|
||||||
import File from './file/index.vue';
|
import File from './file/index.vue';
|
||||||
import { GetSupervisorProcess, OperateSupervisorProcess } from '@/api/modules/host-tool';
|
import { getSupervisorProcess, operateSupervisorProcess } from '@/api/modules/host-tool';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { HostTool } from '@/api/interface/host-tool';
|
import { HostTool } from '@/api/interface/host-tool';
|
||||||
@ -212,7 +212,7 @@ const search = async () => {
|
|||||||
let needLoadStatus = false;
|
let needLoadStatus = false;
|
||||||
dataLoading.value = true;
|
dataLoading.value = true;
|
||||||
try {
|
try {
|
||||||
const res = await GetSupervisorProcess();
|
const res = await getSupervisorProcess();
|
||||||
data.value = res.data;
|
data.value = res.data;
|
||||||
for (const process of data.value) {
|
for (const process of data.value) {
|
||||||
if (process.status && process.status.length > 0) {
|
if (process.status && process.status.length > 0) {
|
||||||
@ -234,7 +234,7 @@ const search = async () => {
|
|||||||
const loadStatus = async () => {
|
const loadStatus = async () => {
|
||||||
let needLoadStatus = false;
|
let needLoadStatus = false;
|
||||||
try {
|
try {
|
||||||
const res = await GetSupervisorProcess();
|
const res = await getSupervisorProcess();
|
||||||
const stats = res.data || [];
|
const stats = res.data || [];
|
||||||
for (const process of data.value) {
|
for (const process of data.value) {
|
||||||
for (const item of stats) {
|
for (const item of stats) {
|
||||||
@ -285,7 +285,7 @@ const operate = async (operation: string, name: string) => {
|
|||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
OperateSupervisorProcess({ operate: operation, name: name })
|
operateSupervisorProcess({ operate: operation, name: name })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GetSupervisorStatus, OperateSupervisor } from '@/api/modules/host-tool';
|
import { getSupervisorStatus, operateSupervisor } from '@/api/modules/host-tool';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import Status from '@/components/status/index.vue';
|
import Status from '@/components/status/index.vue';
|
||||||
import { ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
@ -118,7 +118,7 @@ const onOperate = async (operation: string) => {
|
|||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
em('update:loading', true);
|
em('update:loading', true);
|
||||||
OperateSupervisor(operation)
|
operateSupervisor(operation)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
em('update:maskShow', true);
|
em('update:maskShow', true);
|
||||||
getStatus();
|
getStatus();
|
||||||
@ -138,7 +138,7 @@ const getStatus = async () => {
|
|||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
em('update:loading', true);
|
em('update:loading', true);
|
||||||
const res = await GetSupervisorStatus();
|
const res = await getSupervisorStatus();
|
||||||
if (res.data.config) {
|
if (res.data.config) {
|
||||||
data.value = res.data.config as HostTool.Supersivor;
|
data.value = res.data.config as HostTool.Supersivor;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { InitSupervisor } from '@/api/modules/host-tool';
|
import { initSupervisor } from '@/api/modules/host-tool';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
@ -90,7 +90,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
InitSupervisor({
|
initSupervisor({
|
||||||
type: 'supervisord',
|
type: 'supervisord',
|
||||||
configPath: initModel.value.primaryConfig,
|
configPath: initModel.value.primaryConfig,
|
||||||
serviceName: initModel.value.serviceName,
|
serviceName: initModel.value.serviceName,
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { GetApp, GetAppDetail, SearchApp } from '@/api/modules/app';
|
import { getAppByKey, getAppDetail, searchApp } from '@/api/modules/app';
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { defineProps } from 'vue';
|
import { defineProps } from 'vue';
|
||||||
|
|
||||||
@ -72,14 +72,14 @@ const changeApp = (appID: number) => {
|
|||||||
|
|
||||||
const changeVersion = async () => {
|
const changeVersion = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await GetAppDetail(runtime.value.appID, runtime.value.version, 'runtime');
|
const res = await getAppDetail(runtime.value.appID, runtime.value.version, 'runtime');
|
||||||
runtime.value.appDetailID = res.data.id;
|
runtime.value.appDetailID = res.data.id;
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getApp = async (appkey: string, mode: string) => {
|
const getApp = async (appkey: string, mode: string) => {
|
||||||
try {
|
try {
|
||||||
const res = await GetApp(appkey);
|
const res = await getAppByKey(appkey);
|
||||||
appVersions.value = res.data.versions || [];
|
appVersions.value = res.data.versions || [];
|
||||||
if (res.data.versions.length > 0) {
|
if (res.data.versions.length > 0) {
|
||||||
if (mode === 'create') {
|
if (mode === 'create') {
|
||||||
@ -90,9 +90,9 @@ const getApp = async (appkey: string, mode: string) => {
|
|||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
const searchApp = async (appID: number) => {
|
const searchAppList = async (appID: number) => {
|
||||||
try {
|
try {
|
||||||
const res = await SearchApp(appReq);
|
const res = await searchApp(appReq);
|
||||||
apps.value = res.data.items || [];
|
apps.value = res.data.items || [];
|
||||||
if (res.data && res.data.items && res.data.items.length > 0) {
|
if (res.data && res.data.items && res.data.items.length > 0) {
|
||||||
if (appID == null) {
|
if (appID == null) {
|
||||||
@ -111,9 +111,9 @@ const searchApp = async (appID: number) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.mode === 'create') {
|
if (props.mode === 'create') {
|
||||||
searchApp(null);
|
searchAppList(null);
|
||||||
} else {
|
} else {
|
||||||
searchApp(runtime.value.appID);
|
searchAppList(runtime.value.appID);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -181,7 +181,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { Runtime } from '@/api/interface/runtime';
|
import { Runtime } from '@/api/interface/runtime';
|
||||||
import { GetApp, GetAppDetail, SearchApp } from '@/api/modules/app';
|
import { getAppByKey, getAppDetail, searchApp } from '@/api/modules/app';
|
||||||
import { CreateRuntime, GetRuntime, ListPHPExtensions, UpdateRuntime } from '@/api/modules/runtime';
|
import { CreateRuntime, GetRuntime, ListPHPExtensions, UpdateRuntime } from '@/api/modules/runtime';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@ -308,12 +308,12 @@ const changeResource = (resource: string) => {
|
|||||||
runtime.image = '';
|
runtime.image = '';
|
||||||
} else {
|
} else {
|
||||||
runtime.version = '';
|
runtime.version = '';
|
||||||
searchApp(null);
|
searchAppList(null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const searchApp = (appId: number) => {
|
const searchAppList = (appId: number) => {
|
||||||
SearchApp(appReq).then((res) => {
|
searchApp(appReq).then((res) => {
|
||||||
apps.value = res.data.items || [];
|
apps.value = res.data.items || [];
|
||||||
if (res.data && res.data.items && res.data.items.length > 0) {
|
if (res.data && res.data.items && res.data.items.length > 0) {
|
||||||
if (appId == null) {
|
if (appId == null) {
|
||||||
@ -349,7 +349,7 @@ const changeVersion = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
initParam.value = false;
|
initParam.value = false;
|
||||||
extensions.value = undefined;
|
extensions.value = undefined;
|
||||||
GetAppDetail(runtime.appID, runtime.version, 'runtime')
|
getAppDetail(runtime.appID, runtime.version, 'runtime')
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
runtime.appDetailID = res.data.id;
|
runtime.appDetailID = res.data.id;
|
||||||
runtime.image = res.data.image + ':' + runtime.version;
|
runtime.image = res.data.image + ':' + runtime.version;
|
||||||
@ -371,7 +371,7 @@ const changeVersion = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getApp = (appkey: string, mode: string) => {
|
const getApp = (appkey: string, mode: string) => {
|
||||||
GetApp(appkey).then((res) => {
|
getAppByKey(appkey).then((res) => {
|
||||||
appVersions.value = res.data.versions || [];
|
appVersions.value = res.data.versions || [];
|
||||||
if (res.data.versions.length > 0) {
|
if (res.data.versions.length > 0) {
|
||||||
runtime.version = res.data.versions[0];
|
runtime.version = res.data.versions[0];
|
||||||
@ -470,9 +470,9 @@ const acceptParams = async (props: OperateRrops) => {
|
|||||||
initParam.value = false;
|
initParam.value = false;
|
||||||
if (props.mode === 'create') {
|
if (props.mode === 'create') {
|
||||||
Object.assign(runtime, initData(props.type));
|
Object.assign(runtime, initData(props.type));
|
||||||
searchApp(null);
|
searchAppList(null);
|
||||||
} else {
|
} else {
|
||||||
searchApp(props.appID);
|
searchAppList(props.appID);
|
||||||
getRuntime(props.id);
|
getRuntime(props.id);
|
||||||
}
|
}
|
||||||
extensions.value = '';
|
extensions.value = '';
|
||||||
@ -480,6 +480,16 @@ const acceptParams = async (props: OperateRrops) => {
|
|||||||
listPHPExtensions();
|
listPHPExtensions();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => runtime.name,
|
||||||
|
(newVal) => {
|
||||||
|
if (newVal && mode.value == 'create') {
|
||||||
|
runtime.params['CONTAINER_NAME'] = newVal;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true },
|
||||||
|
);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
acceptParams,
|
acceptParams,
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { CreateSupervisorProcess } from '@/api/modules/runtime';
|
import { createSupervisorProcess } from '@/api/modules/runtime';
|
||||||
import { Rules, checkNumberRange } from '@/global/form-rules';
|
import { Rules, checkNumberRange } from '@/global/form-rules';
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@ -115,7 +115,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
process.value.numprocs = String(process.value.numprocsNum);
|
process.value.numprocs = String(process.value.numprocsNum);
|
||||||
CreateSupervisorProcess(process.value)
|
createSupervisorProcess(process.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
open.value = false;
|
open.value = false;
|
||||||
em('close', open);
|
em('close', open);
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onUnmounted, reactive, ref } from 'vue';
|
import { onUnmounted, reactive, ref } from 'vue';
|
||||||
import { OperateSupervisorProcessFile } from '@/api/modules/runtime';
|
import { operateSupervisorProcessFile } from '@/api/modules/runtime';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { TabsPaneContext } from 'element-plus';
|
import { TabsPaneContext } from 'element-plus';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -55,7 +55,7 @@ const em = defineEmits(['search']);
|
|||||||
|
|
||||||
const getContent = () => {
|
const getContent = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
OperateSupervisorProcessFile(req)
|
operateSupervisorProcessFile(req)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
content.value = res.data;
|
content.value = res.data;
|
||||||
})
|
})
|
||||||
@ -93,7 +93,7 @@ const submit = () => {
|
|||||||
id: req.id,
|
id: req.id,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
OperateSupervisorProcessFile(updateReq)
|
operateSupervisorProcessFile(updateReq)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
em('search');
|
em('search');
|
||||||
open.value = false;
|
open.value = false;
|
||||||
@ -121,7 +121,7 @@ const cleanLog = async () => {
|
|||||||
title: i18n.global.t('commons.msg.clean'),
|
title: i18n.global.t('commons.msg.clean'),
|
||||||
names: [req.name],
|
names: [req.name],
|
||||||
msg: i18n.global.t('commons.msg.operatorHelper', [log, i18n.global.t('commons.msg.clean')]),
|
msg: i18n.global.t('commons.msg.operatorHelper', [log, i18n.global.t('commons.msg.clean')]),
|
||||||
api: OperateSupervisorProcessFile,
|
api: operateSupervisorProcessFile,
|
||||||
params: { name: req.name, operate: 'clear', file: req.file },
|
params: { name: req.name, operate: 'clear', file: req.file },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -123,7 +123,7 @@ import { ref } from '@vue/runtime-core';
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import Create from './create/index.vue';
|
import Create from './create/index.vue';
|
||||||
import File from './file/index.vue';
|
import File from './file/index.vue';
|
||||||
import { GetSupervisorProcess, OperateSupervisorProcess } from '@/api/modules/runtime';
|
import { GetSupervisorProcess, operateSupervisorProcess } from '@/api/modules/runtime';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { HostTool } from '@/api/interface/host-tool';
|
import { HostTool } from '@/api/interface/host-tool';
|
||||||
@ -229,7 +229,7 @@ const operate = async (operation: string, name: string) => {
|
|||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
OperateSupervisorProcess({ operate: operation, name: name, id: runtimeID.value })
|
operateSupervisorProcess({ operate: operation, name: name, id: runtimeID.value })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { CreateAcmeAccount } from '@/api/modules/website';
|
import { createAcmeAccount } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { AcmeAccountTypes, KeyTypes } from '@/global/mimetype';
|
import { AcmeAccountTypes, KeyTypes } from '@/global/mimetype';
|
||||||
@ -115,7 +115,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
CreateAcmeAccount(account.value)
|
createAcmeAccount(account.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { DeleteAcmeAccount, SearchAcmeAccount } from '@/api/modules/website';
|
import { deleteAcmeAccount, searchAcmeAccount } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import Create from './create/index.vue';
|
import Create from './create/index.vue';
|
||||||
@ -79,7 +79,7 @@ const search = async () => {
|
|||||||
page: paginationConfig.currentPage,
|
page: paginationConfig.currentPage,
|
||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
};
|
};
|
||||||
await SearchAcmeAccount(req).then((res) => {
|
await searchAcmeAccount(req).then((res) => {
|
||||||
data.value = res.data.items;
|
data.value = res.data.items;
|
||||||
paginationConfig.total = res.data.total;
|
paginationConfig.total = res.data.total;
|
||||||
});
|
});
|
||||||
@ -101,7 +101,7 @@ const deleteAccount = async (row: any) => {
|
|||||||
i18n.global.t('website.acmeAccountManage'),
|
i18n.global.t('website.acmeAccountManage'),
|
||||||
i18n.global.t('commons.button.delete'),
|
i18n.global.t('commons.button.delete'),
|
||||||
]),
|
]),
|
||||||
api: DeleteAcmeAccount,
|
api: deleteAcmeAccount,
|
||||||
params: { id: row.id },
|
params: { id: row.id },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { GetDnsResolve, ObtainSSL } from '@/api/modules/website';
|
import { getDnsResolve, obtainSSL } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
@ -60,10 +60,10 @@ const acceptParams = async (props: RenewProps) => {
|
|||||||
open.value = true;
|
open.value = true;
|
||||||
dnsResolve.value = [];
|
dnsResolve.value = [];
|
||||||
sslID.value = props.ssl.id;
|
sslID.value = props.ssl.id;
|
||||||
getDnsResolve(props.ssl);
|
getDnsResolveRes(props.ssl);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getDnsResolve = async (row: Website.SSL) => {
|
const getDnsResolveRes = async (row: Website.SSL) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
let domains = [row.primaryDomain];
|
let domains = [row.primaryDomain];
|
||||||
@ -72,7 +72,7 @@ const getDnsResolve = async (row: Website.SSL) => {
|
|||||||
domains = domains.concat(otherDomains);
|
domains = domains.concat(otherDomains);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await GetDnsResolve({ acmeAccountId: row.acmeAccountId, domains: domains });
|
const res = await getDnsResolve({ acmeAccountId: row.acmeAccountId, domains: domains });
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
dnsResolve.value = res.data;
|
dnsResolve.value = res.data;
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ const getDnsResolve = async (row: Website.SSL) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
ObtainSSL({ ID: sslID.value })
|
obtainSSL({ ID: sslID.value })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('ssl.applyStart'));
|
MsgSuccess(i18n.global.t('ssl.applyStart'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -53,7 +53,7 @@ import { ref } from 'vue';
|
|||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import { KeyTypes } from '@/global/mimetype';
|
import { KeyTypes } from '@/global/mimetype';
|
||||||
import { CreateCA } from '@/api/modules/website';
|
import { createCA } from '@/api/modules/website';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
CreateCA(ca.value)
|
createCA(ca.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
</DrawerPro>
|
</DrawerPro>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GetCA } from '@/api/modules/website';
|
import { getCA } from '@/api/modules/website';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
@ -71,7 +71,7 @@ const acceptParams = (caID: number) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const get = async () => {
|
const get = async () => {
|
||||||
const res = await GetCA(id.value);
|
const res = await getCA(id.value);
|
||||||
ca.value = res.data;
|
ca.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { DeleteCA, SearchCAs, DownloadCAFile } from '@/api/modules/website';
|
import { deleteCA, searchCAs, downloadCAFile } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import Create from './create/index.vue';
|
import Create from './create/index.vue';
|
||||||
@ -80,7 +80,7 @@ const buttons = [
|
|||||||
{
|
{
|
||||||
label: i18n.global.t('commons.button.delete'),
|
label: i18n.global.t('commons.button.delete'),
|
||||||
click: function (row: Website.CA) {
|
click: function (row: Website.CA) {
|
||||||
deleteCA(row);
|
deleteca(row);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -99,7 +99,7 @@ const search = async () => {
|
|||||||
page: paginationConfig.currentPage,
|
page: paginationConfig.currentPage,
|
||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
};
|
};
|
||||||
await SearchCAs(req).then((res) => {
|
await searchCAs(req).then((res) => {
|
||||||
data.value = res.data.items;
|
data.value = res.data.items;
|
||||||
paginationConfig.total = res.data.total;
|
paginationConfig.total = res.data.total;
|
||||||
});
|
});
|
||||||
@ -114,7 +114,7 @@ const handleClose = () => {
|
|||||||
open.value = false;
|
open.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteCA = async (row: any) => {
|
const deleteca = async (row: any) => {
|
||||||
opRef.value.acceptParams({
|
opRef.value.acceptParams({
|
||||||
title: i18n.global.t('commons.button.delete'),
|
title: i18n.global.t('commons.button.delete'),
|
||||||
names: [row.name],
|
names: [row.name],
|
||||||
@ -122,14 +122,14 @@ const deleteCA = async (row: any) => {
|
|||||||
i18n.global.t('website.ca'),
|
i18n.global.t('website.ca'),
|
||||||
i18n.global.t('commons.button.delete'),
|
i18n.global.t('commons.button.delete'),
|
||||||
]),
|
]),
|
||||||
api: DeleteCA,
|
api: deleteCA,
|
||||||
params: { id: row.id },
|
params: { id: row.id },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDownload = (row: Website.CA) => {
|
const onDownload = (row: Website.CA) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
DownloadCAFile({ id: row.id })
|
downloadCAFile({ id: row.id })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const downloadUrl = window.URL.createObjectURL(new Blob([res]));
|
const downloadUrl = window.URL.createObjectURL(new Blob([res]));
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ObtainSSLByCA } from '@/api/modules/website';
|
import { obtainSSLByCA } from '@/api/modules/website';
|
||||||
import { Rules, checkNumberRange } from '@/global/form-rules';
|
import { Rules, checkNumberRange } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -138,7 +138,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
ObtainSSLByCA(obtain.value)
|
obtainSSLByCA(obtain.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { CreateSSL, ListWebsites, SearchAcmeAccount, SearchDnsAccount, UpdateSSL } from '@/api/modules/website';
|
import { createSSL, listWebsites, searchAcmeAccount, searchDnsAccount, updateSSL } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
@ -265,7 +265,7 @@ const acceptParams = (op: string, websiteSSL: Website.SSLDTO) => {
|
|||||||
ssl.value.websiteId = Number(id.value);
|
ssl.value.websiteId = Number(id.value);
|
||||||
getAcmeAccounts();
|
getAcmeAccounts();
|
||||||
getDnsAccounts();
|
getDnsAccounts();
|
||||||
listwebsites();
|
getwebsites();
|
||||||
open.value = true;
|
open.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ const getPath = (dir: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getAcmeAccounts = async () => {
|
const getAcmeAccounts = async () => {
|
||||||
const res = await SearchAcmeAccount(acmeReq);
|
const res = await searchAcmeAccount(acmeReq);
|
||||||
acmeAccounts.value = res.data.items || [];
|
acmeAccounts.value = res.data.items || [];
|
||||||
if (acmeAccounts.value.length > 0 && ssl.value.acmeAccountId == undefined) {
|
if (acmeAccounts.value.length > 0 && ssl.value.acmeAccountId == undefined) {
|
||||||
ssl.value.acmeAccountId = res.data.items[0].id;
|
ssl.value.acmeAccountId = res.data.items[0].id;
|
||||||
@ -282,7 +282,7 @@ const getAcmeAccounts = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getDnsAccounts = async () => {
|
const getDnsAccounts = async () => {
|
||||||
const res = await SearchDnsAccount(dnsReq);
|
const res = await searchDnsAccount(dnsReq);
|
||||||
dnsAccounts.value = res.data.items || [];
|
dnsAccounts.value = res.data.items || [];
|
||||||
if (dnsAccounts.value.length > 0 && ssl.value.dnsAccountId == undefined) {
|
if (dnsAccounts.value.length > 0 && ssl.value.dnsAccountId == undefined) {
|
||||||
ssl.value.dnsAccountId = res.data.items[0].id;
|
ssl.value.dnsAccountId = res.data.items[0].id;
|
||||||
@ -293,8 +293,8 @@ const changeProvider = () => {
|
|||||||
dnsResolve.value = [];
|
dnsResolve.value = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
const listwebsites = async () => {
|
const getwebsites = async () => {
|
||||||
const res = await ListWebsites();
|
const res = await listWebsites();
|
||||||
websites.value = res.data;
|
websites.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if (operate.value == 'create') {
|
if (operate.value == 'create') {
|
||||||
CreateSSL(ssl.value)
|
createSSL(ssl.value)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (ssl.value.provider != 'dnsManual') {
|
if (ssl.value.provider != 'dnsManual') {
|
||||||
em('submit', res.data.id);
|
em('submit', res.data.id);
|
||||||
@ -355,7 +355,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
execShell: ssl.value.execShell,
|
execShell: ssl.value.execShell,
|
||||||
shell: ssl.value.shell,
|
shell: ssl.value.shell,
|
||||||
};
|
};
|
||||||
UpdateSSL(sslUpdate)
|
updateSSL(sslUpdate)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
handleClose();
|
handleClose();
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
</DrawerPro>
|
</DrawerPro>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GetSSL } from '@/api/modules/website';
|
import { getSSL } from '@/api/modules/website';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { dateFormatSimple, getProvider, getDNSName } from '@/utils/util';
|
import { dateFormatSimple, getProvider, getDNSName } from '@/utils/util';
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ const acceptParams = (sslId: number) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const get = async () => {
|
const get = async () => {
|
||||||
const res = await GetSSL(id.value);
|
const res = await getSSL(id.value);
|
||||||
ssl.value = res.data;
|
ssl.value = res.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { CreateDnsAccount, UpdateDnsAccount } from '@/api/modules/website';
|
import { createDnsAccount, updateDnsAccount } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@ -181,7 +181,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
if (accountData.value.mode === 'edit') {
|
if (accountData.value.mode === 'edit') {
|
||||||
UpdateDnsAccount(account.value)
|
updateDnsAccount(account.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
@ -190,7 +190,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
CreateDnsAccount(account.value)
|
createDnsAccount(account.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
handleClose();
|
handleClose();
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Create from './create/index.vue';
|
import Create from './create/index.vue';
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { DeleteDnsAccount, SearchDnsAccount } from '@/api/modules/website';
|
import { deleteDnsAccount, searchDnsAccount } from '@/api/modules/website';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { getDNSName } from '@/utils/util';
|
import { getDNSName } from '@/utils/util';
|
||||||
@ -80,7 +80,7 @@ const search = () => {
|
|||||||
page: paginationConfig.currentPage,
|
page: paginationConfig.currentPage,
|
||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
};
|
};
|
||||||
SearchDnsAccount(req).then((res) => {
|
searchDnsAccount(req).then((res) => {
|
||||||
data.value = res.data.items;
|
data.value = res.data.items;
|
||||||
paginationConfig.total = res.data.total;
|
paginationConfig.total = res.data.total;
|
||||||
});
|
});
|
||||||
@ -102,7 +102,7 @@ const deleteAccount = async (row: any) => {
|
|||||||
i18n.global.t('website.dnsAccountManage'),
|
i18n.global.t('website.dnsAccountManage'),
|
||||||
i18n.global.t('commons.button.delete'),
|
i18n.global.t('commons.button.delete'),
|
||||||
]),
|
]),
|
||||||
api: DeleteDnsAccount,
|
api: deleteDnsAccount,
|
||||||
params: { id: row.id },
|
params: { id: row.id },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<el-button type="primary" plain @click="openDnsAccount()">
|
<el-button type="primary" plain @click="openDnsAccount()">
|
||||||
{{ $t('website.dnsAccountManage') }}
|
{{ $t('website.dnsAccountManage') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button plain @click="deleteSSL(null)" :disabled="selects.length === 0">
|
<el-button plain @click="deletessl(null)" :disabled="selects.length === 0">
|
||||||
{{ $t('commons.button.delete') }}
|
{{ $t('commons.button.delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -157,7 +157,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, reactive, ref, computed } from 'vue';
|
import { onMounted, reactive, ref, computed } from 'vue';
|
||||||
import { DeleteSSL, DownloadFile, SearchSSL, UpdateSSL } from '@/api/modules/website';
|
import { deleteSSL, downloadFile, searchSSL, updateSSL } from '@/api/modules/website';
|
||||||
import DnsAccount from './dns-account/index.vue';
|
import DnsAccount from './dns-account/index.vue';
|
||||||
import AcmeAccount from './acme-account/index.vue';
|
import AcmeAccount from './acme-account/index.vue';
|
||||||
import CA from './ca/index.vue';
|
import CA from './ca/index.vue';
|
||||||
@ -255,14 +255,14 @@ const buttons = [
|
|||||||
{
|
{
|
||||||
label: i18n.global.t('commons.button.delete'),
|
label: i18n.global.t('commons.button.delete'),
|
||||||
click: function (row: Website.SSLDTO) {
|
click: function (row: Website.SSLDTO) {
|
||||||
deleteSSL(row);
|
deletessl(row);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const onDownload = (ssl: Website.SSLDTO) => {
|
const onDownload = (ssl: Website.SSLDTO) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
DownloadFile({ id: ssl.id })
|
downloadFile({ id: ssl.id })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const downloadUrl = window.URL.createObjectURL(new Blob([res]));
|
const downloadUrl = window.URL.createObjectURL(new Blob([res]));
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
@ -287,7 +287,7 @@ const search = () => {
|
|||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
SearchSSL(req)
|
searchSSL(req)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
data.value = res.data.items || [];
|
data.value = res.data.items || [];
|
||||||
paginationConfig.total = res.data.total;
|
paginationConfig.total = res.data.total;
|
||||||
@ -304,7 +304,7 @@ const updateDesc = (row: Website.SSLDTO, bulr: Function) => {
|
|||||||
|
|
||||||
const updateConfig = (row: Website.SSLDTO) => {
|
const updateConfig = (row: Website.SSLDTO) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
UpdateSSL(row)
|
updateSSL(row)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
})
|
})
|
||||||
@ -347,7 +347,7 @@ const applySSL = (row: Website.SSLDTO) => {
|
|||||||
obtainRef.value.acceptParams({ ssl: row });
|
obtainRef.value.acceptParams({ ssl: row });
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteSSL = async (row: any) => {
|
const deletessl = async (row: any) => {
|
||||||
let names = [];
|
let names = [];
|
||||||
let params = {};
|
let params = {};
|
||||||
if (row == null) {
|
if (row == null) {
|
||||||
@ -365,7 +365,7 @@ const deleteSSL = async (row: any) => {
|
|||||||
i18n.global.t('website.ssl'),
|
i18n.global.t('website.ssl'),
|
||||||
i18n.global.t('commons.button.delete'),
|
i18n.global.t('commons.button.delete'),
|
||||||
]),
|
]),
|
||||||
api: DeleteSSL,
|
api: deleteSSL,
|
||||||
params: params,
|
params: params,
|
||||||
});
|
});
|
||||||
search();
|
search();
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Website } from '@/api/interface/website';
|
import { Website } from '@/api/interface/website';
|
||||||
import { ObtainSSL, RenewSSLByCA } from '@/api/modules/website';
|
import { obtainSSL, renewSSLByCA } from '@/api/modules/website';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
@ -55,9 +55,9 @@ const submit = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
if (ssl.value.provider == 'selfSigned') {
|
if (ssl.value.provider == 'selfSigned') {
|
||||||
await RenewSSLByCA({ SSLID: ssl.value.id });
|
await renewSSLByCA({ SSLID: ssl.value.id });
|
||||||
} else {
|
} else {
|
||||||
await ObtainSSL({ ID: ssl.value.id });
|
await obtainSSL({ ID: ssl.value.id });
|
||||||
}
|
}
|
||||||
handleClose();
|
handleClose();
|
||||||
MsgSuccess(i18n.global.t('ssl.applyStart'));
|
MsgSuccess(i18n.global.t('ssl.applyStart'));
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { UploadSSL } from '@/api/modules/website';
|
import { uploadSSL } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
@ -112,7 +112,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
UploadSSL(ssl.value)
|
uploadSSL(ssl.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
handleClose();
|
handleClose();
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GetAntiLeech, ListDomains, UpdateAntiLeech } from '@/api/modules/website';
|
import { getAntiLeech, listDomains, updateAntiLeech } from '@/api/modules/website';
|
||||||
import { Rules, checkNumberRange } from '@/global/form-rules';
|
import { Rules, checkNumberRange } from '@/global/form-rules';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { computed, onMounted, reactive } from 'vue';
|
import { computed, onMounted, reactive } from 'vue';
|
||||||
@ -108,7 +108,7 @@ const rules = ref({
|
|||||||
|
|
||||||
const changeEnable = (enable: boolean) => {
|
const changeEnable = (enable: boolean) => {
|
||||||
if (enable) {
|
if (enable) {
|
||||||
ListDomains(id.value)
|
listDomains(id.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const domains = res.data || [];
|
const domains = res.data || [];
|
||||||
let serverNameStr = '';
|
let serverNameStr = '';
|
||||||
@ -141,7 +141,7 @@ const changeEnable = (enable: boolean) => {
|
|||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await GetAntiLeech({ websiteID: id.value });
|
const res = await getAntiLeech({ websiteID: id.value });
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (!res.data.enable) {
|
if (!res.data.enable) {
|
||||||
return;
|
return;
|
||||||
@ -187,7 +187,7 @@ const update = async (enable: boolean) => {
|
|||||||
form.enable = enable;
|
form.enable = enable;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
form.websiteID = id.value;
|
form.websiteID = id.value;
|
||||||
await UpdateAntiLeech(form)
|
await updateAntiLeech(form)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
search();
|
search();
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { OperateAuthConfig, OperatePathAuthConfig } from '@/api/modules/website';
|
import { operateAuthConfig, operatePathAuthConfig } from '@/api/modules/website';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
@ -99,7 +99,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
if (authBasic.value.scope == 'root') {
|
if (authBasic.value.scope == 'root') {
|
||||||
await OperateAuthConfig(authBasic.value);
|
await operateAuthConfig(authBasic.value);
|
||||||
} else {
|
} else {
|
||||||
const req = {
|
const req = {
|
||||||
websiteID: authBasic.value.websiteID,
|
websiteID: authBasic.value.websiteID,
|
||||||
@ -110,7 +110,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
operate: authBasic.value.operate,
|
operate: authBasic.value.operate,
|
||||||
remark: authBasic.value.remark,
|
remark: authBasic.value.remark,
|
||||||
};
|
};
|
||||||
await OperatePathAuthConfig(req);
|
await operatePathAuthConfig(req);
|
||||||
}
|
}
|
||||||
if (authBasic.value.operate == 'create') {
|
if (authBasic.value.operate == 'create') {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user