diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2017-08-25 15:40:49 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2018-01-04 14:40:09 +0800 |
commit | 611c14bff181fafd8d3db4227b371e423ab60b9d (patch) | |
tree | b1ffbb97baeb9977e29bdebb9a248a8e23e63614 | |
parent | dac0cce6b96c01aa975c4fb79f49d530d3463f05 (diff) |
luci-app-shadowsocks-libev: display disabled state of remote server
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
-rw-r--r-- | applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua index 7ba6b40c53..c0e943574d 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua @@ -42,7 +42,8 @@ function values_serverlist(o) local server = sdata["server"] local server_port = sdata["server_port"] if server and server_port then - local desc = "%s - %s:%s" % {sname, sdata["server"], sdata["server_port"]} + local disabled = ucival_to_bool(sdata[".disabled"]) and " - disabled" or "" + local desc = "%s - %s:%s%s" % {sname, server, server_port, disabled} o:value(sname, desc) end end) |