Development
This commit is contained in:
parent
b35df8fce7
commit
7bcf7a6837
2 changed files with 61 additions and 1 deletions
|
|
@ -1204,6 +1204,58 @@ def _render_item(item, tokens, inherited_req=None):
|
|||
value = e(apply_tokens(item.get('value', ''), tokens))
|
||||
return f'<input type="hidden" name="{name}" value="{value}"/>'
|
||||
|
||||
if t == 'identity_builder':
|
||||
label = e(item.get('label', 'Self Ident(s):'))
|
||||
return (
|
||||
'<div class="form-group identity-builder">'
|
||||
f'<label class="form-label">{label}</label>'
|
||||
'<div class="identity-builder-body">'
|
||||
'<div class="identity-builder-list">'
|
||||
'<table class="data-table identity-list-table">'
|
||||
'<thead><tr><th>IP Address</th><th>Description</th><th>Hostname</th><th></th></tr></thead>'
|
||||
'<tbody class="identity-builder-rows">'
|
||||
'<tr class="identity-empty-row">'
|
||||
'<td colspan="4" class="table-empty">No identities added.</td>'
|
||||
'</tr>'
|
||||
'</tbody>'
|
||||
'</table>'
|
||||
'</div>'
|
||||
'<div class="identity-builder-form">'
|
||||
'<table class="inline-edit-labeled-table">'
|
||||
'<tbody>'
|
||||
'<tr>'
|
||||
'<td class="identity-input-label">IP Address:</td>'
|
||||
'<td>'
|
||||
'<input type="text" class="form-input inline-edit-input identity-ip-input" placeholder="x.x.x.x"/>'
|
||||
'<p class="form-hint field-dyn-hint hidden"></p>'
|
||||
'</td>'
|
||||
'</tr>'
|
||||
'<tr>'
|
||||
'<td class="identity-input-label">Description (Opt):</td>'
|
||||
'<td><input type="text" class="form-input inline-edit-input identity-desc-input"/></td>'
|
||||
'</tr>'
|
||||
'<tr>'
|
||||
'<td class="identity-input-label">Hostname (Opt):</td>'
|
||||
'<td>'
|
||||
'<input type="text" class="form-input inline-edit-input identity-host-input"'
|
||||
' data-validate="networkname"/>'
|
||||
'<p class="form-hint field-dyn-hint hidden"></p>'
|
||||
'</td>'
|
||||
'</tr>'
|
||||
'<tr>'
|
||||
'<td></td>'
|
||||
'<td><button type="button" class="btn btn-secondary btn-sm identity-add-btn">Add</button></td>'
|
||||
'</tr>'
|
||||
'</tbody>'
|
||||
'</table>'
|
||||
'</div>'
|
||||
'</div>'
|
||||
'<textarea name="server_identity_ips" class="hidden"></textarea>'
|
||||
'<textarea name="server_identity_descriptions" class="hidden"></textarea>'
|
||||
'<textarea name="server_identity_hostnames" class="hidden"></textarea>'
|
||||
'</div>'
|
||||
)
|
||||
|
||||
if t == 'field':
|
||||
return _render_field(item, tokens)
|
||||
|
||||
|
|
|
|||
|
|
@ -1569,7 +1569,8 @@
|
|||
},
|
||||
{
|
||||
"col": "subnet",
|
||||
"input_type": "text"
|
||||
"input_type": "text",
|
||||
"validate": "subnet"
|
||||
},
|
||||
{
|
||||
"col": "subnet_mask",
|
||||
|
|
@ -1694,6 +1695,13 @@
|
|||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "identity_builder",
|
||||
"label": "Self Ident(s):"
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Blocklists",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue