luci-app-alist/luci-app-alist/luasrc/view/alist_status.htm

27 lines
836 B
HTML

<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=url("admin/nas/alist_status")%>', null,
function(x, st)
{
var tb = document.getElementById('alist_status');
if (st && tb)
{
if (st.running)
{
tb.innerHTML = '<em style=\"color:green\"><b><%:The Alist service is running.%></b></em>' + "<input class=\"cbi-button-reload mar-10\" type=\"button\" value=\" <%:Click to open Alist%> \" onclick=\"window.open('http://" + window.location.hostname + ":" + st.port + "/')\"/>";
}
else
{
tb.innerHTML = '<em style=\"color:red\"><b><%:The Alist service is not running.%></b></em>';
}
}
}
);
//]]></script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="alist_status">
<em><b><%:Collecting data...%></b></em>
</p>
</fieldset>