{ "client_requirement": "client_is_viewer+", "items": [ { "type": "header_page_title", "items": [ { "type": "h1", "text": "Client Credentials" }, { "type": "p", "text": "Username and password credentials for 802.1X supplicants and captive portal authentication." } ] }, { "type": "raw_html", "html": "%PRO_NOTE%" }, { "type": "table", "datasource": "sqlite:client_credentials", "empty_message": "No credentials configured.", "columns": [ { "label": "Username", "field": "username", "class": "col-mono" }, { "label": "Description", "field": "description" }, { "label": "Type", "field": "user_type_label", "class": "col-narrow" }, { "label": "VLAN", "field": "vlan", "class": "col-narrow col-mono" }, { "label": "Enabled", "field": "enabled", "class": "col-narrow", "render": "badge_toggle", "toggle_action": "/action/clientcredentials/toggle", "client_requirement": "client_is_administrator+" }, { "label": "Session", "field": "expires_label", "class": "col-narrow" } ], "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/clientcredentials/delete", "method": "post", "text": "Delete", "class": "btn-danger btn-sm" } ] }, { "type": "card", "id": "add-form", "label": "Add User Account", "client_requirement": "client_is_administrator+", "items": [ { "type": "form", "action": "/action/clientcredentials/addedit", "method": "post", "items": [ { "type": "hidden", "name": "row_index", "value": "" }, { "type": "field", "label": "Account Active", "name": "enabled", "input_type": "checkbox", "value": "true" }, { "type": "raw_html", "html": "" }, { "type": "field", "label": "User Type", "name": "user_type", "input_type": "select", "options": [ {"value": "", "label": "-- Select User Type --"}, {"value": "0", "label": "Captive Portal"}, {"value": "1", "label": "802.1X Supplicant"} ] }, { "type": "raw_html", "html": "