luci-app-dockerman: revised the information for the individual page
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
a9b196edaf
commit
ad05a0187b
9 changed files with 92 additions and 24 deletions
|
@ -4,10 +4,10 @@
|
||||||
local m, s, o
|
local m, s, o
|
||||||
|
|
||||||
m = Map("dockerd",
|
m = Map("dockerd",
|
||||||
translate("Docker"),
|
translate("Docker - Configuration"),
|
||||||
translate("DockerMan is a Simple Docker manager client for LuCI"))
|
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",
|
o = s:option(Flag, "remote_endpoint",
|
||||||
translate("Remote Endpoint"),
|
translate("Remote Endpoint"),
|
||||||
|
|
|
@ -195,7 +195,9 @@ local start_stop_remove = function(m, cmd)
|
||||||
end
|
end
|
||||||
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")
|
m.redirect = luci.dispatcher.build_url("admin/docker/containers")
|
||||||
|
|
||||||
s = m:section(SimpleSection)
|
s = m:section(SimpleSection)
|
||||||
|
|
|
@ -90,7 +90,9 @@ end
|
||||||
|
|
||||||
local container_list = get_containers()
|
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.submit=false
|
||||||
m.reset=false
|
m.reset=false
|
||||||
|
|
||||||
|
@ -102,7 +104,7 @@ if s.err then
|
||||||
docker:clear_status()
|
docker:clear_status()
|
||||||
end
|
end
|
||||||
|
|
||||||
s = m:section(Table, container_list, translate("Containers"))
|
s = m:section(Table, container_list, translate("Containers overview"))
|
||||||
s.addremove = false
|
s.addremove = false
|
||||||
s.sectionhead = translate("Containers")
|
s.sectionhead = translate("Containers")
|
||||||
s.sortable = false
|
s.sortable = false
|
||||||
|
|
|
@ -68,7 +68,9 @@ end
|
||||||
|
|
||||||
local image_list = get_images()
|
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.submit=false
|
||||||
m.reset=false
|
m.reset=false
|
||||||
|
|
||||||
|
@ -77,7 +79,9 @@ local pull_value={
|
||||||
_registry="index.docker.io"
|
_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"
|
s.template="cbi/nullsection"
|
||||||
|
|
||||||
o = s:option(Value, "_image_tag_name")
|
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"))
|
luci.http.redirect(luci.dispatcher.build_url("admin/docker/images"))
|
||||||
end
|
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 = s:option(DummyValue, "_image_import")
|
||||||
o.template = "dockerman/images_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 = s:option(Flag, "_selected","")
|
||||||
o.disabled = 0
|
o.disabled = 0
|
||||||
|
|
|
@ -47,11 +47,13 @@ end
|
||||||
|
|
||||||
local network_list = get_networks()
|
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.submit=false
|
||||||
m.reset=false
|
m.reset=false
|
||||||
|
|
||||||
s = m:section(Table, network_list, translate("Networks"))
|
s = m:section(Table, network_list, translate("Networks overview"))
|
||||||
s.nodescr=true
|
s.nodescr=true
|
||||||
|
|
||||||
o = s:option(Flag, "_selected","")
|
o = s:option(Flag, "_selected","")
|
||||||
|
|
|
@ -436,7 +436,7 @@ elseif cmd_line and cmd_line:match("^duplicate/[^/]+$") then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
m = SimpleForm("docker", translate("Docker"))
|
m = SimpleForm("docker", translate("Docker - Containers"))
|
||||||
m.redirect = luci.dispatcher.build_url("admin", "docker", "containers")
|
m.redirect = luci.dispatcher.build_url("admin", "docker", "containers")
|
||||||
|
|
||||||
s = m:section(SimpleSection)
|
s = m:section(SimpleSection)
|
||||||
|
@ -447,7 +447,7 @@ if s.err then
|
||||||
docker:clear_status()
|
docker:clear_status()
|
||||||
end
|
end
|
||||||
|
|
||||||
s = m:section(SimpleSection, translate("New Container"))
|
s = m:section(SimpleSection, translate("Create new docker container"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ local m, s, o
|
||||||
|
|
||||||
local dk = docker.new()
|
local dk = docker.new()
|
||||||
|
|
||||||
m = SimpleForm("docker", translate("Docker"))
|
m = SimpleForm("docker", translate("Docker - Network"))
|
||||||
m.redirect = luci.dispatcher.build_url("admin", "docker", "networks")
|
m.redirect = luci.dispatcher.build_url("admin", "docker", "networks")
|
||||||
|
|
||||||
s = m:section(SimpleSection)
|
s = m:section(SimpleSection)
|
||||||
|
@ -20,7 +20,7 @@ if s.err then
|
||||||
docker:clear_status()
|
docker:clear_status()
|
||||||
end
|
end
|
||||||
|
|
||||||
s = m:section(SimpleSection, translate("New Network"))
|
s = m:section(SimpleSection, translate("Create new docker network"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,9 @@ function byte_format(byte)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
m = Map("dockerd", translate("Docker"),
|
m = Map("dockerd",
|
||||||
translate("DockerMan is a Simple Docker manager client for LuCI, If you have any issue please visit:") ..
|
translate("Docker - Overview"),
|
||||||
" " ..
|
translate("An overview with the relevant data is displayed here with which the LuCI docker client is connected."))
|
||||||
[[<a href="https://github.com/lisaac/luci-app-dockerman" target="_blank">]] ..
|
|
||||||
translate("Github") ..
|
|
||||||
[[</a>]])
|
|
||||||
|
|
||||||
local docker_info_table = {}
|
local docker_info_table = {}
|
||||||
docker_info_table['3ServerVersion'] = {_key=translate("Docker Version"),_value='-'}
|
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)
|
s.volumes_total = tostring(#volumes_list)
|
||||||
end
|
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
|
return m
|
||||||
|
|
|
@ -66,11 +66,11 @@ end
|
||||||
|
|
||||||
local volume_list = get_volumes()
|
local volume_list = get_volumes()
|
||||||
|
|
||||||
m = SimpleForm("docker", translate("Docker"))
|
m = SimpleForm("docker", translate("Docker - Volumes"))
|
||||||
m.submit=false
|
m.submit=false
|
||||||
m.reset=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 = s:option(Flag, "_selected","")
|
||||||
o.disabled = 0
|
o.disabled = 0
|
||||||
|
|
Loading…
Reference in a new issue