Commit cf5b293f by 陶腾飞

2022/05/26 v2.5.6

parent 95ffb832
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
- 2022/04/25 v2.5.3 更新powershell函数 - 2022/04/25 v2.5.3 更新powershell函数
- 2022/04/26 v2.5.4 cmdb消息初始化 - 2022/04/26 v2.5.4 cmdb消息初始化
- 2022/04/29 v2.5.5 ci工具 自我升级 - 2022/04/29 v2.5.5 ci工具 自我升级
- 2022/05/26 v2.5.6 更新主要计算机功能bug修复
## 四、其他说明 ## 四、其他说明
......
...@@ -11,7 +11,7 @@ const SymbolHostname = "-" ...@@ -11,7 +11,7 @@ const SymbolHostname = "-"
// AD-Control // // AD-Control //
const Version string = "2.5.5" const Version string = "2.5.6"
const Host_adserver string = "ADSERVER" const Host_adserver string = "ADSERVER"
const Host_adserver_lan string = "192.168.0.20" const Host_adserver_lan string = "192.168.0.20"
const Host_adserver_wan string = "115.231.214.234" const Host_adserver_wan string = "115.231.214.234"
......
...@@ -140,9 +140,12 @@ func (rep *MJreport) MsgDeal() interface{} { ...@@ -140,9 +140,12 @@ func (rep *MJreport) MsgDeal() interface{} {
// 更新主要计算机 // 更新主要计算机
case Msg_Report_UpdatePrimaryHost: case Msg_Report_UpdatePrimaryHost:
switch rep.Status { switch rep.Status {
// 服务器 // 服务器
case Msg_status_commit: case Msg_status_commit:
LOG(INFO, rep.Instruction, fmt.Sprintf("%s for %s", rep.Username, rep.Computername))
if err := CmdbRecordValueClear(Cmdb_Username, rep.Username); err != nil { if err := CmdbRecordValueClear(Cmdb_Username, rep.Username); err != nil {
rep.DataStr = Error_CMDB_UPDATE_REQ rep.DataStr = Error_CMDB_UPDATE_REQ
LOG(ERROR, rep.Instruction, err) LOG(ERROR, rep.Instruction, err)
......
...@@ -40,7 +40,6 @@ func SendMsg(server, msgtype string, v interface{}) { ...@@ -40,7 +40,6 @@ func SendMsg(server, msgtype string, v interface{}) {
LOG(ERROR, "Json to byte Error", fmt.Sprintf("%v %v", err, v)) LOG(ERROR, "Json to byte Error", fmt.Sprintf("%v %v", err, v))
} }
link := fmt.Sprintf("http://%s/%s", server, msgtype) link := fmt.Sprintf("http://%s/%s", server, msgtype)
fmt.Println(string(textbyte))
// 发送数据 // 发送数据
resp, err := http.Post( resp, err := http.Post(
link, link,
......
...@@ -269,7 +269,7 @@ func menuInitHostManager(ni *walk.NotifyIcon) { ...@@ -269,7 +269,7 @@ func menuInitHostManager(ni *walk.NotifyIcon) {
// 主机管理 绑定主机 // 主机管理 绑定主机
func tHostManagerBind() { func tHostManagerBind() {
if Msg_YesNo(`执行本操作后,通过企业微信的"知微运维平台"的电源管理的主机将是本机。`) { if !Msg_YesNo(`执行本操作后,通过企业微信的"知微运维平台"的电源管理的主机将是本机。`) {
return return
} }
var ph pub.CIRecordUpdateTime var ph pub.CIRecordUpdateTime
...@@ -279,7 +279,6 @@ func tHostManagerBind() { ...@@ -279,7 +279,6 @@ func tHostManagerBind() {
d, err := json.Marshal(ph) d, err := json.Marshal(ph)
if err != nil { if err != nil {
pub.LOG(ERROR, "HostManagerBind", err) pub.LOG(ERROR, "HostManagerBind", err)
//不用返回,daemon需要记录日志
} }
pub.SendADMsg(pub.Msg_Report, pub.GJreportUsernameString(pub.Msg_Report_UpdatePrimaryHost, pub.User_name_display, string(d))) pub.SendADMsg(pub.Msg_Report, pub.GJreportUsernameString(pub.Msg_Report_UpdatePrimaryHost, pub.User_name_display, string(d)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment