diff --git a/src/sunstone/public/app/opennebula/vm.js b/src/sunstone/public/app/opennebula/vm.js index 05649020a5..fd6ef586aa 100644 --- a/src/sunstone/public/app/opennebula/vm.js +++ b/src/sunstone/public/app/opennebula/vm.js @@ -1029,9 +1029,16 @@ define(function(require) { var ipsHtml = this.ipsStr(element, { divider, groupStrFunction: groupByIpsDropdown, forceGroup: true }); var ips = []; - $.each($.parseHTML(ipsHtml), function() { - ips.push($( this ).text()); + $.each($.parseHTML(ipsHtml), function(index, element) { + if (!ips.includes($( this ).text()) && $( this ).text() !== "") + ips.push($( this ).text()); }); + + if (ips.length === 0) + return "

--

"; + else if (ips.length === 1) + return "

"+ips[0]+"

" + var firstIP = ipsHtml.split("")[0] ipsHtml = ipsHtml.split("")[1] ipsHtml =