summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-07-28 15:58:49 +0200
committerFlorian Eckert <fe@dev.tdt.de>2020-07-28 16:03:11 +0200
commitdff11ad2404d77be1da786883fa7155b83a67be0 (patch)
tree91d9e199c4fc06a180b51ac148c048c824dc40bd /applications/luci-app-dockerman/luasrc/controller/dockerman.lua
parent18c2fef8b38df9d932200da0af7b61120984850a (diff)
luci-app-dockerman: refactoring remote endpoint options
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-dockerman/luasrc/controller/dockerman.lua')
-rw-r--r--applications/luci-app-dockerman/luasrc/controller/dockerman.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
index a592f4b3a..608fbf4b0 100644
--- a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
+++ b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
@@ -14,18 +14,18 @@ function index()
entry({"admin", "docker", "overview"},cbi("dockerman/overview"),_("Overview"),0).leaf=true
- local remote = luci.model.uci.cursor():get("dockerd", "globals", "remote_endpoint")
- if remote == nil then
- local socket = luci.model.uci.cursor():get("dockerd", "globals", "socket_path")
- if socket and not nixio.fs.access(socket) then
- return
- end
- elseif remote == "true" then
+ local remote = luci.model.uci.cursor():get_bool("dockerd", "globals", "remote_endpoint")
+ if remote then
local host = luci.model.uci.cursor():get("dockerd", "globals", "remote_host")
local port = luci.model.uci.cursor():get("dockerd", "globals", "remote_port")
if not host or not port then
return
end
+ else
+ local socket = luci.model.uci.cursor():get("dockerd", "globals", "socket_path")
+ if socket and not nixio.fs.access(socket) then
+ return
+ end
end
if (require "luci.model.docker").new():_ping().code ~= 200 then