mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
(cherry picked from commit 648a043590)
This commit is contained in:
1 parent
8bf9da9ce8
commit
575f061508
2 files changed
+27
-17
No files matched your search
@@ -129,9 +129,11 @@ define(function(require) {
|
||||
var that = this;
|
||||
|
||||
nicsNames.forEach(function(element) {
|
||||
var alias_str = element.ID + " " + element.NET + " " + element.IP;
|
||||
|
||||
$("#parent", that.context).append(new Option(alias_str, element.NAME));
|
||||
var nicID = element && element.ID? element.ID : "";
|
||||
var nicNET = element && element.NET? element.NET : "";
|
||||
var nicIP = element && element.IP? element.IP : "";
|
||||
var alias_str = nicID + " - " + nicNET + " " + nicIP;
|
||||
$("#parent", that.context).append(new Option(alias_str, element.NAME));
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -18,7 +18,6 @@ define(function(require) {
|
||||
/*
|
||||
DEPENDENCIES
|
||||
*/
|
||||
|
||||
var Locale = require("utils/locale");
|
||||
var Config = require("sunstone-config");
|
||||
var Sunstone = require("sunstone");
|
||||
@@ -378,14 +377,13 @@ define(function(require) {
|
||||
$(nRow).attr("nic_id", aData.NIC_ID);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#tab_network_form .nics_table", context).dataTable().fnSort([[1, "asc"]]);
|
||||
|
||||
// Add event listener for opening and closing each NIC row details
|
||||
context.off("click", "#tab_network_form .nics_table td.open-control");
|
||||
context.on("click", "#tab_network_form .nics_table td.open-control", function () {
|
||||
var row = $(this).closest("table").DataTable().row($(this).closest("tr"));
|
||||
|
||||
if (row.child.isShown()) {
|
||||
row.child.hide();
|
||||
$(this).children("span").addClass("fa-chevron-down");
|
||||
@@ -395,18 +393,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>" +
|
||||
" " + this.IP +
|
||||
" " + this.MAC +
|
||||
" " + this.ACTIONS + "</div>";
|
||||
var new_div = "<div id=alias_" + this.NIC_ID + " style=\"margin-left: 40px; margin-bottom: 5px\"><b> - Alias-" + this.ALIAS_ID + ":</b>";
|
||||
|
||||
html += new_div;
|
||||
if(!!this.IP) {
|
||||
new_div += " " + this.IP;
|
||||
}
|
||||
if(!!this.IP6) {
|
||||
new_div += " " + this.IP6;
|
||||
}
|
||||
new_div += " " + this.MAC;
|
||||
if(!!this.IP6_ULA) {
|
||||
new_div += " <b>ULA:</b> " + this.IP6_ULA;
|
||||
}
|
||||
if(!!this.IP6_GLOBAL) {
|
||||
new_div += " <b>Global:</b> " + this.IP6_GLOBAL;
|
||||
}
|
||||
new_div += " " + this.ACTIONS + "</div>";
|
||||
|
||||
if (Config.isTabActionEnabled("vms-tab", "VM.detachnic")) {
|
||||
context.off("click", ".detachnic");
|
||||
context.on("click", ".detachnic", {element_id: that.element.ID}, detach_alias);
|
||||
}
|
||||
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);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
html = "";
|
||||
@@ -573,7 +582,6 @@ define(function(require) {
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
function _setState(state, context) {
|
||||
var that = this;
|
||||
|
||||
|
||||
Reference in new issue
Block a user