op-packages/luci-app-baidudrive/luasrc/view/baidudrive/baidudrive_status.htm
github-actions[bot] 9d0be29ac0 💐 Sync 2026-05-25 21:11:41
2026-05-25 21:11:41 +08:00

22 lines
821 B
HTML

<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=url("admin/services/baidudrive_status")%>', null, function(x, st) {
var el = document.getElementById('baidudrive_status');
if (st && el) {
if (!st.running) {
el.innerHTML = '<br/><em style=\"color:red\"><%:The BaiduDrive service is not running.%></em>';
}
if (st.running) {
el.innerHTML = '<br/><em style=\"color:green\"><%:The BaiduDrive service is running.%></em>'
+ "<br/><br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:Click to open BaiduDrive%> \" onclick=\"window.open('http://" + window.location.hostname + ":" + st.port + "/')\"/>";
}
}
});
//]]></script>
<fieldset class="cbi-section">
<legend><%:Status%></legend>
<p id="baidudrive_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>