Development

This commit is contained in:
Matthew Grotke 2026-05-27 00:47:28 -04:00
parent f237c69307
commit 9b6543a4bf

View file

@ -306,7 +306,8 @@ def _config_datasource(name):
{'n': bl, 'd': bl_desc.get(bl, bl)} for bl in v.get('use_blocklists', [])
])
row['server_identity_ips'] = json.dumps([
s.get('ip', '') for s in v.get('server_identities', []) if s.get('ip')
{'n': s['ip'], 'd': s['ip'], 'short': s['ip'].rsplit('.', 1)[-1], 'mini': s['ip'].rsplit('.', 1)[-1]}
for s in v.get('server_identities', []) if s.get('ip')
])
rows.append(row)
return rows
@ -1702,12 +1703,14 @@ def _render_table_cell(value, render_fn, col_class='', field='', row_idx=None,
def _tag(t):
if isinstance(t, dict):
s, tooltip = str(t.get('n', '')).strip(), str(t.get('d', t.get('n', ''))).strip()
short = str(t['short']).strip() if 'short' in t else s.split('-')[0]
mini = str(t['mini']).strip() if 'mini' in t else (s[0] if s else '')
else:
s = tooltip = str(t).strip()
short = s.split('-')[0]
mini = s[0] if s else ''
if not s:
return ''
short = s.split('-')[0]
mini = s[0]
return (
f'<span class="tag" data-tooltip="{e(tooltip)}">'
f'<span class="tl-full">{e(s)}</span>'