Development

This commit is contained in:
Matthew Grotke 2026-06-01 01:06:16 -04:00
parent 31913e85a1
commit 1c7d9fbb96
2 changed files with 6 additions and 1 deletions

View file

@ -955,6 +955,8 @@ def build_table_cell(value, render_fn, col_class='', field='', row_idx=None,
return f'{td_open}{value}</td>' return f'{td_open}{value}</td>'
if render_fn == 'tag_list': if render_fn == 'tag_list':
opts = render_options or {}
prefer_short = opts.get('prefer_short', False)
try: try:
items = json.loads(value) if value.startswith('[') else [s.strip() for s in value.split(',')] items = json.loads(value) if value.startswith('[') else [s.strip() for s in value.split(',')]
except Exception: except Exception:
@ -970,6 +972,8 @@ def build_table_cell(value, render_fn, col_class='', field='', row_idx=None,
mini = s[0] if s else '' mini = s[0] if s else ''
if not s: if not s:
return '' return ''
if prefer_short:
return f'<span class="tag" data-tooltip="{e(tooltip)}">{e(short)}</span>'
return ( return (
f'<span class="tag" data-tooltip="{e(tooltip)}">' f'<span class="tag" data-tooltip="{e(tooltip)}">'
f'<span class="tl-full">{e(s)}</span>' f'<span class="tl-full">{e(s)}</span>'

View file

@ -52,7 +52,8 @@
{ {
"label": "Self Ident(s)", "label": "Self Ident(s)",
"field": "server_identity_ips", "field": "server_identity_ips",
"render": "tag_list" "render": "tag_list",
"render_options": {"prefer_short": true}
}, },
{ {
"label": "Blocklists", "label": "Blocklists",