summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2021-04-19 16:23:54 +0200
committerGitHub <noreply@github.com>2021-04-19 16:23:54 +0200
commitc05bd1990fc9df234b24141ddd10cd91c5e067f6 (patch)
tree46f64c8bd52e1c4a3a1683d688e68186f771c035 /applications/luci-app-dockerman/luasrc/controller/dockerman.lua
parenta0e05a7c4d3e7b9815cdfb2459c8d117fe5502fe (diff)
parentfd88a64843767f91942d3a6301da504fcfe90cc9 (diff)
Merge pull request #4973 from TDT-AG/pr/20210408-luci-app-dockerman
luci-app-dockerman: fixes and improvements
Diffstat (limited to 'applications/luci-app-dockerman/luasrc/controller/dockerman.lua')
-rw-r--r--applications/luci-app-dockerman/luasrc/controller/dockerman.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
index 9167a896ca..6a60382289 100644
--- a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
+++ b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
@@ -8,11 +8,12 @@ local docker = require "luci.model.docker"
module("luci.controller.dockerman",package.seeall)
function index()
- local e = entry({"admin", "docker"}, firstchild(), "Docker", 40)
- e.dependent = false
- e.acl_depends = { "luci-app-dockerman" }
+ entry({"admin", "docker"},
+ alias("admin", "docker", "config"),
+ _("Docker"),
+ 40).acl_depends = { "luci-app-dockerman" }
- entry({"admin", "docker", "overview"},cbi("dockerman/overview"),_("Overview"), 1).leaf=true
+ entry({"admin", "docker", "config"},cbi("dockerman/configuration"),_("Configuration"), 1).leaf=true
local remote = luci.model.uci.cursor():get_bool("dockerd", "globals", "remote_endpoint")
if remote then
@@ -22,7 +23,7 @@ function index()
return
end
else
- local socket = luci.model.uci.cursor():get("dockerd", "globals", "socket_path")
+ local socket = luci.model.uci.cursor():get("dockerd", "globals", "socket_path") or "/var/run/docker.sock"
if socket and not nixio.fs.access(socket) then
return
end
@@ -32,11 +33,12 @@ function index()
return
end
- entry({"admin", "docker", "containers"}, form("dockerman/containers"), _("Containers"), 2).leaf=true
- entry({"admin", "docker", "images"}, form("dockerman/images"), _("Images"), 3).leaf=true
- entry({"admin", "docker", "networks"}, form("dockerman/networks"), _("Networks"), 4).leaf=true
- entry({"admin", "docker", "volumes"}, form("dockerman/volumes"), _("Volumes"), 5).leaf=true
- entry({"admin", "docker", "events"}, call("action_events"), _("Events"), 6)
+ entry({"admin", "docker", "overview"},cbi("dockerman/overview"),_("Overview"), 2).leaf=true
+ entry({"admin", "docker", "containers"}, form("dockerman/containers"), _("Containers"), 3).leaf=true
+ entry({"admin", "docker", "images"}, form("dockerman/images"), _("Images"), 4).leaf=true
+ entry({"admin", "docker", "networks"}, form("dockerman/networks"), _("Networks"), 5).leaf=true
+ entry({"admin", "docker", "volumes"}, form("dockerman/volumes"), _("Volumes"), 6).leaf=true
+ entry({"admin", "docker", "events"}, call("action_events"), _("Events"), 7)
entry({"admin", "docker", "newcontainer"}, form("dockerman/newcontainer")).leaf=true
entry({"admin", "docker", "newnetwork"}, form("dockerman/newnetwork")).leaf=true