From f4e8f206a6760bdc31734dfcb1c65916b5b76311 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 22 八月 2019 12:05:58 +0800
Subject: [PATCH] add cluster

---
 controllers/syssetcont.go |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/controllers/syssetcont.go b/controllers/syssetcont.go
index fb4aa71..61a4116 100644
--- a/controllers/syssetcont.go
+++ b/controllers/syssetcont.go
@@ -4,6 +4,7 @@
 	"basic.com/dbapi.git"
 	"github.com/gin-gonic/gin"
 	"webserver/extend/code"
+	"webserver/extend/config"
 	"webserver/extend/util"
 )
 
@@ -15,6 +16,8 @@
 	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:""`
@@ -147,6 +150,11 @@
 	}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)
 	}

--
Gitblit v1.8.0