linuxrouter/docker/routlin-dash/app/pages/bannedips/content.json
2026-05-27 20:56:30 -04:00

121 lines
No EOL
3.1 KiB
JSON

{
"id": "view_bannedips",
"client_requirement": "client_is_viewer+",
"items": [
{
"type": "header_page_title",
"items": [
{
"type": "h1",
"text": "Banned IPs"
},
{
"type": "p",
"text": "IPs and ranges blocked in both directions at the nftables firewall."
}
]
},
{
"type": "info_bar",
"variant": "info",
"text": "Supports single IPs, CIDR (94.130.0.0/16), wildcards (94.130.*.*), and ranges (94.130.52.1-20). IPv4 and IPv6 are both supported."
},
{
"type": "table",
"datasource": "config:banned_ips",
"empty_message": "No IP bans configured.",
"columns": [
{
"label": "Description",
"field": "description"
},
{
"label": "IP / Range",
"field": "ip",
"class": "col-mono"
},
{
"label": "Status",
"field": "enabled",
"render": "badge_enabled_disabled"
}
],
"row_actions": [
{
"client_requirement": "client_is_administrator+",
"action": "/action/edit_banned_ip",
"method": "inline_edit",
"text": "Edit",
"class": "btn-ghost btn-sm",
"fields": [
{
"col": "description",
"input_type": "text"
},
{
"col": "ip",
"input_type": "text"
},
{
"col": "enabled",
"input_type": "checkbox",
"checkbox_label": "Enabled"
}
]
},
{
"client_requirement": "client_is_administrator+",
"action": "/action/delete_banned_ip",
"method": "post",
"text": "Delete",
"class": "btn-danger btn-sm"
}
]
},
{
"type": "card",
"id": "add-form",
"label": "Add Banned IP",
"client_requirement": "client_is_administrator+",
"items": [
{
"type": "form",
"action": "/action/add_banned_ip",
"method": "post",
"items": [
{
"type": "field",
"label": "Description",
"name": "description",
"input_type": "text",
"placeholder": "e.g. Bad actor",
"hint": "Optional label for this entry."
},
{
"type": "field",
"label": "IP / Range",
"name": "ip",
"input_type": "text",
"placeholder": "e.g. 1.2.3.4 or 1.2.3.0/24"
},
{
"type": "button_row",
"items": [
{
"type": "button_primary",
"action": "/action/add_banned_ip",
"method": "post",
"text": "Add Banned IP"
},
{
"type": "button_cancel",
"text": "Cancel"
}
]
}
]
}
]
}
]
}