Development
This commit is contained in:
parent
d8d1d46fd2
commit
eed1d295dc
69 changed files with 3355 additions and 3230 deletions
295
docker/routlin-dash/app/pages/ddns/content.json
Normal file
295
docker/routlin-dash/app/pages/ddns/content.json
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
{
|
||||
"id": "view_ddns",
|
||||
"client_requirement": "client_is_viewer+",
|
||||
"items": [
|
||||
{
|
||||
"type": "header_page_title",
|
||||
"items": [
|
||||
{
|
||||
"type": "h1",
|
||||
"text": "DDNS"
|
||||
},
|
||||
{
|
||||
"type": "p",
|
||||
"text": "Dynamic DNS provider status and last known IP update."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat_card_grid",
|
||||
"items": [
|
||||
{
|
||||
"type": "stat_card",
|
||||
"label": "Current Public IP",
|
||||
"value": "%STAT_PUBLIC_IP%",
|
||||
"sub": "%STAT_PUBLIC_IP_LAST_OBTAINED%"
|
||||
},
|
||||
{
|
||||
"type": "stat_card",
|
||||
"label": "IP Check Interval",
|
||||
"value": "%DDNS_TIMER_INTERVAL%",
|
||||
"sub": "%STAT_PUBLIC_IP_LAST_CHECKED%",
|
||||
"edit_action": "/action/ddns_cardipcheckinterval_save",
|
||||
"edit_field": "timer_interval",
|
||||
"edit_input_type": "number",
|
||||
"edit_min": "1",
|
||||
"edit_suffix": "minutes",
|
||||
"edit_value": "%DDNS_TIMER_INTERVAL_MINS%"
|
||||
},
|
||||
{
|
||||
"type": "stat_card",
|
||||
"label": "IP Check Services",
|
||||
"value": "%STAT_IP_CHECK_TOTAL%",
|
||||
"sub": "%STAT_IP_CHECK_SUB%",
|
||||
"reveal_card_id": "ip-check-services-edit"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"id": "ip-check-services-edit",
|
||||
"label": "IP Check Services",
|
||||
"hidden": true,
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/ddns_cardipcheckservices_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "editable_list",
|
||||
"label": "HTTP APIs",
|
||||
"name": "http_services",
|
||||
"item_placeholder": "https://...",
|
||||
"add_label": "Add HTTP API",
|
||||
"items": "%IP_CHECK_HTTP_JSON%"
|
||||
},
|
||||
{
|
||||
"type": "editable_list",
|
||||
"label": "Dig APIs",
|
||||
"name": "dig_services",
|
||||
"item_placeholder": "e.g. @1.1.1.1 ch txt whoami.cloudflare",
|
||||
"add_label": "Add Dig API",
|
||||
"items": "%IP_CHECK_DIG_JSON%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/ddns_cardipcheckservices_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel",
|
||||
"class": "js-hide-card"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"datasource": "config:ddns_providers",
|
||||
"empty_message": "No DDNS providers configured.",
|
||||
"columns": [
|
||||
{
|
||||
"label": "Description",
|
||||
"field": "description"
|
||||
},
|
||||
{
|
||||
"label": "Provider",
|
||||
"field": "provider"
|
||||
},
|
||||
{
|
||||
"label": "Hostname(s)",
|
||||
"field": "hostnames",
|
||||
"render": "tag_list"
|
||||
},
|
||||
{
|
||||
"label": "Status",
|
||||
"field": "enabled",
|
||||
"render": "badge_enabled_disabled"
|
||||
},
|
||||
{
|
||||
"label": "Credentials",
|
||||
"field": "credentials",
|
||||
"render": "raw_html"
|
||||
}
|
||||
],
|
||||
"row_actions": [
|
||||
{
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"action": "/action/ddns_tableaccounts_rowedit",
|
||||
"method": "inline_edit",
|
||||
"text": "Edit",
|
||||
"class": "btn-ghost btn-sm",
|
||||
"fields": [
|
||||
{
|
||||
"col": "description",
|
||||
"input_type": "text"
|
||||
},
|
||||
{
|
||||
"col": "provider",
|
||||
"input_type": "select",
|
||||
"options": "%DDNS_PROVIDER_OPTIONS%"
|
||||
},
|
||||
{
|
||||
"col": "hostnames",
|
||||
"input_type": "textarea"
|
||||
},
|
||||
{
|
||||
"col": "enabled",
|
||||
"input_type": "checkbox"
|
||||
},
|
||||
{
|
||||
"col": "credentials",
|
||||
"input_type": "credentials"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"action": "/action/ddns_tableaccounts_rowdelete",
|
||||
"method": "post",
|
||||
"text": "Delete",
|
||||
"class": "btn-danger btn-sm"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Add DDNS Account",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/ddns_cardaddaccount_add",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Description",
|
||||
"name": "description",
|
||||
"input_type": "text",
|
||||
"placeholder": "e.g. My DuckDNS Account"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Provider",
|
||||
"name": "provider",
|
||||
"input_type": "select",
|
||||
"options": "%DDNS_PROVIDER_OPTIONS%"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Hostnames (one per line)",
|
||||
"name": "hostnames",
|
||||
"input_type": "textarea",
|
||||
"placeholder": "e.g. myhome.duckdns.org"
|
||||
},
|
||||
{
|
||||
"type": "credential_fields",
|
||||
"provider_select": "provider"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/ddns_cardaddaccount_add",
|
||||
"method": "post",
|
||||
"text": "Add Provider"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "card",
|
||||
"label": "Logging",
|
||||
"client_requirement": "client_is_administrator+",
|
||||
"items": [
|
||||
{
|
||||
"type": "pre_block",
|
||||
"text": "%DDNS_LOG_TAIL%",
|
||||
"scroll_to_bottom": true
|
||||
},
|
||||
{
|
||||
"type": "raw_html",
|
||||
"html": "%DDNS_LOG_SUMMARY%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"justify": "space-between",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_ghost",
|
||||
"action": "/action/ddns_cardlogging_download",
|
||||
"text": "Download Log"
|
||||
},
|
||||
{
|
||||
"type": "button_danger",
|
||||
"action": "/action/ddns_cardlogging_clear",
|
||||
"method": "post",
|
||||
"text": "Clear Log"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "hr"
|
||||
},
|
||||
{
|
||||
"type": "form",
|
||||
"action": "/action/ddns_cardlogging_save",
|
||||
"method": "post",
|
||||
"items": [
|
||||
{
|
||||
"type": "field",
|
||||
"label": "Max Log Size (KB)",
|
||||
"name": "log_max_kb",
|
||||
"input_type": "number",
|
||||
"layout": "inline",
|
||||
"value": "%DDNS_GEN_LOG_MAX_KB%",
|
||||
"min": "64"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "",
|
||||
"name": "log_errors_only",
|
||||
"input_type": "checkbox",
|
||||
"checkbox_label": "Only record errors to log",
|
||||
"value": "%DDNS_GEN_LOG_ERRORS_ONLY%"
|
||||
},
|
||||
{
|
||||
"type": "button_row",
|
||||
"items": [
|
||||
{
|
||||
"type": "button_primary",
|
||||
"action": "/action/ddns_cardlogging_save",
|
||||
"method": "post",
|
||||
"text": "Save"
|
||||
},
|
||||
{
|
||||
"type": "button_cancel",
|
||||
"text": "Cancel"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue