Merge pull request #2174 from rosysong/lease-status

luci-base: drop ipv6 lease status when IPV6 is not support
This commit is contained in:
Florian Eckert 2019-05-25 21:43:50 +02:00 committed by GitHub
commit d1d5471137
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 -%>