luci-app-dockerman: revised the information for the individual page

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit ad05a0187b)
This commit is contained in:
Florian Eckert 2021-04-08 17:13:59 +02:00
parent cef2ac7942
commit 0e664b6c56
9 changed files with 92 additions and 24 deletions

View file

@ -4,10 +4,10 @@
local m, s, o
m = Map("dockerd",
translate("Docker"),
translate("DockerMan is a Simple Docker manager client for LuCI"))
translate("Docker - Configuration"),
translate("DockerMan is a simple docker manager client for LuCI"))
s = m:section(NamedSection, "globals", "section", translate("Setting"))
s = m:section(NamedSection, "globals", "section", translate("Global settings"))
o = s:option(Flag, "remote_endpoint",
translate("Remote Endpoint"),

View file

@ -195,7 +195,9 @@ local start_stop_remove = function(m, cmd)
end
end
m=SimpleForm("docker", container_info.Name:sub(2), translate("Docker Container") )
m=SimpleForm("docker",
translatef("Docker - Container (%s)", container_info.Name:sub(2)),
translate("On this page, the selected container can be managed."))
m.redirect = luci.dispatcher.build_url("admin/docker/containers")
s = m:section(SimpleSection)

View file

@ -90,7 +90,9 @@ end
local container_list = get_containers()
m = SimpleForm("docker", translate("Docker"))
m = SimpleForm("docker",
translate("Docker - Containers"),
translate("This page displays all containers that have been created on the connected docker host."))
m.submit=false
m.reset=false
@ -102,7 +104,7 @@ if s.err then
docker:clear_status()
end
s = m:section(Table, container_list, translate("Containers"))
s = m:section(Table, container_list, translate("Containers overview"))
s.addremove = false
s.sectionhead = translate("Containers")
s.sortable = false

View file

@ -68,7 +68,9 @@ end
local image_list = get_images()
m = SimpleForm("docker", translate("Docker"))
m = SimpleForm("docker",
translate("Docker - Images"),
translate("On this page all images are displayed that are available on the system and with which a container can be created."))
m.submit=false
m.reset=false
@ -77,7 +79,9 @@ local pull_value={
_registry="index.docker.io"
}
s = m:section(SimpleSection, translate("Pull Image"))
s = m:section(SimpleSection,
translate("Pull Image"),
translate("By entering a valid image name with the corresponding version, the docker image can be downloaded from the configured registry."))
s.template="cbi/nullsection"
o = s:option(Value, "_image_tag_name")
@ -116,12 +120,14 @@ o.write = function(self, section)
luci.http.redirect(luci.dispatcher.build_url("admin/docker/images"))
end
s = m:section(SimpleSection, translate("Import Images"))
s = m:section(SimpleSection,
translate("Import Image"),
translate("When pressing the Import button, both a local image can be loaded onto the system and a valid image tar can be downloaded from remote."))
o = s:option(DummyValue, "_image_import")
o.template = "dockerman/images_import"
s = m:section(Table, image_list, translate("Images"))
s = m:section(Table, image_list, translate("Images overview"))
o = s:option(Flag, "_selected","")
o.disabled = 0

View file

@ -47,11 +47,13 @@ end
local network_list = get_networks()
m = SimpleForm("docker", translate("Docker"))
m = SimpleForm("docker",
translate("Docker - Networks"),
translate("This page displays all docker networks that have been created on the connected docker host."))
m.submit=false
m.reset=false
s = m:section(Table, network_list, translate("Networks"))
s = m:section(Table, network_list, translate("Networks overview"))
s.nodescr=true
o = s:option(Flag, "_selected","")

View file

@ -436,7 +436,7 @@ elseif cmd_line and cmd_line:match("^duplicate/[^/]+$") then
end
end
m = SimpleForm("docker", translate("Docker"))
m = SimpleForm("docker", translate("Docker - Containers"))
m.redirect = luci.dispatcher.build_url("admin", "docker", "containers")
s = m:section(SimpleSection)
@ -447,7 +447,7 @@ if s.err then
docker:clear_status()
end
s = m:section(SimpleSection, translate("New Container"))
s = m:section(SimpleSection, translate("Create new docker container"))
s.addremove = true
s.anonymous = true

View file

@ -9,7 +9,7 @@ local m, s, o
local dk = docker.new()
m = SimpleForm("docker", translate("Docker"))
m = SimpleForm("docker", translate("Docker - Network"))
m.redirect = luci.dispatcher.build_url("admin", "docker", "networks")
s = m:section(SimpleSection)
@ -20,7 +20,7 @@ if s.err then
docker:clear_status()
end
s = m:section(SimpleSection, translate("New Network"))
s = m:section(SimpleSection, translate("Create new docker network"))
s.addremove = true
s.anonymous = true

View file

@ -18,12 +18,9 @@ function byte_format(byte)
end
end
m = Map("dockerd", translate("Docker"),
translate("DockerMan is a Simple Docker manager client for LuCI, If you have any issue please visit:") ..
" " ..
[[<a href="https://github.com/lisaac/luci-app-dockerman" target="_blank">]] ..
translate("Github") ..
[[</a>]])
m = Map("dockerd",
translate("Docker - Overview"),
translate("An overview with the relevant data is displayed here with which the LuCI docker client is connected."))
local docker_info_table = {}
docker_info_table['3ServerVersion'] = {_key=translate("Docker Version"),_value='-'}
@ -90,4 +87,63 @@ if docker.new():_ping().code == 200 then
s.volumes_total = tostring(#volumes_list)
end
<<<<<<< HEAD
=======
s = m:section(NamedSection, "globals", "section", translate("Setting"))
o = s:option(Flag, "remote_endpoint",
translate("Remote Endpoint"),
translate("Connect to remote endpoint"))
o.rmempty = false
o = s:option(Value, "remote_host",
translate("Remote Host"))
o.placeholder = "10.1.1.2"
o:depends("remote_endpoint", 1)
o = s:option(Value, "remote_port",
translate("Remote Port"))
o.placeholder = "2375"
o.default = "2375"
o:depends("remote_endpoint", 1)
if nixio.fs.access("/usr/bin/dockerd") then
o = s:option(Value, "data_root",
translate("Docker Root Dir"))
o.placeholder = "/opt/docker/"
o:depends("remote_endpoint", 0)
o = s:option(Value, "bip",
translate("Default bridge"),
translate("Configure the default bridge network"))
o.placeholder = "172.17.0.1/16"
o.datatype = "ipaddr"
o:depends("remote_endpoint", 0)
o = s:option(DynamicList, "registry_mirrors",
translate("Registry Mirrors"),
translate("It replaces the daemon registry mirrors with a new set of registry mirrors"))
o.placeholder = translate("Example: https://hub-mirror.c.163.com")
o:depends("remote_endpoint", 0)
o = s:option(ListValue, "log_level",
translate("Log Level"),
translate('Set the logging level'))
o:value("debug", "debug")
o:value("info", "info")
o:value("warn", "warn")
o:value("error", "error")
o:value("fatal", "fatal")
o:depends("remote_endpoint", 0)
o = s:option(DynamicList, "hosts",
translate("Client connection"),
translate('Specifies where the Docker daemon will listen for client connections'))
o:value("unix:///var/run/docker.sock", "unix:///var/run/docker.sock")
o:value("tcp://0.0.0.0:2375", "tcp://0.0.0.0:2375")
o.rmempty = true
o:depends("remote_endpoint", 0)
end
>>>>>>> ec564ddf6... luci-app-dockerman: set examle registry url as placeholder
return m

View file

@ -66,11 +66,11 @@ end
local volume_list = get_volumes()
m = SimpleForm("docker", translate("Docker"))
m = SimpleForm("docker", translate("Docker - Volumes"))
m.submit=false
m.reset=false
s = m:section(Table, volume_list, translate("Volumes"))
s = m:section(Table, volume_list, translate("Volumes overview"))
o = s:option(Flag, "_selected","")
o.disabled = 0