luci-mod-admin-full: make diagnostics url customizable 766/head
authorFlorian Eckert <Eckert.Florian@googlemail.com>
Fri, 29 Jul 2016 06:21:23 +0000 (08:21 +0200)
committerFlorian Eckert <Eckert.Florian@googlemail.com>
Fri, 29 Jul 2016 06:21:23 +0000 (08:21 +0200)
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
modules/luci-base/root/etc/config/luci
modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm

index baa3ac5d1e3d164cc6986a75f272ddba5ffb267f..a443742f936f7aa06592c64e97aa7a2da43b4662 100644 (file)
@@ -22,3 +22,8 @@ config internal ccache
        option enable 1
                
 config internal themes
+
+config internal 'diag'
+       option ping 'dev.openwrt.org'
+       option route 'dev.openwrt.org'
+       option dns 'dev.openwrt.org'
index 685082a3352a1ac796ee2103cd4a8f9e8d621f2f..90d7117175548cb156aeb2a7d8f1084448845573 100644 (file)
@@ -63,7 +63,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
                        <br />
 
                        <div style="width:30%; float:left">
-                               <input style="margin: 5px 0" type="text" value="dev.openwrt.org" name="ping" /><br />
+                               <input style="margin: 5px 0" type="text" value="<%=luci.config.diag.ping%>" name="ping" /><br />
                                <% if has_ping6 then %>
                                <select name="ping_proto" style="width:auto">
                                        <option value="" selected="selected"><%:IPv4%></option>
@@ -76,7 +76,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
                        </div>
 
                        <div style="width:33%; float:left">
-                               <input style="margin: 5px 0" type="text" value="dev.openwrt.org" name="traceroute" /><br />
+                               <input style="margin: 5px 0" type="text" value="<%=luci.config.diag.route%>" name="traceroute" /><br />
                                <% if has_traceroute6 then %>
                                <select name="traceroute_proto" style="width:auto">
                                        <option value="" selected="selected"><%:IPv4%></option>
@@ -93,7 +93,7 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
                        </div>
 
                        <div style="width:33%; float:left;">
-                               <input style="margin: 5px 0" type="text" value="dev.openwrt.org" name="nslookup" /><br />
+                               <input style="margin: 5px 0" type="text" value="<%=luci.config.diag.dns%>" name="nslookup" /><br />
                                <input type="button" value="<%:Nslookup%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.nslookup)" />
                        </div>