update 2024-03-16 23:36:45

This commit is contained in:
kenzok8 2024-03-16 23:36:45 +08:00
parent 880ad26304
commit 3068cff13c
8 changed files with 18 additions and 8 deletions

View File

@ -1,6 +1,5 @@
# UA2F
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FZxilly%2FUA2F.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FZxilly%2FUA2F?ref=badge_shield)
[![CodeQL](https://github.com/Zxilly/UA2F/actions/workflows/codeql.yml/badge.svg)](https://github.com/Zxilly/UA2F/actions/workflows/codeql.yml)
[![Build OpenWRT Package](https://github.com/Zxilly/UA2F/actions/workflows/ci.yml/badge.svg)](https://github.com/Zxilly/UA2F/actions/workflows/ci.yml)
@ -70,6 +69,9 @@ uci commit ua2f
## TODO
- [ ] pthread 支持,由不同线程完成入队出队
- [ ] 重写正则匹配为 parser
- [ ] 以连接为单位维护 parser 状态
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FZxilly%2FUA2F.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FZxilly%2FUA2F?ref=badge_large)
[GPL-3.0](./LICENSE)

View File

@ -6,7 +6,7 @@ LUCI_DEPENDS:=@(aarch64||arm||x86_64) \
+luci-lib-docker \
+luci-lib-ip \
+docker +dockerd +cgroupfs-mount \
+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