luci-app-dockerman: sync with upstream source

This commit is contained in:
CN_SZTL 2020-01-31 02:41:43 +08:00
parent c7495be0fe
commit 02c76f469c
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
5 changed files with 21 additions and 5 deletions

View File

@ -56,7 +56,24 @@ local get_mounts = function(d)
local data
if d.Mounts then
for _,v in ipairs(d.Mounts) do
data = (data and (data .. "<br>") or "") .. v["Source"] .. ":" .. v["Destination"] .. (v["Mode"] ~= "" and (":" .. v["Mode"]) or "")
local v_sorce_d, v_dest_d
local v_sorce = ""
local v_dest = ""
for v_sorce_d in v["Source"]:gmatch('[^/]+') do
if v_sorce_d and #v_sorce_d > 12 then
v_sorce = v_sorce .. "/" .. v_sorce_d:sub(1,12) .. "..."
else
v_sorce = v_sorce .."/".. v_sorce_d
end
end
for v_dest_d in v["Destination"]:gmatch('[^/]+') do
if v_dest_d and #v_dest_d > 12 then
v_dest = v_dest .. "/" .. v_dest_d:sub(1,12) .. "..."
else
v_dest = v_dest .."/".. v_dest_d
end
end
data = (data and (data .. "<br>") or "") .. v_sorce .. ":" .. v["Destination"] .. (v["Mode"] ~= "" and (":" .. v["Mode"]) or "")
end
end
return data

View File

@ -416,7 +416,7 @@ m.handle = function(self, state, data)
end
end
create_body.Hostname = name
create_body.Hostname = network ~= "host" and name or nil
create_body.Tty = tty and true or false
create_body.OpenStdin = interactive and true or false
create_body.User = user

View File

@ -98,7 +98,6 @@ btnremove.write = function(self, section)
-- 得到选中项的名字
if volume_list[volume_table_sid]._selected == 1 then
-- volume_selected[#volume_selected+1] = volume_id:cfgvalue(volume_table_sid)
luci.util.perror(volume_table_sid)
volume_selected[#volume_selected+1] = volume_table_sid
end
end

View File

@ -230,4 +230,4 @@ _docker.clear_status=function(self)
nixio.fs.remove(self.options.status_path)
end
return _docker
return _docker

View File

@ -296,4 +296,4 @@ msgid "Pull Image"
msgstr "拉取镜像"
msgid "Pull"
msgstr "拉取"
msgstr "拉取"