Skip to content

Commit

Permalink
feat: 支持openEuler
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 17, 2024
1 parent 4e6654a commit db79d17
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 21 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,20 @@
|---------------------|-----|-----|
| AlmaLinux | 9 | 推荐 |
| AlmaLinux | 8 | 不推荐 |
| RockyLinux | 9 | |
| RockyLinux | 9 | 支持 |
| RockyLinux | 8 | 不推荐 |
| CentOS Stream | 9 | 不推荐 |
| CentOS Stream | 8 | 不推荐 |
| Ubuntu | 24 | 推荐 |
| Ubuntu | 22 | |
| Ubuntu | 22 | 支持 |
| Debian | 12 | 推荐 |
| Debian | 11 | |
| OpenCloudOS | 9 | |
| TencentOS Server | 4 | |
| Debian | 11 | 支持 |
| OpenCloudOS | 9 | 支持 |
| TencentOS Server | 4 | 支持 |
| TencentOS Server | 3.1 | 不推荐 |
| Alibaba Cloud Linux | 3.2 | 不推荐 |
| Anolis | 8 | 不推荐 |
| openEuler | 22 | 不推荐 |

随着系统版本的不断更新,我们亦可能会终止部分过于老旧的系统的支持,以保证面板的健壮性。

Expand Down
11 changes: 6 additions & 5 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,20 @@ For other systems not listed in the table below, you can try to install them by
|---------------------|---------|-----------------|
| AlmaLinux | 9 | Recommended |
| AlmaLinux | 8 | Not recommended |
| RockyLinux | 9 | |
| RockyLinux | 9 | Support |
| RockyLinux | 8 | Not recommended |
| CentOS Stream | 9 | Not recommended |
| CentOS Stream | 8 | Not recommended |
| Ubuntu | 24 | Recommended |
| Ubuntu | 22 | |
| Ubuntu | 22 | Support |
| Debian | 12 | Recommended |
| Debian | 11 | |
| OpenCloudOS | 9 | |
| TencentOS Server | 4 | |
| Debian | 11 | Support |
| OpenCloudOS | 9 | Support |
| TencentOS Server | 4 | Support |
| TencentOS Server | 3.1 | Not recommended |
| Alibaba Cloud Linux | 3.2 | Not recommended |
| Anolis | 8 | Not recommended |
| openEuler | 22 | Not recommended |

As system versions are constantly updated, we may also terminate support for some older systems to ensure the robustness of the panel.

Expand Down
6 changes: 4 additions & 2 deletions internal/service/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ func Bind[T any](r *http.Request) (*T, error) {
return nil, err
}
if slices.Contains([]string{"POST", "PUT", "PATCH", "DELETE"}, strings.ToUpper(r.Method)) {
if err := binder.Body(req); err != nil {
return nil, err
if r.ContentLength > 0 {
if err := binder.Body(req); err != nil {
return nil, err
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion web/src/api/apps/fail2ban/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default {
add: (data: any): Promise<AxiosResponse<any>> => request.post('/apps/fail2ban/jails', data),
// 删除保护
delete: (name: string): Promise<AxiosResponse<any>> =>
request.delete('/apps/fail2ban/jails', { params: { name } }),
request.delete('/apps/fail2ban/jails', { data: { name } }),
// 封禁列表
jail: (name: string): Promise<AxiosResponse<any>> => request.get('/apps/fail2ban/jails/' + name),
// 解封 IP
Expand Down
2 changes: 1 addition & 1 deletion web/src/api/apps/php/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ export default {
request.post(`/apps/php${version}/extensions`, { slug }),
// 卸载拓展
uninstallExtension: (version: number, slug: string): Promise<AxiosResponse<any>> =>
request.delete(`/apps/php${version}/extensions`, { params: { slug } })
request.delete(`/apps/php${version}/extensions`, { data: { slug } })
}
8 changes: 4 additions & 4 deletions web/src/api/apps/supervisor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ export default {
request.get('/apps/supervisor/processes', { params: { page, limit } }),
// 进程启动
startProcess: (process: string): Promise<AxiosResponse<any>> =>
request.post(`/apps/supervisor/processes/${process}/start`, {}),
request.post(`/apps/supervisor/processes/${process}/start`),
// 进程停止
stopProcess: (process: string): Promise<AxiosResponse<any>> =>
request.post(`/apps/supervisor/processes/${process}/stop`, {}),
request.post(`/apps/supervisor/processes/${process}/stop`),
// 进程重启
restartProcess: (process: string): Promise<AxiosResponse<any>> =>
request.post(`/apps/supervisor/processes/${process}/restart`, {}),
request.post(`/apps/supervisor/processes/${process}/restart`),
// 进程日志
processLog: (process: string): Promise<AxiosResponse<any>> =>
request.get(`/apps/supervisor/processes/${process}/log`),
// 清空进程日志
clearProcessLog: (process: string): Promise<AxiosResponse<any>> =>
request.post(`/apps/supervisor/processes/${process}/clearLog`, {}),
request.post(`/apps/supervisor/processes/${process}/clearLog`),
// 进程配置
processConfig: (process: string): Promise<AxiosResponse<any>> =>
request.get(`/apps/supervisor/processes/${process}`),
Expand Down
2 changes: 1 addition & 1 deletion web/src/api/panel/backup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
},
// 删除备份
delete: (type: string, file: string): Promise<AxiosResponse<any>> =>
request.delete(`/backup/${type}/delete`, { params: { file } }),
request.delete(`/backup/${type}/delete`, { data: { file } }),
// 恢复备份
restore: (type: string, file: string, target: string): Promise<AxiosResponse<any>> =>
request.post(`/backup/${type}/restore`, { file, target })
Expand Down
4 changes: 2 additions & 2 deletions web/src/api/panel/website/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default {
create: (data: any): Promise<AxiosResponse<any>> => request.post('/website', data),
// 删除
delete: (id: number, path: boolean, db: boolean): Promise<AxiosResponse<any>> =>
request.delete(`/website/${id}`, { params: { path, db } }),
request.delete(`/website/${id}`, { data: { path, db } }),
// 获取默认配置
defaultConfig: (): Promise<AxiosResponse<any>> => request.get('/website/defaultConfig'),
// 保存默认配置
Expand All @@ -28,7 +28,7 @@ export default {
request.post('/website/' + id + '/updateRemark', { remark }),
// 重置配置
resetConfig: (id: number): Promise<AxiosResponse<any>> =>
request.post('/website/' + id + '/resetConfig', {}),
request.post('/website/' + id + '/resetConfig'),
// 修改状态
status: (id: number, status: boolean): Promise<AxiosResponse<any>> =>
request.post('/website/' + id + '/status', { status })
Expand Down

0 comments on commit db79d17

Please sign in to comment.