Development
This commit is contained in:
parent
31913e85a1
commit
1c7d9fbb96
2 changed files with 6 additions and 1 deletions
|
|
@ -955,6 +955,8 @@ def build_table_cell(value, render_fn, col_class='', field='', row_idx=None,
|
|||
return f'{td_open}{value}</td>'
|
||||
|
||||
if render_fn == 'tag_list':
|
||||
opts = render_options or {}
|
||||
prefer_short = opts.get('prefer_short', False)
|
||||
try:
|
||||
items = json.loads(value) if value.startswith('[') else [s.strip() for s in value.split(',')]
|
||||
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 ''
|
||||
if not s:
|
||||
return ''
|
||||
if prefer_short:
|
||||
return f'<span class="tag" data-tooltip="{e(tooltip)}">{e(short)}</span>'
|
||||
return (
|
||||
f'<span class="tag" data-tooltip="{e(tooltip)}">'
|
||||
f'<span class="tl-full">{e(s)}</span>'
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@
|
|||
{
|
||||
"label": "Self Ident(s)",
|
||||
"field": "server_identity_ips",
|
||||
"render": "tag_list"
|
||||
"render": "tag_list",
|
||||
"render_options": {"prefer_short": true}
|
||||
},
|
||||
{
|
||||
"label": "Blocklists",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue