소스 검색

add action in hostPull

Max Ma 11 달 전
부모
커밋
79955a6b54
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      controllers/hosts.go
  2. 1 0
      models/structs.go

+ 1 - 0
controllers/hosts.go

@@ -216,6 +216,7 @@ func pull(w http.ResponseWriter, r *http.Request) {
 
 	hu := hostactions.GetAction(hostID)
 	if hu != nil {
+		response.Action = models.SignalHost
 		response.Signal = hu.Signal
 	}
 

+ 1 - 0
models/structs.go

@@ -227,6 +227,7 @@ type HostPull struct {
 	DefaultGwIp       net.IP                `json:"default_gw_ip"`
 	IsInternetGw      bool                  `json:"is_inet_gw"`
 	EndpointDetection bool                  `json:"endpoint_detection"`
+	Action            HostMqAction          `json:"action"`
 	Signal            Signal                `json:"signal"`
 }