luci-app-wireguard: show hint in status page if no entry defined yet 4019/head
authorHelge Mader <ma@dev.tdt.de>
Tue, 5 May 2020 13:43:36 +0000 (15:43 +0200)
committerHelge Mader <ma@dev.tdt.de>
Mon, 11 May 2020 09:25:38 +0000 (11:25 +0200)
Signed-off-by: Helge Mader <ma@dev.tdt.de>
applications/luci-app-wireguard/luasrc/view/wireguard.htm

index 855e0aad7513610921192cef632add1d35a8c68d..e1e55f55c474079568aeeaa45467e6ff70d1718a 100644 (file)
 <h2>WireGuard Status</h2>
 
 <div class="cbi-section">
+
+<% if next(data) == nil then %>
+       <div class="table cbi-section-table">
+               <div class="tr cbi-section-table-row">
+                       <p>
+                               <em><%:This section contains no values yet%></em>
+                       </p>
+               </div>
+       </div>
+<% end %>
+
 <%-
 local ikey, iface
 for ikey, iface in pairs(data) do