diff --git a/UA2F/README.md b/UA2F/README.md index 8a10f6807..c22fe1bd7 100644 --- a/UA2F/README.md +++ b/UA2F/README.md @@ -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) \ No newline at end of file diff --git a/luci-app-dockerman/Makefile b/luci-app-dockerman/Makefile index ebd0c3482..af34a0525 100644 --- a/luci-app-dockerman/Makefile +++ b/luci-app-dockerman/Makefile @@ -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 diff --git a/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua b/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua index 20220ad8f..b875811d9 100644 --- a/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua +++ b/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua @@ -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 (%s)", 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") diff --git a/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua b/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua index 47f634f8b..ca18ea17a 100644 --- a/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua +++ b/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua @@ -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") .. ":<none>") + data[index]["_image"] = iv.RepoTags and iv.RepoTags[1] or (next(iv.RepoDigests) and (iv.RepoDigests[1]:gsub("(.-)@.+", "%1") .. ":<none>")) or "" end end data[index]["_id_name"] = ''.. data[index]["_name"] .. "
ID: " .. data[index]["_id"] diff --git a/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua b/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua index 37702c783..8ad5690fe 100644 --- a/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua +++ b/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua @@ -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 diff --git a/luci-app-dockerman/po/zh_Hans b/luci-app-dockerman/po/zh_Hans deleted file mode 100644 index 41451e4a1..000000000 --- a/luci-app-dockerman/po/zh_Hans +++ /dev/null @@ -1 +0,0 @@ -zh-cn \ No newline at end of file diff --git a/luci-app-dockerman/po/zh_Hans b/luci-app-dockerman/po/zh_Hans new file mode 120000 index 000000000..41451e4a1 --- /dev/null +++ b/luci-app-dockerman/po/zh_Hans @@ -0,0 +1 @@ +zh-cn \ No newline at end of file diff --git a/luci-app-dockerman/root/etc/init.d/dockerman b/luci-app-dockerman/root/etc/init.d/dockerman old mode 100644 new mode 100755 diff --git a/luci-app-dockerman/root/etc/uci-defaults/luci-app-dockerman b/luci-app-dockerman/root/etc/uci-defaults/luci-app-dockerman old mode 100644 new mode 100755