1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

B #3626: Show IPv6 alias in Sunstone (#3627)

also show IPv6 ULA and Global if defined.

Signed-off-by: Anton Todorov <a.todorov@storpool.com>
This commit is contained in:
Anton Todorov 2020-05-26 16:36:16 +03:00 committed by GitHub
parent 21c62e5dc8
commit 2c19a586d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -428,29 +428,29 @@ define(function(require) {
var html = "";
$.each(row.data().NIC_ALIAS, function(index, elem) {
var new_div = "<div id=alias_" + this.NIC_ID + " style=\"margin-left: 40px; margin-bottom: 5px\"><b> - Alias-" + this.ALIAS_ID + ":</b>";
var new_div = "<div id=alias_" + this.NIC_ID + " style=\"margin-left: 40px; margin-bottom: 5px\">" +
"<b>" + "- Alias-" + this.ALIAS_ID + ":" + "</b>";
if(this.IP !== undefined) {
new_div += "&nbsp;&nbsp;&nbsp;" + this.IP;
}
if(this.IP6 !== undefined) {
new_div += "&nbsp;&nbsp;&nbsp;" + this.IP6;
}
new_div += "&nbsp;&nbsp;&nbsp;" + this.MAC;
if(this.IP6_ULA !== undefined) {
new_div += "&nbsp;&nbsp;&nbsp;<b>ULA</b>&nbsp;" + this.IP6_ULA;
}
if(this.IP6_GLOBAL !== undefined) {
new_div += "&nbsp;&nbsp;&nbsp;<b>Global</b>&nbsp;" + this.IP6_GLOBAL;
}
new_div += "&nbsp;&nbsp;&nbsp;" + this.ACTIONS + "</div>";
if(!!this.IP) {
new_div += "&nbsp;&nbsp;&nbsp;" + this.IP;
}
if(!!this.IP6) {
new_div += "&nbsp;&nbsp;&nbsp;" + this.IP6;
}
new_div += "&nbsp;&nbsp;&nbsp;" + this.MAC;
if(!!this.IP6_ULA) {
new_div += "&nbsp;&nbsp;&nbsp;<b>ULA:</b>&nbsp;" + this.IP6_ULA;
}
if(!!this.IP6_GLOBAL) {
new_div += "&nbsp;&nbsp;&nbsp;<b>Global:</b>&nbsp;" + this.IP6_GLOBAL;
}
new_div += "&nbsp;&nbsp;&nbsp;" + this.ACTIONS + "</div>";
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 = "";