mirror of https://github.com/apache/cloudstack.git
bug 13922
-Fix enable static NAT never completing if detail view was not visible -- caused by JS error in widget -If detail view isn't visible anymore, don't show post-enable/disable NAT dialog which refreshes list view status 13922: resolved fixed reviewed-by: jessica
This commit is contained in:
parent
e896abca58
commit
30f968e137
|
|
@ -1225,7 +1225,9 @@
|
|||
}
|
||||
});
|
||||
|
||||
ipChangeNotice();
|
||||
if (args._custom.$detailView.is(':visible')) {
|
||||
ipChangeNotice();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -1254,7 +1256,11 @@
|
|||
return ['enableStaticNAT'];
|
||||
};
|
||||
},
|
||||
onComplete: ipChangeNotice
|
||||
onComplete: function(args, _custom) {
|
||||
if (_custom.$detailView.is(':visible')) {
|
||||
ipChangeNotice();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ var pollAsyncJobResult = function(args) {
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
if (result.jobstatus == 1) { // Succeeded
|
||||
if (result.jobstatus == 1) { // Succeeded
|
||||
if(args._custom.getUpdatedItem != null && args._custom.getActionFilter != null) {
|
||||
args.complete({
|
||||
data: args._custom.getUpdatedItem(json),
|
||||
|
|
@ -64,7 +64,7 @@ var pollAsyncJobResult = function(args) {
|
|||
}
|
||||
|
||||
if (args._custom.onComplete) {
|
||||
args._custom.onComplete(json);
|
||||
args._custom.onComplete(json, args._custom);
|
||||
}
|
||||
}
|
||||
else if (result.jobstatus == 2) { // Failed
|
||||
|
|
|
|||
|
|
@ -82,9 +82,11 @@
|
|||
if (customAction && !noAdd) {
|
||||
customAction({
|
||||
context: context,
|
||||
$detailView: $detailView,
|
||||
complete: function(args) {
|
||||
// Set loading appearance
|
||||
var $loading = $('<div>').addClass('loading-overlay');
|
||||
|
||||
$detailView.prepend($loading);
|
||||
|
||||
args = args ? args : {};
|
||||
|
|
@ -92,20 +94,23 @@
|
|||
var $item = args.$item;
|
||||
|
||||
notification.desc = messages.notification(args.messageArgs);
|
||||
notification._custom = args._custom;
|
||||
notification._custom = $.extend(args._custom ? args._custom : {}, {
|
||||
$detailView: $detailView
|
||||
});
|
||||
|
||||
cloudStack.ui.notifications.add(
|
||||
notification,
|
||||
|
||||
// Success
|
||||
function(args) {
|
||||
$loading.remove();
|
||||
if (!$detailView.is(':visible')) return;
|
||||
|
||||
$loading.remove();
|
||||
replaceListViewItem($detailView, args.data);
|
||||
|
||||
if (!noRefresh) {
|
||||
updateTabContent(args.data);
|
||||
}
|
||||
|
||||
replaceListViewItem($detailView, args.data);
|
||||
},
|
||||
|
||||
{},
|
||||
|
|
@ -131,7 +136,9 @@
|
|||
response: {
|
||||
success: function(args) {
|
||||
args = args ? args : {};
|
||||
notification._custom = args._custom;
|
||||
notification._custom = $.extend(args._custom ? args._custom : {}, {
|
||||
$detailView: $detailView
|
||||
});
|
||||
|
||||
if (additional && additional.success) additional.success(args);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue