mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Enable $AnsibleConfig.debug_mode
Angular logging now respects the debug_mode paraemter in the js/config.js file. When set to true $log.debug messages will appear in the browser console. Set to false and they no longer appear.
This commit is contained in:
parent
fb09a4b693
commit
490d53419e
@ -392,6 +392,20 @@ angular.module('Tower', [
|
||||
});
|
||||
}
|
||||
])
|
||||
|
||||
.config(function($provide) {
|
||||
$provide.decorator('$log', function($delegate) {
|
||||
var _debug = $delegate.debug;
|
||||
$delegate.debug = function(msg) {
|
||||
// only show debug messages when debug_mode set to true in config
|
||||
if ($AnsibleConfig.debug_mode) {
|
||||
_debug(msg);
|
||||
}
|
||||
}
|
||||
return $delegate;
|
||||
});
|
||||
})
|
||||
|
||||
.run(['$compile', '$cookieStore', '$rootScope', '$log', 'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'ViewLicense',
|
||||
'Timer', 'ClearScope', 'HideStream', 'Socket',
|
||||
function ($compile, $cookieStore, $rootScope, $log, CheckLicense, $location, Authorization, LoadBasePaths, ViewLicense,
|
||||
|
||||
@ -14,7 +14,7 @@ var $AnsibleConfig = {
|
||||
|
||||
tooltip_delay: {show: 500, hide: 100}, // Default number of milliseconds to delay displaying/hiding tooltips
|
||||
|
||||
debug_mode: true, // Enable console logging messages
|
||||
debug_mode: false, // Enable console logging messages
|
||||
|
||||
password_strength: 45, // User password strength. Integer between 0 and 100, 100 being impossibly strong.
|
||||
// This value controls progress bar colors:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user