mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add an app_debug function
This commit is contained in:
parent
40ea9a328f
commit
7da60a6aec
2 changed files with 21 additions and 0 deletions
|
@ -499,6 +499,14 @@ app:
|
|||
full: --sql
|
||||
help: Initial SQL file
|
||||
|
||||
### app_debug()
|
||||
debug:
|
||||
action_help: Display all debug informations for an application
|
||||
api: GET /apps/<app>/debug
|
||||
arguments:
|
||||
app:
|
||||
help: App name
|
||||
|
||||
### app_makedefault()
|
||||
makedefault:
|
||||
action_help: Redirect domain root to an app
|
||||
|
|
|
@ -722,6 +722,19 @@ def app_clearaccess(auth, apps):
|
|||
app_ssowatconf(auth)
|
||||
|
||||
|
||||
def app_debug(app):
|
||||
with open(apps_setting_path + app + '/manifest.json') as f:
|
||||
manifest = json.loads(f.read())
|
||||
|
||||
return {
|
||||
'name': manifest['name'],
|
||||
'services_logs': [{
|
||||
'service': x,
|
||||
'log': service_log(x),
|
||||
} for x in manifest.get("services", [])]
|
||||
}
|
||||
|
||||
|
||||
def app_makedefault(auth, app, domain=None):
|
||||
"""
|
||||
Redirect domain root to an app
|
||||
|
|
Loading…
Add table
Reference in a new issue