pari: branch appliance r222 - /branches/appliance/config/backup.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Jan 9 15:06:44 MST 2007


Author: pari
Date: Tue Jan  9 16:06:43 2007
New Revision: 222

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=222
Log:
reverting backup.html to previous

Modified:
    branches/appliance/config/backup.html

Modified: branches/appliance/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/backup.html?view=diff&rev=222&r1=221&r2=222
==============================================================================
--- branches/appliance/config/backup.html (original)
+++ branches/appliance/config/backup.html Tue Jan  9 16:06:43 2007
@@ -41,22 +41,20 @@
 }
 
 function removebkpfile(){
-	$('message_text').innerHTML = "Please wait while the system <BR> Generates a Backup ... ";
-	$('status_message').style.display="block";
+	$('status_message').style.display='none';
 	//remove bkpfile on server 
-	parent.astmanEngine.run_tool("/bin/rm " + bkp_path+ "conf_* -f", download_bkp );
+	parent.astmanEngine.run_tool("/bin/rm " +  bkp_path+ bkpfile , callback=function(){} );
 }
 
 
 function showremovebkpfile(){
-	$('status_message').style.display='none';
-//	$('message_text').innerHTML =  "<A href=\"#\" onclick=\"removebkpfile()\">I have downloaded the file</A><BR><BR>" + "<A href=\"./bkps/"+ bkpfile  +"\" onclick=\"showremovebkpfile()\">ReDownload</A>";
+	$('message_text').innerHTML =  "<A href=\"#\" onclick=\"removebkpfile()\">I have downloaded the file</A><BR><BR>" + "<A href=\"./bkps/"+ bkpfile  +"\">ReDownload</A>";
 }
 
 
 
 function download_bkp(){
-
+		$('message_text').innerHTML = "Please wait while the system <BR> Generates a Backup ... ";
 		var today=new Date()
 		var year = today.getFullYear();
 		var month = addzero(today.getMonth() + 1);
@@ -65,12 +63,14 @@
 		var minute =addzero(today.getMinutes());
 		var seconds =addzero(today.getSeconds());
 		bkpfile =  "conf_" + year + month + day + hour  + minute +seconds  +".tar";
+
+		$('status_message').style.display="block";
 		parent.astmanEngine.run_tool("/bin/tar -cf "+ bkp_path + bkpfile +" /etc/asterisk/", callback=function(){
-							$('status').innerHTML = " <I> Finished generating Backup ! </I>";
-							$('status_message').style.display="none";
-							window.location.href = "./bkps/"+ bkpfile ;
-							//$('message_text').innerHTML = "<A href=\"./bkps/"+ bkpfile  +"\" onclick=\"showremovebkpfile()\">Click Here to Download</A>";
-		} );
+ 							$('status').innerHTML = " <I> Finished generating Backup ! </I>";
+ 							$('message_text').innerHTML = "<A href=\"./bkps/"+ bkpfile  +"\" onclick=\"showremovebkpfile()\">Click Here to Download</A>";
+			}
+		);
+
 }
 
 </script>
@@ -85,7 +85,7 @@
 	<tr>
 		<td valign="top" align="center">
 			<BR><BR>
-			<Input type="button" onclick="removebkpfile()" value="Download a Configuration backup">	
+			<Input type="button" onclick="download_bkp()" value="Download a Configuration backup">	
 		</td>
 	</tr>
 	<tr>



More information about the asterisk-gui-commits mailing list