Browse Source

Merge pull request #1925 from gravitl/story/GRA-899

fix(GRA-899): send UI compatible interface address
Aceix 2 years ago
parent
commit
b425501bc7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      models/api_host.go

+ 3 - 0
models/api_host.go

@@ -39,6 +39,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 = ""