mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -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:
@@ -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',
|
.run(['$compile', '$cookieStore', '$rootScope', '$log', 'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'ViewLicense',
|
||||||
'Timer', 'ClearScope', 'HideStream', 'Socket',
|
'Timer', 'ClearScope', 'HideStream', 'Socket',
|
||||||
function ($compile, $cookieStore, $rootScope, $log, CheckLicense, $location, Authorization, LoadBasePaths, ViewLicense,
|
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
|
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.
|
password_strength: 45, // User password strength. Integer between 0 and 100, 100 being impossibly strong.
|
||||||
// This value controls progress bar colors:
|
// This value controls progress bar colors:
|
||||||
|
|||||||
Reference in New Issue
Block a user