<%# Opennet Firmware Copyright 2010 Rene Ejury Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -%> <% local uci = require "luci.model.uci" local cursor = uci.cursor() %> <% if on_key_exists and on_crt_exists then %>

<%:on_sharing_status%>

<% if (ugw_status.centralip_status == "ok") then %> <%:on_internet_shared%> ( <%:on_ugw_tunnel_active%>, <%:on_ugw_centralIP_connected%> ) <% elseif ugw_status.tunnel_active then %> <%:on_internet_not_shared%> ( <%:on_ugw_sharing_enabled%>, <%:on_ugw_tunnel_active%> ) <% elseif ugw_status.sharing_enabled then %> <%:on_internet_not_shared%> ( <%:on_ugw_sharing_enabled%>, <%:on_ugw_tunnel_not_active%> ) <% elseif ugw_status.sharing_possible then %> <%:on_internet_not_shared%>, <%:on_ugw_sharing_possible%> <% else %> <%:on_ugw_sharing_impossible%> <% end %>

<% if ugw_status.tunnel_active then %>
 
<% end %>
<% if ugw_status.sharing_possible or ugw_status.sharing_enabled then %>

<%:on_ugw_sharing%>

<% if ugw_status.sharing_enabled then %>
<% else %>
<% end %>
<% if (ugw_status.sharing_blocked and ugw_status.sharing_blocked > "0") then %>
<% end if ugw_status.sharing_enabled then %>
<% end %>
<% end %>

<%:on_ugw_ugws_status%>

<% if ugw_status.sharing_possible then %> <%:on_ugw_sharing_possible%> <% else %> <%:on_ugw_sharing_impossible%> <% end %>

<% if ugw_status.sharing_wan_ok then %> <% end %> <% if ugw_status.sharing_wan_ok then %> <% end local count = 1 while count <= ugw_status.usergateways_no do local onusergw = cursor:get_all("on-usergw", "opennet_ugw"..count) local openvpn = cursor:get_all("openvpn", "opennet_ugw"..count) local ugw_tunnel_active = "error" if nixio.fs.access("/tmp/opennet_ugw"..count..".txt") then ugw_tunnel_active = "ok" end %> <% if ugw_status.sharing_wan_ok then %> <% end %> <% count = count + 1 end %> <% else %> <% if ugw_status.sharing_wan_ok then %> <% end %> <% end %>
<%:on_ugw_list_troughWAN%> <%:on_ugw_list_WANping%><%:on_ugw_list_MTUtoGW%> <%:on_ugw_list_MTUfromGW%><%:on_ugw_list_MTUStatus%> <%:on_ugw_list_tunnelStatus%>
<%:on_ugw_list_MTUtoGWtriad%> <%:on_ugw_list_MTUtoGWactual%> <%:on_ugw_list_MTUfromGWtriad%> <%:on_ugw_list_MTUfromGWactual%>

<%=openvpn.remote%>

 
 
<%=onusergw.mtu_toGW_tried%>
<%=onusergw.mtu_toGW_actual%>
<%=onusergw.mtu_fromGW_tried%>
<%=onusergw.mtu_fromGW_actual%>
 
 
<% if ugw_status.checkWANMTUrunning then %> <%:on_ugw_checkRunning%>
<% end %>

<%:on_status%>

<% if on_csr_exists or (not(on_key_exists) and not(on_crt_exists)) then %>
<% if on_csr_exists then %><%:on_exists%><% else %><%:on_missing%><% end %> <% if on_csr_exists then %><%:on_download%><% end %>
<% end %>
<% if on_key_exists then %><%:on_exists%><% else %><%:on_missing%><% end %> <% if on_key_exists then %><%:on_download%><% end %>
<% if on_crt_exists then %><%:on_exists%><% else %><%:on_missing%><% end %> <% if on_crt_exists then %><%:on_download%><% end %>
<% if on_csr_exists and not(on_crt_exists) then %> <%:on_csr_send_prefix%>[[email from config]]<%:on_csr_send_postfix%> <% end %>