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

This commit is contained in:
Aceix 2023-01-13 09:58:00 +00:00
parent 75dc77a6ea
commit 584d92b1d6

View file

@ -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 = ""