diff options
author | Florian Eckert <fe@dev.tdt.de> | 2021-04-08 17:13:59 +0200 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2021-04-19 16:18:01 +0200 |
commit | ad05a0187bb9b03ba5ac9df27159f54521e15e18 (patch) | |
tree | 476a8b8b1c6f52230952ac0892cbcc197758e68e /applications/luci-app-dockerman/luasrc/model/cbi | |
parent | a9b196edafe4c751dbdb45937c76ad7a3a7abe38 (diff) |
luci-app-dockerman: revised the information for the individual page
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-dockerman/luasrc/model/cbi')
9 files changed, 92 insertions, 24 deletions
diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/configuration.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/configuration.lua index 73987cadb6..6fd831d370 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/configuration.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/configuration.lua @@ -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"), 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 ec3f9201af..4ad1dc1631 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua @@ -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) 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 5bcb5fae9c..f851f8a034 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua @@ -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 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 01a7e3f237..2381df4634 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/images.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/images.lua @@ -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 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 4cea32915d..f7152a59d0 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/networks.lua @@ -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","") 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 0ee344370e..37734ad015 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua @@ -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 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 2c9cb271fc..b89686b2ab 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newnetwork.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/newnetwork.lua @@ -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 diff --git a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua index 76a4dfd794..3c2b80a236 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/overview.lua @@ -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 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 8dae4a020d..865c913d30 100644 --- a/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/volumes.lua +++ b/applications/luci-app-dockerman/luasrc/model/cbi/dockerman/volumes.lua @@ -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 |