linuxrouter/docker/routlin-dash/app/pages/portforwarding/content.json
2026-05-31 00:22:39 -04:00

166 lines
No EOL
4.3 KiB
JSON

{
"client_requirement": "client_is_viewer+",
"items": [
{
"type": "header_page_title",
"items": [
{
"type": "h1",
"text": "Port Forwarding"
},
{
"type": "p",
"text": "DNAT rules that forward inbound WAN traffic to internal hosts."
}
]
},
{
"type": "table",
"datasource": "config:port_forwarding",
"empty_message": "No port forwarding rules configured.",
"columns": [
{
"label": "Description",
"field": "description"
},
{
"label": "Protocol",
"field": "protocol",
"class": "col-mono"
},
{
"label": "Ext Port",
"field": "dest_port",
"class": "col-mono"
},
{
"label": "NAT IP",
"field": "nat_ip",
"class": "col-mono"
},
{
"label": "NAT Port",
"field": "nat_port",
"class": "col-mono"
},
{
"label": "Status",
"field": "enabled",
"render": "badge_enabled_disabled"
}
],
"row_actions": [
{
"client_requirement": "client_is_administrator+",
"action": "/action/portforwarding/rules_edit",
"method": "inline_edit",
"text": "Edit",
"class": "btn-ghost btn-sm",
"fields": [
{
"col": "description",
"input_type": "text"
},
{
"col": "protocol",
"input_type": "select",
"options": "%PROTOCOL_OPTIONS%"
},
{
"col": "dest_port",
"input_type": "text"
},
{
"col": "nat_ip",
"input_type": "text"
},
{
"col": "nat_port",
"input_type": "text"
},
{
"col": "enabled",
"input_type": "checkbox",
"checkbox_label": "Enabled"
}
]
},
{
"client_requirement": "client_is_administrator+",
"action": "/action/portforwarding/rules_delete",
"method": "post",
"text": "Delete",
"class": "btn-danger btn-sm"
}
]
},
{
"type": "card",
"id": "add-form",
"label": "Add Rule",
"client_requirement": "client_is_administrator+",
"items": [
{
"type": "form",
"action": "/action/portforwarding/addrule_add",
"method": "post",
"items": [
{
"type": "field",
"label": "Description",
"name": "description",
"input_type": "text",
"placeholder": "e.g. Minecraft server"
},
{
"type": "field",
"label": "Protocol",
"name": "protocol",
"input_type": "select",
"options": "%PROTOCOL_OPTIONS%"
},
{
"type": "field",
"label": "Ext Port",
"name": "dest_port",
"input_type": "text",
"validate": "VALIDATION_PORT",
"placeholder": "e.g. 25565"
},
{
"type": "field",
"label": "NAT IP",
"name": "nat_ip",
"input_type": "text",
"validate": "VALIDATION_IPV4_FORMAT",
"placeholder": "e.g. 192.168.1.50"
},
{
"type": "field",
"label": "NAT Port",
"name": "nat_port",
"input_type": "text",
"validate": "VALIDATION_PORT",
"placeholder": "e.g. 25565"
},
{
"type": "button_row",
"items": [
{
"type": "button_primary",
"action": "/action/portforwarding/addrule_add",
"method": "post",
"text": "Add Rule"
},
{
"type": "button_cancel",
"text": "Cancel"
}
]
}
]
}
]
}
]
}