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

135 lines
No EOL
3.4 KiB
JSON

{
"id": "view_hostoverrides",
"client_requirement": "client_is_viewer+",
"items": [
{
"type": "header_page_title",
"items": [
{
"type": "h1",
"text": "Host Overrides"
},
{
"type": "p",
"text": "Force a hostname to resolve to a specific internal IP."
}
]
},
{
"type": "table",
"datasource": "config:host_overrides",
"empty_message": "No host overrides configured.",
"columns": [
{
"label": "Description",
"field": "description"
},
{
"label": "Hostname",
"field": "host",
"class": "col-mono"
},
{
"label": "Resolves To",
"field": "ip",
"class": "col-mono"
},
{
"label": "Status",
"field": "enabled",
"render": "badge_enabled_disabled"
}
],
"row_actions": [
{
"client_requirement": "client_is_administrator+",
"action": "/action/edit_host_override",
"method": "inline_edit",
"text": "Edit",
"class": "btn-ghost btn-sm",
"fields": [
{
"col": "description",
"input_type": "text"
},
{
"col": "host",
"input_type": "text",
"validate": "domainname"
},
{
"col": "ip",
"input_type": "text",
"validate": "ip"
},
{
"col": "enabled",
"input_type": "checkbox",
"checkbox_label": "Enabled"
}
]
},
{
"client_requirement": "client_is_administrator+",
"action": "/action/delete_host_override",
"method": "post",
"text": "Delete",
"class": "btn-danger btn-sm"
}
]
},
{
"type": "card",
"id": "add-form",
"label": "Add Host Override",
"client_requirement": "client_is_administrator+",
"items": [
{
"type": "form",
"action": "/action/add_host_override",
"method": "post",
"items": [
{
"type": "field",
"label": "Description",
"name": "description",
"input_type": "text",
"placeholder": "e.g. Local server"
},
{
"type": "field",
"label": "Hostname",
"name": "host",
"input_type": "text",
"validate": "domainname",
"placeholder": "e.g. server.home.local"
},
{
"type": "field",
"label": "Resolves To",
"name": "ip",
"input_type": "text",
"validate": "ip",
"placeholder": "e.g. 192.168.1.100"
},
{
"type": "button_row",
"items": [
{
"type": "button_primary",
"action": "/action/add_host_override",
"method": "post",
"text": "Add Host Override"
},
{
"type": "button_cancel",
"text": "Cancel"
}
]
}
]
}
]
}
]
}