{ "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/hostoverrides/table_edit", "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": "ipv4" }, { "col": "enabled", "input_type": "checkbox", "checkbox_label": "Enabled" } ] }, { "client_requirement": "client_is_administrator+", "action": "/action/hostoverrides/table_delete", "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/hostoverrides/addoverride_add", "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": "ipv4", "placeholder": "e.g. 192.168.1.100" }, { "type": "button_row", "items": [ { "type": "button_primary", "action": "/action/hostoverrides/addoverride_add", "method": "post", "text": "Add Host Override" }, { "type": "button_cancel", "text": "Cancel" } ] } ] } ] } ] }