diff options
author | Richard Yu <yurichard3839@gmail.com> | 2019-11-04 10:02:03 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2019-11-04 10:14:15 +0800 |
commit | b83374b3401d33f1f1bc40bbb367991cc34cc918 (patch) | |
tree | 0207830ab0118912fe8d2fa86c35641f4384c925 /applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua | |
parent | 4e9f2d3f1ef21262e8c009579d235d355fbd467a (diff) |
luci-app-shadowsocks-libev: port to client side
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
Diffstat (limited to 'applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua')
-rw-r--r-- | applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua index 05d12e38b2..c8a9d66365 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua @@ -9,25 +9,14 @@ function index() _("Shadowsocks-libev"), 59) entry({"admin", "services", "shadowsocks-libev", "instances"}, - arcombine(cbi("shadowsocks-libev/instances"), cbi("shadowsocks-libev/instance-details")), + view("shadowsocks-libev/instances"), _("Local Instances"), 10).leaf = true entry({"admin", "services", "shadowsocks-libev", "servers"}, - cbi("shadowsocks-libev/servers"), + view("shadowsocks-libev/servers"), _("Remote Servers"), 20).leaf = true entry({"admin", "services", "shadowsocks-libev", "rules"}, - cbi("shadowsocks-libev/rules"), + view("shadowsocks-libev/rules"), _("Redir Rules"), 30).leaf = true - - entry({"admin", "services", "shadowsocks-libev", "status"}, call("ss_status"), nil).leaf = true - -end - -function ss_status() - local ut = require "luci.util" - local rv = ut.ubus("service", "list", {name = "shadowsocks-libev"})["shadowsocks-libev"] or {_=0} - - luci.http.prepare_content("application/json") - luci.http.write_json(rv) end |