Selaa lähdekoodia

add action in hostPull

Max Ma 11 kuukautta sitten
vanhempi
commit
79955a6b54
2 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  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"`
 }