mirror of
https://gitee.com/samwaf/SamWaf.git
synced 2026-11-02 11:11:47 +08:00
23 lines
570 B
Go
23 lines
570 B
Go
package api
|
|
|
|
import (
|
|
"SamWaf/model/common/response"
|
|
"SamWaf/service/waf_service"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type WafSystemMonitorApi struct {
|
|
}
|
|
|
|
var wafSystemMonitorService = waf_service.WafSystemMonitorServiceApp
|
|
|
|
// GetSystemMonitorApi 获取系统监控信息
|
|
func (w *WafSystemMonitorApi) GetSystemMonitorApi(c *gin.Context) {
|
|
systemInfo, err := wafSystemMonitorService.GetSystemMonitorInfo()
|
|
if err != nil {
|
|
response.FailWithMessage("获取系统监控信息失败: "+err.Error(), c)
|
|
return
|
|
}
|
|
response.OkWithDetailed(systemInfo, "获取成功", c)
|
|
}
|