admin-full: Fix javascript error when no proto select box is shown, add hint to insta...
authorManuel Munz <freifunk@somakoma.de>
Wed, 9 Jan 2013 18:39:29 +0000 (18:39 +0000)
committerManuel Munz <freifunk@somakoma.de>
Wed, 9 Jan 2013 18:39:29 +0000 (18:39 +0000)
modules/admin-full/luasrc/view/admin_network/diagnostics.htm

index 48825629c917a9f751a68b7495bc9c9f8e7c2122..5794a433ec961c3bbf8a618ba03b6d5cf4340b5c 100644 (file)
@@ -78,8 +78,10 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
                                        <option value="" selected="selected"><%:IPv4%></option>
                                        <option value="6"><%:IPv6%></option>
                                </select>
-                               <% end %>
                                <input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping, this.form.ping_proto.selectedIndex)" />
+                               <% else %>
+                               <input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping)" />
+                               <% end %>
                        </div>
 
                        <div style="width:33%; float:left">
@@ -89,8 +91,14 @@ local has_traceroute6 = fs.access("/usr/bin/traceroute6")
                                        <option value="" selected="selected"><%:IPv4%></option>
                                        <option value="6"><%:IPv6%></option>
                                </select>
-                               <% end %>
                                <input type="button" value="<%:Traceroute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute, this.form.traceroute_proto.selectedIndex)" />
+                               <% else %>
+                               <input type="button" value="<%:Traceroute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute)" />
+                               <% end %>
+                               <% if not has_traceroute6 then %>
+                                       <p>&nbsp;</p>
+                                       <p><%:Install iputils-traceroute6 for IPv6 traceroute%></p>
+                               <% end %>
                        </div>
 
                        <div style="width:33%; float:left;">