{%
/*
* Part of AREDN® -- Used for creating Amateur Radio Emergency Data Networks
* Copyright (C) 2024 Tim Wilkinson
* See Contributors file for additional contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Additional Terms:
*
* Additional use restrictions exist on the AREDN® trademark and logo.
* See AREDNLicense.txt for more info.
*
* Attributions to the AREDN® Project must be retained in the source code.
* If importing this code into a new or existing project attribution
* to the AREDN® project must be added to the source code.
*
* You must not misrepresent the origin of the material contained within.
*
* Modified versions must be modified to attribute to the original source
* and be marked in reasonable ways as differentiate it from the original
* version
*/
%}
{%
if (request.env.REQUEST_METHOD === "PUT") {
configuration.prepareChanges();
if (request.args.cloudmesh) {
uciMesh.set("aredn", "@supernode[0]", "support", request.args.cloudmesh === "on" ? "1" : "0");
}
if (request.args.iperf) {
uciMesh.set("aredn", "@iperf[0]", "enable", request.args.iperf === "on" ? "1" : "0");
}
if (request.args.ssh_access) {
uciMesh.set("aredn", "@wan[0]", "ssh_access", request.args.ssh_access === "on" ? "1" : "0");
}
if (request.args.telnet_access) {
uciMesh.set("aredn", "@wan[0]", "telnet_access", request.args.telnet_access === "on" ? "1" : "0");
}
if (request.args.web_access) {
uciMesh.set("aredn", "@wan[0]", "web_access", request.args.web_access === "on" ? "1" : "0");
}
if ("remotelog" in request.args) {
uciMesh.set("aredn", "@remotelog[0]", "url", request.args.remotelog);
}
if (request.args.watchdog) {
uciMesh.set("aredn", "@watchdog[0]", "enable", request.args.watchdog === "on" ? "1" : "0");
}
if ("watchdog_ping_address" in request.args) {
uciMesh.set("aredn", "@watchdog[0]", "ping_addresses", request.args.watchdog_ping_address);
}
if ("watchdog_daily" in request.args) {
uciMesh.set("aredn", "@watchdog[0]", "daily", request.args.watchdog_daily);
}
if ("power_poe" in request.args) {
uciMesh.set("aredn", "@poe[0]", "passthrough", request.args.power_poe === "on" ? "1" : "0");
}
if ("power_usb" in request.args) {
uciMesh.set("aredn", "@usb[0]", "passthrough", request.args.power_usb === "on" ? "1" : "0");
}
if ("message_pollrate" in request.args) {
uciMesh.set("aredn", "@alerts[0]", "pollrate", request.args.message_pollrate);
}
if ("message_localpath" in request.args) {
uciMesh.set("aredn", "@alerts[0]", "localpath", request.args.message_localpath);
}
if ("message_groups" in request.args) {
uciMesh.set("aredn", "@alerts[0]", "groups", request.args.message_groups);
}
uciMesh.commit("aredn");
print(_R("changes"));
return;
}
if (request.env.REQUEST_METHOD === "DELETE") {
configuration.revertModalChanges();
print(_R("changes"));
return;
}
%}
{{_H("By default, your node will locate and use any available supernode it finds on your local mesh.
This allows you to connect to any node in the AREDN cloud. Disable this option if you don't want to connect.")}}
iPerf3 Server
Enable the iperf3 server for easy connection speed testing
{{_H("Enable the included iperf3 client and server tools. This makes it easy to perform bandwidth tests between arbitrary nodes
in the network. The client and server are only invoked on demand, so there is no performance impact on the node except when tests
are performed.")}}
Remote logging
Send internal logging information to a remove server
{{_H("Local node logs are kept in a limited amount of RAM which means older information is lost, and all logs are lost on reboot.
This options will send the logs to a remote log server using the syslog protocol. The option should be udp://ip-address:port or tcp://ip-adress:port.
Leave blank if no remote logging is required.")}}
{{_H("Enables the hardware watchdog timer. This timer will reboot the device if it becomes unresponsive or various critical AREDN components
stop running correctly. Because the watchdog is in the hardware, even if the kernel crashes, the device will still reboot itself.
")}}
Watchdog IP address
IP address to check periodically
{{_H("As part of the watchdog process, the watchdog periodically makes sure it can reach a given IP address. If it can't the node will be rebooted.
It is important that this IP address is easy and quick to reach. Don't try to reach IP addresses on the Internet.")}}
Daily Watchdog hour
Reboot the node at a specific hour every day
{{_H("For the node to reboot at a specific hour of the day (between 0 and 23), every day. Hopefully this isn't necessary. but it can be a good fallback for nodes which
are unreliable and in places difficult to reach.")}}
{% if (hardware.hasPOE()) { %}
PoE Passthrough
Enable power-over-ethernet on ports which support it
{{_H("Enable power over ethernet on ethernet ports where this is avaiable. Typically these ports provide passive power,
so the voltage out will be the same as whatever is powering the node.")}}
{% }
if (hardware.hasUSBPower()) { %}
{{_H("Enable power on the node's USB port. Which ports support this is device dependend, and some devices with USB
port may only have some with power available.")}}
{% } %}
Message Updates
Update messages every so many hours
{{_H("Change the frequency we fetch messsage for this node. By default this happens every hour, but you can decrese the frequency up to
every 24 hours.")}}
Local Message URL
Configure the local message sources
{{_H("Add a local message server URL. By default messages are fetched from the global AREDN server, but you can also specify a
local server.")}}
Message Groups
List of message group names
{{_H("A comma seperated list of group names to check for messages.")}}