# HG changeset patch # User Marcin Lulek # Date 2019-08-26 14:58:08 # Node ID eb26e862995c7ae198f727e3b359884de2b41eac # Parent 61633de6835c0d47af90c059520b8ab551a9b5f8 summary-snapshot: fix formatting of snapshot + code cleanup. diff --git a/rhodecode/lib/system_info.py b/rhodecode/lib/system_info.py --- a/rhodecode/lib/system_info.py +++ b/rhodecode/lib/system_info.py @@ -90,6 +90,7 @@ def get_cert_path(ini_path): return default + class SysInfoRes(object): def __init__(self, value, state=None, human_value=None): self.value = value @@ -187,7 +188,7 @@ def ulimit_info(): ('open files', get_resource(resource.RLIMIT_NOFILE)), ]) - text = ', '.join('{}:{}'.format(k,v) for k,v in data.items()) + text = ', '.join('{}:{}'.format(k, v) for k, v in data.items()) value = { 'limits': data, diff --git a/rhodecode/templates/admin/settings/settings_system_snapshot.mako b/rhodecode/templates/admin/settings/settings_system_snapshot.mako --- a/rhodecode/templates/admin/settings/settings_system_snapshot.mako +++ b/rhodecode/templates/admin/settings/settings_system_snapshot.mako @@ -4,9 +4,9 @@ SYSTEM INFO ----------- % for dt, dd, warn in c.data_items: -${'{:<60}'.format(dt.lower().replace(' ', '_'))}${': '+dd if dt else ''} +${'{:<60}'.format(dt.lower().replace(' ', '_'))}${': {}'.format(dd if dt else '')} % if warn and warn['message']: - ALERT_${warn['type'].upper()} ${warn['message']} +${'{:<60}'.format('ALERT')} ${warn['type'].upper()} ${warn['message']} % endif % endfor