update 2024-03-16 23:33:58

This commit is contained in:
actions-user 2024-03-16 23:33:58 +08:00
parent 6698dc1755
commit c08a19fff6
7 changed files with 14 additions and 6 deletions

View File

@ -6,7 +6,7 @@ LUCI_DEPENDS:=@(aarch64||arm||x86_64) \
+luci-lib-docker \
+luci-lib-ip \
+docker \
+dockerd +cgroupfs-mount +cgroupfs-mount \
+dockerd +cgroupfs-mount \
+ttyd
LUCI_PKGARCH:=all

View File

@ -188,8 +188,17 @@ local start_stop_remove = function(m, cmd)
end
end
local c_color
if container_info.State.Status == 'running' then
c_color = 'green'
elseif container_info.State.Status == 'restarting' then
c_color = 'yellow'
else
c_color = 'red'
end
m=SimpleForm("docker",
translatef("Docker - Container (%s)", container_info.Name:sub(2)),
translatef("Docker - Container (<font color='%s'>%s</font>)", c_color, container_info.Name:sub(2)),
translate("On this page, the selected container can be managed."))
m.redirect = luci.dispatcher.build_url("admin/docker/containers")

View File

@ -83,10 +83,9 @@ function get_containers()
end
end
end
for ii,iv in ipairs(images) do
if iv.Id == v.ImageID then
data[index]["_image"] = iv.RepoTags and iv.RepoTags[1] or (iv.RepoDigests[1]:gsub("(.-)@.+", "%1") .. ":&lt;none&gt;")
data[index]["_image"] = iv.RepoTags and iv.RepoTags[1] or (next(iv.RepoDigests) and (iv.RepoDigests[1]:gsub("(.-)@.+", "%1") .. ":&lt;none&gt;")) or ""
end
end
data[index]["_id_name"] = '<a href='..luci.dispatcher.build_url("admin/docker/container/"..v.Id)..' class="dockerman_link" title="'..translate("Container detail")..'">'.. data[index]["_name"] .. "<br><font color='#9f9f9f'>ID: " .. data[index]["_id"]

View File

@ -41,8 +41,8 @@ local get_networks = function ()
data[index]["_interface"] = v.Options.parent
end
data[index]["_subnet"] = v.IPAM and v.IPAM.Config[1] and v.IPAM.Config[1].Subnet or nil
data[index]["_gateway"] = v.IPAM and v.IPAM.Config[1] and v.IPAM.Config[1].Gateway or nil
data[index]["_subnet"] = v.IPAM and v.IPAM.Config and v.IPAM.Config[1] and v.IPAM.Config[1].Subnet or nil
data[index]["_gateway"] = v.IPAM and v.IPAM.Config and v.IPAM.Config[1] and v.IPAM.Config[1].Gateway or nil
end
return data

View File

@ -1 +0,0 @@
zh-cn

View File

@ -0,0 +1 @@
zh-cn

0
luci-app-dockerman/root/etc/init.d/dockerman Normal file → Executable file
View File

View File