Development
This commit is contained in:
parent
d8d1d46fd2
commit
eed1d295dc
69 changed files with 3355 additions and 3230 deletions
221
docker/routlin-dash/app/pages/dhcp/content.json
Normal file
221
docker/routlin-dash/app/pages/dhcp/content.json
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
{
|
||||
"id": "view_dhcp",
|
||||
"client_requirement": "client_is_viewer+",
|
||||
"items": [
|
||||
{
|
||||
"type": "header_page_title",
|
||||
"items": [
|
||||
{
|
||||
"type": "h1",
|
||||
"text": "DHCP"
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"text": "Active leases, IP reservations, and VLAN authorizations."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"datasource": "live:dhcp_leases",
|
||||
"empty_message": "No active DHCP leases found.",
|
||||
"columns": [
|
||||
{
|
||||
"label": "Hostname",
|
||||
"field": "hostname"
|
||||
},
|
||||
{
|
||||
"label": "IP Address",
|
||||
"field": "ip_address",
|
||||
"class": "col-mono"
|
||||
},
|
||||
{
|
||||
"label": "MAC Address",
|
||||
"field": "mac_address",
|
||||
"class": "col-mono"
|
||||
},
|
||||
{
|
||||
"label": "VLAN",
|
||||
"field": "vlan_name"
|
||||
},
|
||||
{
|
||||
"label": "Expires",
|
||||
"field": "expires"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"datasource": "config:dhcp_reservations",
|
||||
"empty_message": "No DHCP reservations configured.",
|
||||
"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": "Status",
|
||||
"field": "enabled",
|
||||
"render": "badge_enabled_disabled"
|
||||
}
|
||||
],
|
||||
"toolbar": {
|
||||
"items": [
|
||||
{
|
||||
"type": "select",
|
||||
"name": "vlan_filter",
|
||||
"value": "all",
|
||||
"options": "%VLAN_FILTER_OPTIONS%",
|
||||
"filter_col": "vlan_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"row_actions": [
|
||||
{
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"action": "/action/edit_dhcp_reservation",
|
||||
"method": "inline_edit",
|
||||
"text": "Edit",
|
||||
"class": "btn-ghost btn-sm",
|
||||
"fields": [
|
||||
{
|
||||
"col": "description",
|
||||
"input_type": "text"
|
||||
},
|
||||
{
|
||||
"col": "hostname",
|
||||
"input_type": "text",
|
||||
"validate": "networkname"
|
||||
},
|
||||
{
|
||||
"col": "mac",
|
||||
"input_type": "text",
|
||||
"validate": "mac"
|
||||
},
|
||||
{
|
||||
"col": "ip",
|
||||
"input_type": "text"
|
||||
},
|
||||
{
|
||||
"col": "radius_client",
|
||||
"input_type": "checkbox",
|
||||
"checkbox_label": "Enabled"
|
||||
},
|
||||
{
|
||||
"col": "enabled",
|
||||
"input_type": "checkbox",
|
||||
"checkbox_label": "Enabled"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"action": "/action/delete_dhcp_reservation",
|
||||
"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/add_dhcp_reservation",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"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": "networkname",
|
||||
"placeholder": "e.g. nas"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "MAC Address",
|
||||
"name": "mac",
|
||||
"input_type": "text",
|
||||
"validate": "mac",
|
||||
"placeholder": "e.g. aa:bb:cc:dd:ee:ff"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "IP Address",
|
||||
"name": "ip",
|
||||
"input_type": "text",
|
||||
"placeholder": "e.g. 192.168.10.50",
|
||||
"hint": "Leave blank to authorize device on this VLAN dynamically."
|
||||
},
|
||||
{
|
||||
"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."
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/add_dhcp_reservation",
|
||||
"method": "post",
|
||||
"text": "Add"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue