mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Improve behavior of yunopaste() for integration with the webadmin
This commit is contained in:
parent
f52f81cba6
commit
f89c41f3e4
2 changed files with 8 additions and 1 deletions
|
@ -225,6 +225,7 @@
|
||||||
"log_app_remove": "Remove '{}' application",
|
"log_app_remove": "Remove '{}' application",
|
||||||
"log_app_upgrade": "Upgrade '{}' application",
|
"log_app_upgrade": "Upgrade '{}' application",
|
||||||
"log_app_makedefault": "Make '{}' as default application",
|
"log_app_makedefault": "Make '{}' as default application",
|
||||||
|
"log_available_on_yunopaste": "This log is now available via {url}",
|
||||||
"log_backup_restore_system": "Restore system from a backup archive",
|
"log_backup_restore_system": "Restore system from a backup archive",
|
||||||
"log_backup_restore_app": "Restore '{}' from a backup archive",
|
"log_backup_restore_app": "Restore '{}' from a backup archive",
|
||||||
"log_remove_on_failed_restore": "Remove '{}' after a failed restore from a backup archive",
|
"log_remove_on_failed_restore": "Remove '{}' after a failed restore from a backup archive",
|
||||||
|
|
|
@ -158,7 +158,13 @@ def log_display(path, number=50, share=False):
|
||||||
if os.path.exists(log_path):
|
if os.path.exists(log_path):
|
||||||
content += read_file(log_path)
|
content += read_file(log_path)
|
||||||
|
|
||||||
return yunopaste(content)
|
url = yunopaste(content)
|
||||||
|
|
||||||
|
logger.info(m18n.n("log_available_on_yunopaste", url=url))
|
||||||
|
if msettings.get('interface') == 'api':
|
||||||
|
return { "url" : url }
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
|
||||||
# Display metadata if exist
|
# Display metadata if exist
|
||||||
if os.path.exists(md_path):
|
if os.path.exists(md_path):
|
||||||
|
|
Loading…
Add table
Reference in a new issue