{ "client_requirement": "client_is_viewer+", "items": [ { "type": "header_page_title", "items": [ { "type": "h1", "text": "DHCP Reservations" }, { "type": "p", "text": "IP reservations and VLAN authorizations." } ] }, { "type": "table", "datasource": "config:dhcp_reservations", "empty_message": "No DHCP reservations configured.", "toolbar": { "items": [ { "type": "select", "name": "vlan_filter", "value": "all", "options": "%VLAN_FILTER_OPTIONS%", "filter_col": "vlan_name" } ] }, "columns": [ { "label": "Description", "field": "description" }, { "label": "Hostname", "field": "hostname", "class": "col-mono" }, { "label": "MAC", "field": "mac", "class": "col-mono" }, { "label": "IP", "field": "ip", "class": "col-mono" }, { "label": "VLAN", "field": "vlan_name" }, { "label": "RADIUS", "field": "radius_client", "render": "badge_yes_no" }, { "label": "Rule Status", "field": "enabled", "render": "badge_enabled_disabled" } ], "row_actions": [ { "client_requirement": "client_is_administrator+", "method": "js_edit", "target": "add-form", "text": "Edit", "class": "btn-ghost btn-sm" }, { "client_requirement": "client_is_administrator+", "action": "/action/dhcpreservations/reservations_delete", "method": "post", "text": "Delete", "class": "btn-danger btn-sm" } ] }, { "type": "card", "id": "add-form", "label": "Add Reservation/Authorization", "client_requirement": "client_is_administrator+", "items": [ { "type": "form", "action": "/action/dhcpreservations/addreservation_add", "method": "post", "items": [ { "type": "hidden", "name": "row_index", "value": "" }, { "type": "field", "label": "VLAN", "name": "vlan_name", "input_type": "select", "options": "%VLAN_NAMES_AS_OPTIONS%", "hint": "VLAN this reservation belongs to." }, { "type": "field", "label": "Description", "name": "description", "input_type": "text", "placeholder": "e.g. NAS" }, { "type": "field", "label": "Hostname", "name": "hostname", "input_type": "text", "validate": "VALIDATION_NETWORK_NAME", "optional": true, "placeholder": "e.g. nas", "attrs": { "data-res-hosts-by-vlan": "%RESERVATION_HOSTNAMES_BY_VLAN_JSON%" } }, { "type": "field", "label": "MAC Address", "name": "mac", "input_type": "text", "validate": "VALIDATION_MAC", "placeholder": "e.g. aa:bb:cc:dd:ee:ff" }, { "type": "field", "label": "IP Address", "name": "ip", "input_type": "text", "validate": "VALIDATION_IPV4_FORMAT|VALIDATION_ADDRESS", "optional": true, "placeholder": "e.g. 192.168.10.50", "hint": "Leave blank to authorize device on this VLAN dynamically.", "attrs": { "data-res-ips-by-vlan": "%RESERVATION_IPS_BY_VLAN_JSON%", "data-vlan-subnets": "%VLAN_SUBNET_INFO_JSON%", "data-vlan-select": "vlan_name" } }, { "type": "field", "label": "RADIUS Client", "name": "radius_client", "input_type": "checkbox", "hint": "This device acts as a RADIUS authenticator, verifying credentials of other devices on the network. Use this option for managed switches or wireless access points that should work with RADIUS." }, { "type": "field", "label": "Enabled", "name": "enabled", "input_type": "checkbox" }, { "type": "button_row", "items": [ { "type": "button_primary", "action": "/action/dhcpreservations/addreservation_add", "method": "post", "text": "Add" }, { "type": "button_cancel", "text": "Cancel" } ] } ] } ] } ] }