Merge pull request #2663 from coreos-inc/multi-instance-su-panel
Disable debug logs in superuser panel when under multiple instances
This commit is contained in:
commit
b8e5a21736
3 changed files with 40 additions and 17 deletions
|
@ -3,6 +3,7 @@ import json
|
|||
import logging
|
||||
import os
|
||||
import string
|
||||
import socket
|
||||
|
||||
import pathvalidate
|
||||
|
||||
|
@ -101,6 +102,7 @@ class SuperUserGetLogsForService(ApiResource):
|
|||
abort(400)
|
||||
|
||||
return {
|
||||
'instance': socket.gethostname(),
|
||||
'logs': '\n'.join(logs)
|
||||
}
|
||||
|
||||
|
@ -121,6 +123,7 @@ class SuperUserSystemLogServices(ApiResource):
|
|||
""" List the system logs for the current system. """
|
||||
if SuperUserPermission().can():
|
||||
return {
|
||||
'instance': socket.gethostname(),
|
||||
'services': list(get_services())
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue