From 12cdacdb3f2800c0586feffef6b470a792dd9da2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 8 Oct 2021 19:42:04 +0200 Subject: luci-app-dockerman: fix markup which is not valid XHTML XHTML does not specify ` `, use ` ` instead. Also replace `
` with `
`. Signed-off-by: Jo-Philipp Wich --- .../luasrc/controller/dockerman.lua | 2 +- .../luasrc/model/cbi/dockerman/container.lua | 20 ++++++++++---------- .../luasrc/model/cbi/dockerman/containers.lua | 2 +- .../luasrc/model/cbi/dockerman/images.lua | 6 +++--- .../luasrc/model/cbi/dockerman/networks.lua | 2 +- .../luasrc/model/cbi/dockerman/newcontainer.lua | 2 +- .../luasrc/model/cbi/dockerman/newnetwork.lua | 2 +- .../luasrc/model/cbi/dockerman/volumes.lua | 2 +- .../luasrc/view/dockerman/container.htm | 2 +- .../luasrc/view/dockerman/container_file.htm | 4 ++-- .../luasrc/view/dockerman/newcontainer_resolve.htm | 2 +- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua index 6a60382289..0b8dd5d900 100644 --- a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua +++ b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua @@ -183,7 +183,7 @@ end function action_confirm() local data = docker:read_status() if data then - data = data:gsub("\n","
"):gsub(" "," ") + data = data:gsub("\n","
"):gsub(" "," ") code = 202 msg = data else diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua index 4ad1dc1631..5e3771aa46 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua @@ -37,7 +37,7 @@ local get_ports = function(d) if d.HostConfig and d.HostConfig.PortBindings then for inter, out in pairs(d.HostConfig.PortBindings) do - data = (data and (data .. "
") or "") .. out[1]["HostPort"] .. ":" .. inter + data = (data and (data .. "
") or "") .. out[1]["HostPort"] .. ":" .. inter end end @@ -49,7 +49,7 @@ local get_env = function(d) if d.Config and d.Config.Env then for _,v in ipairs(d.Config.Env) do - data = (data and (data .. "
") or "") .. v + data = (data and (data .. "
") or "") .. v end end @@ -90,7 +90,7 @@ local get_mounts = function(d) v_dest = v_dest .."/".. v_dest_d end end - data = (data and (data .. "
") or "") .. v_sorce .. ":" .. v["Destination"] .. (v["Mode"] ~= "" and (":" .. v["Mode"]) or "") + data = (data and (data .. "
") or "") .. v_sorce .. ":" .. v["Destination"] .. (v["Mode"] ~= "" and (":" .. v["Mode"]) or "") end end @@ -102,7 +102,7 @@ local get_device = function(d) if d.HostConfig and d.HostConfig.Devices then for _,v in ipairs(d.HostConfig.Devices) do - data = (data and (data .. "
") or "") .. v["PathOnHost"] .. ":" .. v["PathInContainer"] .. (v["CgroupPermissions"] ~= "" and (":" .. v["CgroupPermissions"]) or "") + data = (data and (data .. "
") or "") .. v["PathOnHost"] .. ":" .. v["PathInContainer"] .. (v["CgroupPermissions"] ~= "" and (":" .. v["CgroupPermissions"]) or "") end end @@ -114,7 +114,7 @@ local get_links = function(d) if d.HostConfig and d.HostConfig.Links then for _,v in ipairs(d.HostConfig.Links) do - data = (data and (data .. "
") or "") .. v + data = (data and (data .. "
") or "") .. v end end @@ -126,7 +126,7 @@ local get_tmpfs = function(d) if d.HostConfig and d.HostConfig.Tmpfs then for k, v in pairs(d.HostConfig.Tmpfs) do - data = (data and (data .. "
") or "") .. k .. (v~="" and ":" or "")..v + data = (data and (data .. "
") or "") .. k .. (v~="" and ":" or "")..v end end @@ -138,7 +138,7 @@ local get_dns = function(d) if d.HostConfig and d.HostConfig.Dns then for _, v in ipairs(d.HostConfig.Dns) do - data = (data and (data .. "
") or "") .. v + data = (data and (data .. "
") or "") .. v end end @@ -150,7 +150,7 @@ local get_sysctl = function(d) if d.HostConfig and d.HostConfig.Sysctls then for k, v in pairs(d.HostConfig.Sysctls) do - data = (data and (data .. "
") or "") .. k..":"..v + data = (data and (data .. "
") or "") .. k..":"..v end end @@ -203,7 +203,7 @@ m.redirect = luci.dispatcher.build_url("admin/docker/containers") s = m:section(SimpleSection) s.template = "dockerman/apply_widget" s.err=docker:read_status() -s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") +s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") if s.err then docker:clear_status() end @@ -294,7 +294,7 @@ if action == "info" then }, ["03image"] = { _key = translate("Image"), - _value = container_info.Config.Image .. "
" .. container_info.Image + _value = container_info.Config.Image .. "
" .. container_info.Image }, ["04status"] = { _key = translate("Status"), 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 f851f8a034..a48118ec0c 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua @@ -99,7 +99,7 @@ m.reset=false s = m:section(SimpleSection) s.template = "dockerman/apply_widget" s.err=docker:read_status() -s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") +s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") if s.err then docker:clear_status() end diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/images.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/images.lua index 2381df4634..2b84de3b8f 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/images.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/images.lua @@ -40,7 +40,7 @@ function get_images() if v.RepoTags and next(v.RepoTags)~=nil then for i, v1 in ipairs(v.RepoTags) do - data[index]["_tags"] =(data[index]["_tags"] and ( data[index]["_tags"] .. "
" )or "") .. ((v1:match("") or (#v.RepoTags == 1)) and v1 or ('' .. v1 .. '')) + data[index]["_tags"] =(data[index]["_tags"] and ( data[index]["_tags"] .. "
" )or "") .. ((v1:match("") or (#v.RepoTags == 1)) and v1 or ('' .. v1 .. '')) if not data[index]["tag"] then data[index]["tag"] = v1 @@ -155,7 +155,7 @@ local remove_action = function(force) for k in pairs(image_list) do if image_list[k]._selected == 1 then - image_selected[#image_selected+1] = (image_list[k]["_tags"]:match("
") or image_list[k]["_tags"]:match("<none>")) and image_list[k].id or image_list[k].tag + image_selected[#image_selected+1] = (image_list[k]["_tags"]:match("
") or image_list[k]["_tags"]:match("<none>")) and image_list[k].id or image_list[k].tag end end @@ -194,7 +194,7 @@ end s = m:section(SimpleSection) s.template = "dockerman/apply_widget" s.err = docker:read_status() -s.err = s.err and s.err:gsub("\n","
"):gsub(" "," ") +s.err = s.err and s.err:gsub("\n","
"):gsub(" "," ") if s.err then docker:clear_status() end diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua index f7152a59d0..007e087424 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua @@ -87,7 +87,7 @@ o = s:option(DummyValue, "_gateway", translate("Gateway")) s = m:section(SimpleSection) s.template = "dockerman/apply_widget" s.err = docker:read_status() -s.err = s.err and s.err:gsub("\n","
"):gsub(" "," ") +s.err = s.err and s.err:gsub("\n","
"):gsub(" "," ") if s.err then docker:clear_status() end diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua index 37734ad015..c5909bac2e 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua @@ -442,7 +442,7 @@ m.redirect = luci.dispatcher.build_url("admin", "docker", "containers") s = m:section(SimpleSection) s.template = "dockerman/apply_widget" s.err=docker:read_status() -s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") +s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") if s.err then docker:clear_status() end diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newnetwork.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newnetwork.lua index b89686b2ab..a9cd67e1a1 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newnetwork.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newnetwork.lua @@ -15,7 +15,7 @@ m.redirect = luci.dispatcher.build_url("admin", "docker", "networks") s = m:section(SimpleSection) s.template = "dockerman/apply_widget" s.err=docker:read_status() -s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") +s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") if s.err then docker:clear_status() end diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/volumes.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/volumes.lua index 865c913d30..5fbd55f7b5 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/volumes.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/volumes.lua @@ -94,7 +94,7 @@ o = s:option(DummyValue, "_created", translate("Created")) s = m:section(SimpleSection) s.template = "dockerman/apply_widget" s.err=docker:read_status() -s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") +s.err=s.err and s.err:gsub("\n","
"):gsub(" "," ") if s.err then docker:clear_status() end diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/container.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/container.htm index 9f05d9d589..3684b64473 100644 --- a/applications/luci-app-dockerman/luasrc/view/dockerman/container.htm +++ b/applications/luci-app-dockerman/luasrc/view/dockerman/container.htm @@ -1,4 +1,4 @@ -
+
  • <%:Info%>
  • <%:Resources%>
  • diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm index ab5ecdd488..46d4278cf7 100644 --- a/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm +++ b/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm @@ -3,12 +3,12 @@
    -
    +
    -
    +
    diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm index dd6cafa062..c5966835fe 100644 --- a/applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm +++ b/applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm @@ -88,7 +88,7 @@ } function show_reslov_dialog() { - document.getElementById('dialog_reslov') || document.body.insertAdjacentHTML("beforeend", '
    <%:Plese input command line:%>
    ') + document.getElementById('dialog_reslov') || document.body.insertAdjacentHTML("beforeend", '
    <%:Plese input command line:%>
    ') document.body.classList.add('dialog-reslov-active') let s = document.getElementById('cmd-line-status') s.innerHTML = "" -- cgit v1.2.3