22 lines
959 B
HTML
22 lines
959 B
HTML
<% include("cbi/map") %>
|
|
<script type="text/javascript">//<![CDATA[
|
|
XHR.poll(2, '<%=luci.dispatcher.build_url("admin", "vpn", "ipsec-server", "status")%>', null,
|
|
function(x, result)
|
|
{
|
|
var ipsec_status = document.getElementsByClassName('ipsec-server_status')[0];
|
|
if (ipsec_status) {
|
|
ipsec_status.setAttribute("style","font-weight:bold;");
|
|
ipsec_status.setAttribute("style",result.ipsec_status ? "color:green":"color:red");
|
|
ipsec_status.innerHTML = result.ipsec_status?'<b><%=translate("RUNNING")%></b>':'<b><%=translate("NOT RUNNING")%></b>';
|
|
}
|
|
var l2tp_status = document.getElementsByClassName('l2tp_status')[0];
|
|
if (l2tp_status) {
|
|
l2tp_status.setAttribute("style","font-weight:bold;");
|
|
l2tp_status.setAttribute("style",result.l2tp_status ? "color:green":"color:red");
|
|
l2tp_status.innerHTML = result.l2tp_status?'<b><%=translate("RUNNING")%></b>':'<b><%=translate("NOT RUNNING")%></b>';
|
|
}
|
|
}
|
|
)
|
|
//]]>
|
|
</script>
|