luci-app-dockerman: unify socket_path and hosts by adding the prefix unix://
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 29 Jul 2020 07:06:04 +0000 (09:06 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Wed, 29 Jul 2020 07:10:50 +0000 (09:10 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua
applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua

index 6628ed05535a5187292c52a9b7b1ee5ffdd6e523..9ea006396a34b8934687a292aec04356aeb77aa7 100644 (file)
@@ -723,7 +723,7 @@ elseif action == "console" then
                        if remote and host and port then
                                hosts = host .. ':'.. port
                        elseif socket_path then
-                               hosts = "unix://" .. socket_path
+                               hosts = socket_path
                        else
                                return
                        end
index c2ed6b139f719b152cfcf7ab6fdaccf2a1de574b..f1fc4f02701cfb1293e27b73d78c9bf1d10ed168 100644 (file)
@@ -99,9 +99,8 @@ o.rmempty = false
 
 o = s:option(Value, "socket_path",
        translate("Docker Socket Path"))
-o.default = "/var/run/docker.sock"
-o.placeholder = "/var/run/docker.sock"
-o.rmempty = false
+o.default = "unix://var/run/docker.sock"
+o.placeholder = "unix://var/run/docker.sock"
 o:depends("remote_endpoint", 1)
 
 o = s:option(Value, "remote_host",