mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-27 02:11:19 +08:00
22 lines
821 B
HTML
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>
|