diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-nic.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-nic.js index ef9eb1aad3..c5f780ae6a 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-nic.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-nic.js @@ -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)); }); } }); 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 554153ac4d..e48d45514c 100644 --- a/src/sunstone/public/app/tabs/vms-tab/panels/network.js +++ b/src/sunstone/public/app/tabs/vms-tab/panels/network.js @@ -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 = "