summary-snapshot: fix formatting of snapshot + code cleanup.
This commit is contained in:
parent
e9ca6badf7
commit
a60f0b8b09
2 changed files with 4 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue