mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 8296: show action complete(success/fail) info in a dialog box even users have navigated to a different page. This change applies to all actions in subgrids and multiple-selection middle menus in all pages.
This commit is contained in:
parent
d0174a22f9
commit
5166285f99
@ -21,7 +21,7 @@ var g_nonCompleteAsyncJob = {};
|
||||
function periodicallyCheckNonCompleteAsyncJob() {
|
||||
var timerKey = "checkNonCompleteAsyncJob";
|
||||
$("#dialog_action_complete").everyTime(
|
||||
20000,
|
||||
30000,
|
||||
timerKey,
|
||||
function() {
|
||||
for(var jobId in g_nonCompleteAsyncJob) {
|
||||
@ -352,6 +352,7 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem) {
|
||||
success: function(json) {
|
||||
var jobId = json[asyncJobResponse].jobid;
|
||||
var timerKey = "asyncJob_" + jobId;
|
||||
g_nonCompleteAsyncJob[jobId] = label2;
|
||||
$("body").everyTime(
|
||||
10000,
|
||||
timerKey,
|
||||
@ -365,6 +366,7 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem) {
|
||||
return; //Job has not completed
|
||||
} else {
|
||||
$("body").stopTime(timerKey);
|
||||
delete g_nonCompleteAsyncJob[jobId];
|
||||
$spinningWheel.hide();
|
||||
if (result.jobstatus == 1) { // Succeeded
|
||||
$subgridItem.find("#after_action_info_container").removeClass("error").addClass("success").show();
|
||||
@ -486,6 +488,7 @@ function doActionToMidMenu(id, apiInfo, apiCommand) {
|
||||
success: function(json) {
|
||||
var jobId = json[asyncJobResponse].jobid;
|
||||
var timerKey = "asyncJob_" + jobId;
|
||||
g_nonCompleteAsyncJob[jobId] = label2;
|
||||
$("body").everyTime(
|
||||
10000,
|
||||
timerKey,
|
||||
@ -499,6 +502,7 @@ function doActionToMidMenu(id, apiInfo, apiCommand) {
|
||||
return; //Job has not completed
|
||||
} else {
|
||||
$("body").stopTime(timerKey);
|
||||
delete g_nonCompleteAsyncJob[jobId];
|
||||
$midmenuItem1.find("#content").removeClass("inaction");
|
||||
$midmenuItem1.find("#spinning_wheel").hide();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user