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"),
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)
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
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
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
_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")
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
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","")
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)
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
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)
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
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='-'}
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
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