pari: branch 2.0 r3982 - in /branches/2.0/config: ./ js/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Mon Oct 20 16:53:42 CDT 2008
Author: pari
Date: Mon Oct 20 16:53:41 2008
New Revision: 3982
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3982
Log:
Improvement: Add Checkboxes in debugger to show/hide types of Log messages
Modified:
branches/2.0/config/flipadvanced.html
branches/2.0/config/index.html
branches/2.0/config/js/astman.js
branches/2.0/config/js/index.js
Modified: branches/2.0/config/flipadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/flipadvanced.html?view=diff&rev=3982&r1=3981&r2=3982
==============================================================================
--- branches/2.0/config/flipadvanced.html (original)
+++ branches/2.0/config/flipadvanced.html Mon Oct 20 16:53:41 2008
@@ -52,9 +52,7 @@
parent.$(".debugWindow").hide();
}else{
parent.sessionData.DEBUG_MODE = true;
- if ( !parent.sessionData.DEBUG_PROFILER_BEGIN ){
- parent.miscFunctions.DEBUG_START();
- }
+ parent.miscFunctions.DEBUG_START();
parent.$(".debugWindow").show();
}
});
Modified: branches/2.0/config/index.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/index.html?view=diff&rev=3982&r1=3981&r2=3982
==============================================================================
--- branches/2.0/config/index.html (original)
+++ branches/2.0/config/index.html Mon Oct 20 16:53:41 2008
@@ -76,7 +76,7 @@
// and NOT the channels on a digital span with FXS or FXO signalling
DEBUG_LOG : [], // all the debug log messages will be stored in this array (If debug mode is enabled)
DEBUG_MODE : false, // set to true when debugging -- parent.sessionData.DEBUG_MODE
- DEBUG_PROFILER_BEGIN : 0 , // store the timestamp when you start profiling
+ DEBUG_WHICH: { Ajax: true, Debug: true, Error: true, Console: true, Info: true, Warn: true } , // parent.sessionData.DEBUG_WHICH.Ajax/Debug/Error/Console/Info/Warn
REQUIRE_RESTART : false, // this flag is used to know if there are any updates in zapchan settings
// like if a FXS is assigned to a user or an analog trunk is created or something
// if this flag is true - we want to throw alert 'on ApplySettings' saying that a restart is required
@@ -274,6 +274,24 @@
<span id="dbw_flip" class='dbw_flip_show'>Hide debug messages</span>
</td>
<td align=right>
+ <input type='checkbox' id='debugWindow_which_Ajax'>
+ <label for='debugWindow_which_Ajax'> Ajax Requests </label>
+
+ <input type='checkbox' id='debugWindow_which_Debug'>
+ <label for='debugWindow_which_Debug'> Debug </label>
+
+ <input type='checkbox' id='debugWindow_which_Error'>
+ <label for='debugWindow_which_Error'> Error </label>
+
+ <input type='checkbox' id='debugWindow_which_Console'>
+ <label for='debugWindow_which_Console'> Console </label>
+
+ <input type='checkbox' id='debugWindow_which_Info'>
+ <label for='debugWindow_which_Info'> Info </label>
+
+ <input type='checkbox' id='debugWindow_which_Warnings'>
+ <label for='debugWindow_which_Warnings'> Warnings </label>
+
<span class='guiButton' onclick='miscFunctions.DEBUG_CLEAR();'>Clear</span>
</td>
</tr>
Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=3982&r1=3981&r2=3982
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Mon Oct 20 16:53:41 2008
@@ -704,14 +704,15 @@
},
Ajax: function(msg){ // ASTGUI.Log.Ajax(msg);
- this.doLog( msg , '#96997C' );
+ if ( parent.sessionData.DEBUG_WHICH.Ajax == true ) this.doLog( msg , '#96997C' );
},
Debug: function( msg ){ // ASTGUI.Log.Debug();
- this.doLog( msg , '#4C9996' );
+ if ( parent.sessionData.DEBUG_WHICH.Debug == true ) this.doLog( msg , '#4C9996' );
},
Error: function( msg ){ // ASTGUI.Log.Error();
+ if( !parent.sessionData.DEBUG_WHICH.Error == true ) return;
if( msg.length <=5 && ASTGUI.errorCodes[msg] ){
this.doLog( '<B>' + ASTGUI.errorCodes[msg] + '</B>' , '#992b23' );
}else{
@@ -720,15 +721,15 @@
},
Console: function( msg ){ // ASTGUI.Log.Console();
- if( window.console && window.console.firebug ) console.log ( msg );
+ if( parent.sessionData.DEBUG_WHICH.Console == true && window.console && window.console.firebug ) console.log ( msg );
},
Info: function( msg ){ // ASTGUI.Log.Info(msg);
- this.doLog( msg , '#9A9A9A' );
+ if( parent.sessionData.DEBUG_WHICH.Info == true ) this.doLog( msg , '#9A9A9A' );
},
Warn: function( msg ){ // ASTGUI.Log.Warn( msg );
- this.doLog( msg , '#F47A00' );
+ if( parent.sessionData.DEBUG_WHICH.Warn == true ) this.doLog( msg , '#F47A00' );
}
},
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=3982&r1=3981&r2=3982
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Mon Oct 20 16:53:41 2008
@@ -595,6 +595,8 @@
},
DEBUG_START : function(){
+ if ( sessionData.DEBUG_PROFILER_BEGIN ) return ; // we want to call DEBUG_START only once during a gui session
+
var m = _$('debug_messages');
var aaaaa = function(){
if(sessionData.DEBUG_MODE && sessionData.DEBUG_LOG.length){
@@ -626,6 +628,25 @@
});
aaaaa();
+
+ _$('debugWindow_which_Ajax').checked = sessionData.DEBUG_WHICH.Ajax ;
+ $('#debugWindow_which_Ajax').click(function(){ sessionData.DEBUG_WHICH.Ajax = (this.checked) ? true : false ; });
+
+ _$('debugWindow_which_Debug').checked = sessionData.DEBUG_WHICH.Debug ;
+ $('#debugWindow_which_Debug').click(function(){ sessionData.DEBUG_WHICH.Debug = (this.checked) ? true : false ; });
+
+ _$('debugWindow_which_Error').checked = sessionData.DEBUG_WHICH.Error ;
+ $('#debugWindow_which_Error').click(function(){ sessionData.DEBUG_WHICH.Error = (this.checked) ? true : false ; });
+
+ _$('debugWindow_which_Console').checked = sessionData.DEBUG_WHICH.Console ;
+ $('#debugWindow_which_Console').click(function(){ sessionData.DEBUG_WHICH.Console = (this.checked) ? true : false ; });
+
+ _$('debugWindow_which_Info').checked = sessionData.DEBUG_WHICH.Info ;
+ $('#debugWindow_which_Info').click(function(){ sessionData.DEBUG_WHICH.Info = (this.checked) ? true : false ; });
+
+ _$('debugWindow_which_Warnings').checked = sessionData.DEBUG_WHICH.Warn ;
+ $('#debugWindow_which_Warnings').click(function(){ sessionData.DEBUG_WHICH.Warn = (this.checked) ? true : false ; });
+
},
DEBUG_CLEAR : function(){
More information about the asterisk-gui-commits
mailing list