summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-08-11 12:48:16 +0200
committerFlorian Eckert <fe@dev.tdt.de>2020-08-11 12:55:42 +0200
commit3e99b18661728937730c17d2eed49ddee38f6b9f (patch)
treecce7ff1723d393991b69b18797ba9780d102f563
parent8a961da6da226ee0d964980bdcdb12b1fc7e2401 (diff)
luci-app-dockerman: add edit button to containers list
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
-rw-r--r--applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua
index cb1d2d943..6fdb5ee61 100644
--- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua
+++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua
@@ -45,13 +45,12 @@ function get_containers()
end
for i, v in ipairs(containers) do
- local index = v.Created .. v.Id
+ local index = v.Id
data[index]={}
data[index]["_selected"] = 0
data[index]["_id"] = v.Id:sub(1,12)
- data[index]["name"] = v.Names[1]:sub(2)
- data[index]["_name"] = '<a href='..luci.dispatcher.build_url("admin/docker/container/"..v.Id)..' class="dockerman_link" title="'..translate("Container detail")..'">'.. v.Names[1]:sub(2).."</a>"
+ data[index]["_name"] = v.Names[1]:sub(2)
data[index]["_status"] = v.Status
if v.Status:find("^Up") then
@@ -104,7 +103,11 @@ if s.err then
end
s = m:section(Table, container_list, translate("Containers"))
-s.nodescr=true
+s.addremove = false
+s.sectionhead = translate("Containers")
+s.sortable = false
+s.template = "cbi/tblsection"
+s.extedit = luci.dispatcher.build_url("admin", "docker", "container","%s")
o = s:option(Flag, "_selected","")
o.disabled = 0
@@ -142,7 +145,7 @@ local start_stop_remove = function(m,cmd)
for k in pairs(container_list) do
if container_list[k]._selected == 1 then
- container_selected[#container_selected + 1] = container_list[k].name
+ container_selected[#container_selected + 1] = container_list[k]._name
end
end