small-package/luci-app-linkease/luasrc/view/linkease_status.htm

29 lines
1.0 KiB
HTML
Raw Normal View History

2021-12-04 09:01:13 +08:00
<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=url("admin/services/linkease_status")%>', null,
function(x, st)
{
var tb = document.getElementById('linkease_status');
if (st && tb)
{
if (st.running)
{
tb.innerHTML = '<br/><em style=\"color:green\"><%:The LinkEase service is running.%></em>'
2022-10-26 20:27:06 +08:00
+ "<br/><br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:Click to open LinkEase%> \" onclick=\"window.open('http://" + window.location.hostname + ":" + st.port + "/')\"/>"
+ "<br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:Click to open Files%> \" onclick=\"window.open('/cgi-bin/luci/admin/services/linkease/file/')\"/>";
2021-12-04 09:01:13 +08:00
}
else
{
tb.innerHTML = '<br/><em style=\"color:red\"><%:The LinkEase service is not running.%></em>';
}
}
}
);
//]]></script>
<fieldset class="cbi-section">
<legend><%:LinkEase Status%></legend>
<p id="linkease_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>