1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #4852: Fix VR create dialog reset

This commit is contained in:
Carlos Martín 2016-10-07 11:24:51 +02:00
parent dd60449299
commit ce04c596a9
2 changed files with 18 additions and 5 deletions

View File

@ -967,12 +967,25 @@ define(function(require) {
}, 13)
}
/**
* Resets the form panel. The loading screen is shown, then the panel is reset
* and shown
*
* @param {String} tabId TAB_ID. Optional, if it is not provided the current
* tab will be used
* @param {String} formPanelId TAB_ID. Optional, if it is not provided the
* visible form panel will be used
*/
var _resetFormPanel = function(tabId, formPanelId) {
if (tabId == undefined){
tabId = _getTab()
}
_popFormPanelLoading(tabId);
setTimeout(function() {
var formPanelInstance;
if (formPanelId) {
if (formPanelId != undefined) {
formPanelInstance = SunstoneCfg["tabs"][tabId]['formPanelInstances'][formPanelId];
} else {
formPanelInstance = SunstoneCfg["tabs"][tabId].activeFormPanel;

View File

@ -152,11 +152,11 @@ define(function(require) {
success: function(request, response){
OpenNebulaAction.clear_cache("VM");
Sunstone.resetFormPanel(TAB_ID, that.formPanelId);
Sunstone.hideFormPanel(TAB_ID);
Sunstone.resetFormPanel();
Sunstone.hideFormPanel();
},
error: function(request, response) {
Sunstone.hideFormPanelLoading(TAB_ID);
Sunstone.hideFormPanelLoading();
Notifier.notifyError(Locale.tr(
"Failed to create VMs. Virtual Router may need to be deleted manually."));
@ -165,7 +165,7 @@ define(function(require) {
});
},
error: function(request, response) {
Sunstone.hideFormPanelLoading(TAB_ID);
Sunstone.hideFormPanelLoading();
Notifier.onError(request, response);
},
});