2
0
Эх сурвалжийг харах

fix(GRA-899): send UI compatible interface address

Aceix 2 жил өмнө
parent
commit
584d92b1d6
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      models/api_host.go

+ 3 - 0
models/api_host.go

@@ -35,6 +35,9 @@ func (h *Host) ConvertNMHostToAPI() *ApiHost {
 	a.FirewallInUse = h.FirewallInUse
 	a.ID = h.ID.String()
 	a.Interfaces = h.Interfaces
+	for i := range a.Interfaces {
+		a.Interfaces[i].AddressString = a.Interfaces[i].Address.String()
+	}
 	a.InternetGateway = h.InternetGateway.String()
 	if isEmptyAddr(a.InternetGateway) {
 		a.InternetGateway = ""