From dc27725739ff33148f4de0601e46c01a812e9898 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 23 Nov 2010 20:06:41 -0800 Subject: [PATCH] bug 7277: ISO page - after Download ISO action succeeds, show URL returned by API on dialog box and make URL clickable. (merge from 2.2.beta1 branch to master branch) --- ui/scripts/cloud.core.iso.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/scripts/cloud.core.iso.js b/ui/scripts/cloud.core.iso.js index 42fdb3b25fc..2fd4a12dae2 100644 --- a/ui/scripts/cloud.core.iso.js +++ b/ui/scripts/cloud.core.iso.js @@ -590,7 +590,7 @@ function doDownloadISO($actionLink, $detailsTab, $midmenuItem1) { var jobId = json.extractisoresponse.jobid; var timerKey = "asyncJob_" + jobId; $("body").everyTime( - 10000, + 2000, //this API returns fast. So, set 2 seconds instead of 10 seconds. timerKey, function() { $.ajax({ @@ -604,7 +604,11 @@ function doDownloadISO($actionLink, $detailsTab, $midmenuItem1) { $("body").stopTime(timerKey); $spinningWheel.hide(); if (result.jobstatus == 1) { // Succeeded - $infoContainer.find("#info").html("download ISO succeeded"); + $infoContainer.removeClass("error"); + $infoContainer.find("#icon,#info").removeClass("error"); + var url = fromdb(json.queryasyncjobresultresponse.jobresult.iso.url); + var htmlMsg = "Please click " + url + "" + " to download ISO"; + $infoContainer.find("#info").html(htmlMsg); $infoContainer.show(); } else if (result.jobstatus == 2) { // Failed handleErrorInDialog2(fromdb(result.jobresult.errortext), $dialogDownloadISO);