feat: 实现 Redfish API 标准接口;支持通过前端开关控制 Redfish 服务

This commit is contained in:
Fucheng Sha
2026-05-12 10:45:42 +08:00
parent 17cd74f64c
commit 4e8c342905
23 changed files with 2170 additions and 5 deletions

View File

@@ -392,6 +392,24 @@ export const webConfigApi = {
}),
}
export interface RedfishConfigResponse {
enabled: boolean
}
export interface RedfishConfigUpdate {
enabled?: boolean
}
export const redfishConfigApi = {
get: () => request<RedfishConfigResponse>('/config/redfish'),
update: (config: RedfishConfigUpdate) =>
request<RedfishConfigResponse>('/config/redfish', {
method: 'PATCH',
body: JSON.stringify(config),
}),
}
export const systemApi = {
/**
* 重启系统