##// END OF EJS Templates
summary-snapshot: fix formatting of snapshot + code cleanup.
ergo -
r3900:eb26e862 default
parent child Browse files
Show More
@@ -90,6 +90,7 b' def get_cert_path(ini_path):'
90
90
91 return default
91 return default
92
92
93
93 class SysInfoRes(object):
94 class SysInfoRes(object):
94 def __init__(self, value, state=None, human_value=None):
95 def __init__(self, value, state=None, human_value=None):
95 self.value = value
96 self.value = value
@@ -187,7 +188,7 b' def ulimit_info():'
187 ('open files', get_resource(resource.RLIMIT_NOFILE)),
188 ('open files', get_resource(resource.RLIMIT_NOFILE)),
188 ])
189 ])
189
190
190 text = ', '.join('{}:{}'.format(k,v) for k,v in data.items())
191 text = ', '.join('{}:{}'.format(k, v) for k, v in data.items())
191
192
192 value = {
193 value = {
193 'limits': data,
194 'limits': data,
@@ -4,9 +4,9 b' SYSTEM INFO'
4 -----------
4 -----------
5
5
6 % for dt, dd, warn in c.data_items:
6 % for dt, dd, warn in c.data_items:
7 ${'{:<60}'.format(dt.lower().replace(' ', '_'))}${': '+dd if dt else ''}
7 ${'{:<60}'.format(dt.lower().replace(' ', '_'))}${': {}'.format(dd if dt else '')}
8 % if warn and warn['message']:
8 % if warn and warn['message']:
9 ALERT_${warn['type'].upper()} ${warn['message']}
9 ${'{:<60}'.format('ALERT')} ${warn['type'].upper()} ${warn['message']}
10 % endif
10 % endif
11 % endfor
11 % endfor
12
12
General Comments 0
You need to be logged in to leave comments. Login now