From 2c19a586d0b0745d32c22ffb2c1d23dcb5590215 Mon Sep 17 00:00:00 2001 From: Anton Todorov Date: Tue, 26 May 2020 16:36:16 +0300 Subject: [PATCH] B #3626: Show IPv6 alias in Sunstone (#3627) also show IPv6 ULA and Global if defined. Signed-off-by: Anton Todorov --- .../public/app/tabs/vms-tab/panels/network.js | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/sunstone/public/app/tabs/vms-tab/panels/network.js b/src/sunstone/public/app/tabs/vms-tab/panels/network.js index 746c5b4118..0ecdfef052 100644 --- a/src/sunstone/public/app/tabs/vms-tab/panels/network.js +++ b/src/sunstone/public/app/tabs/vms-tab/panels/network.js @@ -428,29 +428,29 @@ define(function(require) { var html = ""; $.each(row.data().NIC_ALIAS, function(index, elem) { - var new_div = "
- Alias-" + this.ALIAS_ID + ":"; + var new_div = "
" + + "" + "- Alias-" + this.ALIAS_ID + ":" + ""; + if(this.IP !== undefined) { + new_div += "   " + this.IP; + } + if(this.IP6 !== undefined) { + new_div += "   " + this.IP6; + } + new_div += "   " + this.MAC; + if(this.IP6_ULA !== undefined) { + new_div += "   ULA " + this.IP6_ULA; + } + if(this.IP6_GLOBAL !== undefined) { + new_div += "   Global " + this.IP6_GLOBAL; + } + new_div += "   " + this.ACTIONS + "
"; - if(!!this.IP) { - new_div += "   " + this.IP; - } - if(!!this.IP6) { - new_div += "   " + this.IP6; - } - new_div += "   " + this.MAC; - if(!!this.IP6_ULA) { - new_div += "   ULA: " + this.IP6_ULA; - } - if(!!this.IP6_GLOBAL) { - new_div += "   Global: " + this.IP6_GLOBAL; - } - new_div += "   " + this.ACTIONS + "
"; + html += new_div; - html += new_div; - - if (Config.isTabActionEnabled("vms-tab", "VM.detachnic")) { - context.off("click", ".detachnic"); - context.on("click", ".detachnic", {element_id: that.element.ID}, detach_alias); - } + if (Config.isTabActionEnabled("vms-tab", "VM.detachnic")) { + context.off("click", ".detachnic"); + context.on("click", ".detachnic", {element_id: that.element.ID}, detach_alias); + } }); } else { html = "";