add status for ssr pro luci

This commit is contained in:
coolsnowwolf 2018-05-23 23:16:56 +08:00
parent ff68fb4400
commit cb40f8d3c0
2 changed files with 23 additions and 23 deletions

View File

@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SSR Pro
LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +shadowsocksr-libev-alt +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full
LUCI_PKGARCH:=all
PKG_VERSION:=2
PKG_RELEASE:=25
PKG_RELEASE:=26
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -1,22 +1,22 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[ssrpro]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('ssrpro_status');
if (data && tb) {
if (data.running) {
var links = '<em><b><font color=green>ShadowsocksR Pro<%:RUNNING%></font></b></em>';
tb.innerHTML = links;
} else {
tb.innerHTML = '<em><b><font color=red>ShadowsocksR Pro<%:NOT RUNNING%></font></b></em>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="ssrpro_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[ssrpro]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('ssrpro_status');
if (data && tb) {
if (data.running) {
var links = '<em><b><font color=green>ShadowsockR Pro<%:RUNNING%></font></b></em>';
tb.innerHTML = links;
} else {
tb.innerHTML = '<em><b><font color=red>ShadowsockR Pro<%:NOT RUNNING%></font></b></em>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="ssrpro_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>