| | |
| | | "basic.com/dbapi.git" |
| | | "github.com/gin-gonic/gin" |
| | | "webserver/extend/code" |
| | | "webserver/extend/config" |
| | | "webserver/extend/util" |
| | | ) |
| | | |
| | |
| | | Id string `json:"id"` |
| | | AlarmIp string `json:"alarm_ip,omitempty" example:"192.168.1.182"` |
| | | AlarmPort int `json:"alarm_port,omitempty" example:"22122"` |
| | | AlarmThresholdType int `json:"alarm_threshold_type"`//报警阈值类型设置:1:按最高分,2:按阈值以上 |
| | | AlarmThreshold int `json:"alarm_threshold"`//报警阈值 |
| | | WebPicIp string `json:"web_pic_ip,omitempty" example:""` |
| | | WebPicPort int `json:"web_pic_port,omitempty" example:"22122"` |
| | | EsPicIp string `json:"es_pic_ip,omitempty" example:""` |
| | |
| | | }else { |
| | | resData["server_id"] = sysconf.GetServerId() |
| | | resData["server_name"] = sysconf.GetServerName() |
| | | ipv4, mask, _ := util.GetLocalIP(config.Server.NetworkAdapter) |
| | | gateway, _ := util.GetDefaultRoute(config.Server.NetworkAdapter) |
| | | resData["ip"] = ipv4 |
| | | resData["subMask"] = mask |
| | | resData["gateway"] = gateway |
| | | // 存在 |
| | | util.ResponseFormat(c, code.Success, resData) |
| | | } |