From f0282602031e34941cbcd23c69f4b915300b36ee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 3 Dec 2023 16:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=9E=20Sync=202023-12-03=2016:23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua | 3 +-- luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua b/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua index 47f634f8..ca18ea17 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 37702c78..8ad5690f 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