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 7acf64a23d..74af7343aa 100644 --- a/src/sunstone/public/app/tabs/vms-tab/panels/network.js +++ b/src/sunstone/public/app/tabs/vms-tab/panels/network.js @@ -41,6 +41,8 @@ define(function(require) { Panel.prototype.html = _html; Panel.prototype.setup = _setup; Panel.prototype.onShow = _onShow; + Panel.prototype.getState = _getState; + Panel.prototype.setState = _setState; return Panel; @@ -410,4 +412,24 @@ define(function(require) { }); } } + + function _getState(context) { + var state = { + openNicsDetails : [] + }; + + $.each($("#tab_network_form .nics_table .fa-chevron-up", context), function(){ + state.openNicsDetails.push($(this).closest("tr").attr("nic_id")); + }); + + return state; + } + + function _setState(state, context) { + var that = this; + + $.each(state["openNicsDetails"], function(){ + $('#tab_network_form .nics_table tr[nic_id="'+this+'"] td.open-control', context).click(); + }); + } });