From 584d92b1d6b5c82850873350b790c4a6a41ffed7 Mon Sep 17 00:00:00 2001 From: Aceix Date: Fri, 13 Jan 2023 09:58:00 +0000 Subject: [PATCH] fix(GRA-899): send UI compatible interface address --- models/api_host.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/api_host.go b/models/api_host.go index e0fe89a3..5be4bddf 100644 --- a/models/api_host.go +++ b/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 = ""