pari: branch 2.0 r3772 - in /branches/2.0/config: backup.html js/index.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Sep 5 15:23:03 CDT 2008
Author: pari
Date: Fri Sep 5 15:23:02 2008
New Revision: 3772
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3772
Log:
Trying to fix the "The GUI does not have necessary privileges." errors
that started to appear recently.
Modified:
branches/2.0/config/backup.html
branches/2.0/config/js/index.js
Modified: branches/2.0/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/backup.html?view=diff&rev=3772&r1=3771&r2=3772
==============================================================================
--- branches/2.0/config/backup.html (original)
+++ branches/2.0/config/backup.html Fri Sep 5 15:23:02 2008
@@ -105,6 +105,31 @@
$('#thispageContent').hide();
return true;
}
+
+ var rand_2 = Math.round(100000*Math.random());
+ var tmp_check_perms_guibkps = function(){
+ ASTGUI.dialog.waitWhile('Checking write privileges on backups folder');
+ ASTGUI.systemCmd( "touch "+ ASTGUI.paths['ConfigBkp'] + rand_2 , function(){
+
+ ASTGUI.listSystemFiles( ASTGUI.paths['ConfigBkp'], function(a){
+ a = a.join('');
+ if( a.contains(rand_2) ){
+ ASTGUI.systemCmd( "rm '"+ ASTGUI.paths['ConfigBkp'] + rand_2 + "'" , function(){});
+ }else{
+ ASTGUI.dialog.alertmsg( 'missing ' + ASTGUI.paths['ConfigBkp'] + '<BR> OR Asterisk does not have write privileges on ' + ASTGUI.paths['ConfigBkp'] );
+ return;
+ }
+
+ localajaxinit_2();
+ });
+ });
+ };
+
+ tmp_check_perms_guibkps();
+
+}
+
+var localajaxinit_2 = function(){
parent.ASTGUI.dialog.waitWhile(' Loading list of Previous Backup files !');
parent.ASTGUI.systemCmd( "mkdir -p " + bkpPath , function(){
parent.ASTGUI.listSystemFiles( bkpPath , function(bkpfiles) {
Modified: branches/2.0/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/index.js?view=diff&rev=3772&r1=3771&r2=3772
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Fri Sep 5 15:23:02 2008
@@ -210,41 +210,20 @@
},
check_WritePermissionsFor_GUI_Folder : function(){
+ if(sessionData.PLATFORM.isAA50 ){
+ onLogInFunctions.checkForCompactFlash();
+ return;
+ }
+
ASTGUI.dialog.waitWhile('Checking write permission for gui folder');
var rand_1 = Math.round(100000*Math.random());
- var rand_2 = Math.round(100000*Math.random());
-
- var tmp_check_perms_guibkps = function(){
- ASTGUI.dialog.waitWhile('Checking write privileges on backups folder');
-
- ASTGUI.systemCmd( "touch '"+ ASTGUI.paths['ConfigBkp'] + rand_2 + "'" , function(){
- ASTGUI.listSystemFiles( ASTGUI.paths['ConfigBkp'], function(a){
- a = a.join();
- if( a.contains(rand_2) ){
- ASTGUI.systemCmd( "rm '"+ ASTGUI.paths['ConfigBkp'] + rand_2 + "'" , function(){
- ASTGUI.dialog.waitWhile('detecting Hardware ..');
- //ASTGUI.systemCmd( ASTGUI.apps.Ztscan, onLogInFunctions.updatePanels4Platform );
- if(sessionData.PLATFORM.isAA50 ){
- onLogInFunctions.checkForCompactFlash();
- }else{
- onLogInFunctions.runZtscan();
- }
- });
- }else{
- ASTGUI.dialog.alertmsg( 'missing ' + ASTGUI.paths['ConfigBkp'] + '<BR> OR Asterisk does not have write privileges on ' + ASTGUI.paths['ConfigBkp'] );
- return;
- }
- });
- });
- };
-
ASTGUI.systemCmdWithOutput( "echo '" + rand_1 + "'" , function(s){
- if( s.contains(rand_1) ){
- tmp_check_perms_guibkps();
- }else{
+ if( !s.contains(rand_1) ){
ASTGUI.dialog.alertmsg( 'Asterisk needs write privileges on ' + ASTGUI.paths['guiInstall'] );
- return;
- }
+ }
+
+ ASTGUI.dialog.waitWhile('detecting Hardware ..');
+ onLogInFunctions.runZtscan();
});
},
More information about the asterisk-gui-commits
mailing list