Commit cf5b293f by 陶腾飞

2022/05/26 v2.5.6

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