small-packages/liep/luci-app-ssr-mudb-server/luasrc/view/ssr_mudb_server/status.htm
2026-05-10 09:48:30 +08:00

18 lines
687 B
HTML

<div class="cbi-value">
<label class="cbi-value-title"><%:Status%></label>
<div class="cbi-value-field" id="run_status" style="font-weight: bold;"><%:Collecting data...%></div>
</div>
<script type="text/javascript">
//<![CDATA[
var run_status = document.getElementById('run_status');
var style = run_status.getAttribute("style");
XHR.poll(2, '<%=luci.dispatcher.build_url("admin", "vpn", "ssr_mudb_server", "status")%>', null,
function(x, result) {
run_status.setAttribute("style", result.status ? style + "color: green;" : style + "color: red;");
run_status.innerHTML = result.status ? '<%=translate("RUNNING")%>' : '<%=translate("NOT RUNNING")%>';
}
)
//]]>
</script>