luci-base: drop ipv6 lease status when IPV6 is not support

Signed-off-by: Rosy Song <rosysong@rosinson.com>
This commit is contained in:
Rosy Song 2018-09-23 15:38:38 +08:00
parent 89a4fdd1a8
commit 8c57f886fc

View file

@ -79,7 +79,13 @@
</div>
</div>
<div class="cbi-section" style="display:none">
<%
local fs = require "nixio.fs"
local has_ipv6 = fs.access("/proc/net/ipv6_route")
if has_ipv6 then
-%>
<div class="cbi-section" style="display:none">
<h3><%:Active DHCPv6 Leases%></h3>
<div class="table" id="lease6_status_table">
<div class="tr table-titles">
@ -92,4 +98,5 @@
<div class="td"><em><%:Collecting data...%></em></div>
</div>
</div>
</div>
</div>
<% end -%>