Disable debug logs in superuser panel when under multiple instances

They don't work anyway (since logs will be loaded from random instances), so we just disable them
This commit is contained in:
Joseph Schorr 2017-05-24 14:34:29 -04:00
parent c55c233f1f
commit 9518f1d045
3 changed files with 41 additions and 18 deletions

View file

@ -18,10 +18,12 @@
// Monitor any user changes and place the current user into the scope.
UserService.updateUserIn($scope);
$scope.multipleInstances = false;
$scope.configStatus = null;
$scope.requiresRestart = null;
$scope.logsCounter = 0;
$scope.changeLog = null;
$scope.logsInstance = null;
$scope.debugServices = null;
$scope.debugLogs = null;
$scope.pollChannel = null;
@ -83,6 +85,13 @@
});
ApiService.getSystemLogs(null, params, /* background */true).then(function(resp) {
if ($scope.logsInstance != null && $scope.logsInstance != resp['instance']) {
$scope.multipleInstances = true;
callback(false);
return;
}
$scope.logsInstance = resp['instance'];
$scope.debugLogs = resp['logs'];
callback(true);
}, errorHandler);
@ -96,6 +105,13 @@
$scope.debugService = null;
ApiService.listSystemLogServices().then(function(resp) {
if ($scope.logsInstance != null && $scope.logsInstance != resp['instance']) {
$scope.multipleInstances = true;
callback(false);
return;
}
$scope.logsInstance = resp['instance'];
$scope.debugServices = resp['services'];
}, ApiService.errorDisplay('Cannot load system logs. Please contact support.'))
};