From 611c14bff181fafd8d3db4227b371e423ab60b9d Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Fri, 25 Aug 2017 15:40:49 +0800 Subject: [PATCH] luci-app-shadowsocks-libev: display disabled state of remote server Signed-off-by: Yousong Zhou --- .../luasrc/model/shadowsocks-libev.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 7ba6b40c5..c0e943574 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) -- 2.25.1