Skip to content

Commit 9035445

Browse files
feat: Standardized interface name capitalization (#7770)
1 parent 6a8e419 commit 9035445

File tree

138 files changed

+686
-699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+686
-699
lines changed

agent/init/dir/dir.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func Init() {
3131
global.Dir.RecycleBinDir, _ = fileOp.CreateDirWithPath(true, "/.1panel_clash")
3232
global.Dir.SSLLogDir, _ = fileOp.CreateDirWithPath(true, path.Join(baseDir, "1panel/log/ssl"))
3333

34-
loadLocalDir()
34+
//loadLocalDir()
3535
}
3636

3737
func loadLocalDir() {

frontend/src/api/modules/app.ts

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,123 +3,119 @@ import { ResPage } from '../interface';
33
import { App } from '../interface/app';
44
import { TimeoutEnum } from '@/enums/http-enum';
55

6-
export const SyncApp = (req: App.AppStoreSync) => {
6+
export const syncApp = (req: App.AppStoreSync) => {
77
return http.post('apps/sync/remote', req);
88
};
99

10-
export const SyncLocalApp = (req: App.AppStoreSync) => {
10+
export const syncLocalApp = (req: App.AppStoreSync) => {
1111
return http.post('apps/sync/local', req);
1212
};
1313

14-
export const GetAppListUpdate = () => {
15-
return http.get<App.AppUpdateRes>('apps/checkupdate');
16-
};
17-
18-
export const SearchApp = (req: App.AppReq) => {
14+
export const searchApp = (req: App.AppReq) => {
1915
return http.post<App.AppResPage>('apps/search', req);
2016
};
2117

22-
export const GetApp = (key: string) => {
18+
export const getAppByKey = (key: string) => {
2319
return http.get<App.AppDTO>('apps/' + key);
2420
};
2521

26-
export const GetAppTags = () => {
22+
export const getAppTags = () => {
2723
return http.get<App.Tag[]>('apps/tags');
2824
};
2925

30-
export const GetAppDetail = (appID: number, version: string, type: string) => {
26+
export const getAppDetail = (appID: number, version: string, type: string) => {
3127
return http.get<App.AppDetail>(`apps/detail/${appID}/${version}/${type}`);
3228
};
3329

34-
export const GetAppDetailByID = (id: number) => {
30+
export const getAppDetailByID = (id: number) => {
3531
return http.get<App.AppDetail>(`apps/details/${id}`);
3632
};
3733

38-
export const InstallApp = (install: App.AppInstall) => {
34+
export const installApp = (install: App.AppInstall) => {
3935
return http.post<any>('apps/install', install);
4036
};
4137

42-
export const ChangePort = (params: App.ChangePort) => {
38+
export const changePort = (params: App.ChangePort) => {
4339
return http.post<any>('apps/installed/port/change', params);
4440
};
4541

46-
export const SearchAppInstalled = (search: App.AppInstallSearch) => {
42+
export const searchAppInstalled = (search: App.AppInstallSearch) => {
4743
return http.post<ResPage<App.AppInstallDto>>('apps/installed/search', search);
4844
};
4945

50-
export const ListAppInstalled = () => {
46+
export const listAppInstalled = () => {
5147
return http.get<Array<App.AppInstalledInfo>>('apps/installed/list');
5248
};
5349

54-
export const GetAppPort = (type: string, name: string) => {
50+
export const getAppPort = (type: string, name: string) => {
5551
return http.post<number>(`apps/installed/loadport`, { type: type, name: name });
5652
};
5753

58-
export const GetAppConnInfo = (type: string, name: string) => {
54+
export const getAppConnInfo = (type: string, name: string) => {
5955
return http.post<App.DatabaseConnInfo>(`apps/installed/conninfo`, { type: type, name: name });
6056
};
6157

62-
export const CheckAppInstalled = (key: string, name: string) => {
58+
export const checkAppInstalled = (key: string, name: string) => {
6359
return http.post<App.CheckInstalled>(`apps/installed/check`, { key: key, name: name });
6460
};
6561

66-
export const AppInstalledDeleteCheck = (appInstallId: number) => {
62+
export const appInstalledDeleteCheck = (appInstallId: number) => {
6763
return http.get<App.AppInstallResource[]>(`apps/installed/delete/check/${appInstallId}`);
6864
};
6965

70-
export const GetAppInstalled = (search: App.AppInstalledSearch) => {
66+
export const getAppInstalled = (search: App.AppInstalledSearch) => {
7167
return http.post<App.AppInstalled[]>('apps/installed/search', search);
7268
};
7369

74-
export const InstalledOp = (op: App.AppInstalledOp) => {
70+
export const installedOp = (op: App.AppInstalledOp) => {
7571
return http.post<any>('apps/installed/op', op, TimeoutEnum.T_40S);
7672
};
7773

78-
export const SyncInstalledApp = () => {
74+
export const syncInstalledApp = () => {
7975
return http.post<any>('apps/installed/sync', {});
8076
};
8177

82-
export const GetAppService = (key: string | undefined) => {
78+
export const getAppService = (key: string | undefined) => {
8379
return http.get<App.AppService[]>(`apps/services/${key}`);
8480
};
8581

86-
export const GetAppUpdateVersions = (req: App.AppUpdateVersionReq) => {
82+
export const getAppUpdateVersions = (req: App.AppUpdateVersionReq) => {
8783
return http.post<any>(`apps/installed/update/versions`, req);
8884
};
8985

90-
export const GetAppDefaultConfig = (key: string, name: string) => {
86+
export const getAppDefaultConfig = (key: string, name: string) => {
9187
return http.post<string>(`apps/installed/conf`, { type: key, name: name });
9288
};
9389

94-
export const GetAppInstallParams = (id: number) => {
90+
export const getAppInstallParams = (id: number) => {
9591
return http.get<App.AppConfig>(`apps/installed/params/${id}`);
9692
};
9793

98-
export const UpdateAppInstallParams = (req: any) => {
94+
export const updateAppInstallParams = (req: any) => {
9995
return http.post<any>(`apps/installed/params/update`, req);
10096
};
10197

102-
export const IgnoreUpgrade = (req: any) => {
98+
export const ignoreUpgrade = (req: any) => {
10399
return http.post<any>(`apps/installed/ignore`, req);
104100
};
105101

106-
export const GetIgnoredApp = () => {
102+
export const getIgnoredApp = () => {
107103
return http.get<App.IgnoredApp>(`apps/ignored/detail`);
108104
};
109105

110-
export const UpdateInstallConfig = (req: App.AppConfigUpdate) => {
106+
export const updateInstallConfig = (req: App.AppConfigUpdate) => {
111107
return http.post(`apps/installed/config/update`, req);
112108
};
113109

114-
export const GetAppStoreConfig = () => {
110+
export const getAppStoreConfig = () => {
115111
return http.get<App.AppStoreConfig>(`apps/store/config`);
116112
};
117113

118-
export const UpdateAppStoreConfig = (req: App.AppStoreConfig) => {
114+
export const updateAppStoreConfig = (req: App.AppStoreConfig) => {
119115
return http.post(`apps/store/update`, req);
120116
};
121117

122-
export const SyncCutomAppStore = (req: App.AppStoreSync) => {
118+
export const syncCutomAppStore = (req: App.AppStoreSync) => {
123119
return http.post(`/custom/app/sync`, req);
124120
};
125121

frontend/src/api/modules/files.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,87 @@ import { ResPage } from '../interface';
55
import { TimeoutEnum } from '@/enums/http-enum';
66
import { ReqPage } from '@/api/interface';
77

8-
export const GetFilesList = (params: File.ReqFile) => {
8+
export const getFilesList = (params: File.ReqFile) => {
99
return http.post<File.File>('files/search', params, TimeoutEnum.T_5M);
1010
};
1111

12-
export const GetUploadList = (params: File.SearchUploadInfo) => {
12+
export const getUploadList = (params: File.SearchUploadInfo) => {
1313
return http.post<ResPage<File.UploadInfo>>('files/upload/search', params);
1414
};
1515

16-
export const GetFilesTree = (params: File.ReqFile) => {
16+
export const getFilesTree = (params: File.ReqFile) => {
1717
return http.post<File.FileTree[]>('files/tree', params);
1818
};
1919

20-
export const CreateFile = (form: File.FileCreate) => {
20+
export const createFile = (form: File.FileCreate) => {
2121
return http.post<File.File>('files', form);
2222
};
2323

24-
export const DeleteFile = (form: File.FileDelete) => {
24+
export const deleteFile = (form: File.FileDelete) => {
2525
return http.post<File.File>('files/del', form);
2626
};
2727

28-
export const BatchDeleteFile = (form: File.FileBatchDelete) => {
28+
export const batchDeleteFile = (form: File.FileBatchDelete) => {
2929
return http.post('files/batch/del', form);
3030
};
3131

32-
export const ChangeFileMode = (form: File.FileCreate) => {
32+
export const changeFileMode = (form: File.FileCreate) => {
3333
return http.post<File.File>('files/mode', form);
3434
};
3535

36-
export const CompressFile = (form: File.FileCompress) => {
36+
export const compressFile = (form: File.FileCompress) => {
3737
return http.post<File.File>('files/compress', form, TimeoutEnum.T_10M);
3838
};
3939

40-
export const DeCompressFile = (form: File.FileDeCompress) => {
40+
export const deCompressFile = (form: File.FileDeCompress) => {
4141
return http.post<File.File>('files/decompress', form, TimeoutEnum.T_10M);
4242
};
4343

44-
export const GetFileContent = (params: File.ReqFile) => {
44+
export const getFileContent = (params: File.ReqFile) => {
4545
return http.post<File.File>('files/content', params);
4646
};
4747

48-
export const SaveFileContent = (params: File.FileEdit) => {
48+
export const saveFileContent = (params: File.FileEdit) => {
4949
return http.post<File.File>('files/save', params);
5050
};
5151

52-
export const CheckFile = (path: string) => {
52+
export const checkFile = (path: string) => {
5353
return http.post<boolean>('files/check', { path: path });
5454
};
5555

56-
export const UploadFileData = (params: FormData, config: AxiosRequestConfig) => {
56+
export const uploadFileData = (params: FormData, config: AxiosRequestConfig) => {
5757
return http.upload<File.File>('files/upload', params, config);
5858
};
5959

60-
export const ChunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => {
60+
export const chunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => {
6161
return http.upload<File.File>('files/chunkupload', params, config);
6262
};
6363

64-
export const RenameRile = (params: File.FileRename) => {
64+
export const renameRile = (params: File.FileRename) => {
6565
return http.post<File.File>('files/rename', params);
6666
};
6767

68-
export const ChangeOwner = (params: File.FileOwner) => {
68+
export const changeOwner = (params: File.FileOwner) => {
6969
return http.post<File.File>('files/owner', params);
7070
};
7171

72-
export const WgetFile = (params: File.FileWget) => {
72+
export const wgetFile = (params: File.FileWget) => {
7373
return http.post<File.FileWgetRes>('files/wget', params);
7474
};
7575

76-
export const MoveFile = (params: File.FileMove) => {
76+
export const moveFile = (params: File.FileMove) => {
7777
return http.post<File.File>('files/move', params, TimeoutEnum.T_5M);
7878
};
7979

80-
export const DownloadFile = (params: File.FileDownload) => {
80+
export const downloadFile = (params: File.FileDownload) => {
8181
return http.download<BlobPart>('files/download', params, { responseType: 'blob', timeout: TimeoutEnum.T_40S });
8282
};
8383

84-
export const ComputeDirSize = (params: File.DirSizeReq) => {
84+
export const computeDirSize = (params: File.DirSizeReq) => {
8585
return http.post<File.DirSizeRes>('files/size', params, TimeoutEnum.T_5M);
8686
};
8787

88-
export const FileKeys = () => {
88+
export const fileKeys = () => {
8989
return http.get<File.FileKeys>('files/keys');
9090
};
9191

@@ -101,30 +101,30 @@ export const clearRecycle = () => {
101101
return http.post<any>('files/recycle/clear');
102102
};
103103

104-
export const SearchFavorite = (params: ReqPage) => {
104+
export const searchFavorite = (params: ReqPage) => {
105105
return http.post<ResPage<File.Favorite>>('files/favorite/search', params);
106106
};
107107

108-
export const AddFavorite = (path: string) => {
108+
export const addFavorite = (path: string) => {
109109
return http.post<any>('files/favorite', { path: path });
110110
};
111111

112-
export const ReadByLine = (req: File.FileReadByLine) => {
112+
export const readByLine = (req: File.FileReadByLine) => {
113113
return http.post<any>('files/read', req);
114114
};
115115

116-
export const RemoveFavorite = (id: number) => {
116+
export const removeFavorite = (id: number) => {
117117
return http.post<any>('files/favorite/del', { id: id });
118118
};
119119

120-
export const BatchChangeRole = (params: File.FileRole) => {
120+
export const batchChangeRole = (params: File.FileRole) => {
121121
return http.post<any>('files/batch/role', params);
122122
};
123123

124-
export const GetRecycleStatus = () => {
124+
export const getRecycleStatus = () => {
125125
return http.get<string>('files/recycle/status');
126126
};
127127

128-
export const GetPathByType = (pathType: string) => {
128+
export const getPathByType = (pathType: string) => {
129129
return http.get<string>(`files/path/${pathType}`);
130130
};

frontend/src/api/modules/group.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { Group } from '../interface/group';
22
import http from '@/api';
33

4-
export const GetGroupList = (type: string) => {
4+
export const getGroupList = (type: string) => {
55
return http.post<Array<Group.GroupInfo>>(`/core/groups/search`, { type: type });
66
};
7-
export const CreateGroup = (params: Group.GroupCreate) => {
7+
export const createGroup = (params: Group.GroupCreate) => {
88
return http.post<Group.GroupCreate>(`/core/groups`, params);
99
};
10-
export const UpdateGroup = (params: Group.GroupUpdate) => {
10+
export const updateGroup = (params: Group.GroupUpdate) => {
1111
return http.post(`/core/groups/update`, params);
1212
};
13-
export const DeleteGroup = (id: number) => {
13+
export const deleteGroup = (id: number) => {
1414
return http.post(`/core/groups/del`, { id: id });
1515
};

frontend/src/api/modules/host-tool.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,38 @@ import http from '@/api';
22
import { HostTool } from '../interface/host-tool';
33
import { TimeoutEnum } from '@/enums/http-enum';
44

5-
export const GetSupervisorStatus = () => {
5+
export const getSupervisorStatus = () => {
66
return http.post<HostTool.HostTool>(`/hosts/tool`, { type: 'supervisord', operate: 'status' });
77
};
88

9-
export const OperateSupervisor = (operate: string) => {
9+
export const operateSupervisor = (operate: string) => {
1010
return http.post<any>(`/hosts/tool/operate`, { type: 'supervisord', operate: operate });
1111
};
1212

13-
export const OperateSupervisorConfig = (req: HostTool.SupersivorConfig) => {
13+
export const operateSupervisorConfig = (req: HostTool.SupersivorConfig) => {
1414
return http.post<HostTool.SupersivorConfigRes>(`/hosts/tool/config`, req);
1515
};
1616

17-
export const GetSupervisorLog = () => {
17+
export const getSupervisorLog = () => {
1818
return http.post<any>(`/hosts/tool/log`, { type: 'supervisord' });
1919
};
2020

21-
export const InitSupervisor = (req: HostTool.SupersivorInit) => {
21+
export const initSupervisor = (req: HostTool.SupersivorInit) => {
2222
return http.post<any>(`/hosts/tool/init`, req);
2323
};
2424

25-
export const CreateSupervisorProcess = (req: HostTool.SupersivorProcess) => {
25+
export const createSupervisorProcess = (req: HostTool.SupersivorProcess) => {
2626
return http.post<any>(`/hosts/tool/supervisor/process`, req);
2727
};
2828

29-
export const OperateSupervisorProcess = (req: HostTool.ProcessReq) => {
29+
export const operateSupervisorProcess = (req: HostTool.ProcessReq) => {
3030
return http.post<any>(`/hosts/tool/supervisor/process`, req, TimeoutEnum.T_60S);
3131
};
3232

33-
export const LoadProcessStatus = () => {
34-
return http.post<Array<HostTool.ProcessStatus>>(`/hosts/tool/supervisor/process/load`, {}, TimeoutEnum.T_40S);
35-
};
36-
37-
export const GetSupervisorProcess = () => {
33+
export const getSupervisorProcess = () => {
3834
return http.get<HostTool.SupersivorProcess[]>(`/hosts/tool/supervisor/process`);
3935
};
4036

41-
export const OperateSupervisorProcessFile = (req: HostTool.ProcessFileReq) => {
37+
export const operateSupervisorProcessFile = (req: HostTool.ProcessFileReq) => {
4238
return http.post<any>(`/hosts/tool/supervisor/process/file`, req, TimeoutEnum.T_60S);
4339
};

0 commit comments

Comments
 (0)