From 121be53fdb1c2898bbf394c5d93ee345ce7cfa49 Mon Sep 17 00:00:00 2001 From: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com> Date: Sat, 4 Jun 2022 17:03:32 +0000 Subject: [PATCH] luci-app-docker: code alignment --- applications/luci-app-docker/luasrc/controller/docker.lua | 2 +- applications/luci-app-docker/luasrc/model/cbi/docker.lua | 8 ++++---- applications/luci-app-docker/root/etc/docker-init | 1 - applications/luci-app-docker/root/etc/docker-web | 2 +- applications/luci-app-docker/root/etc/init.d/dockerd | 1 - 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/applications/luci-app-docker/luasrc/controller/docker.lua b/applications/luci-app-docker/luasrc/controller/docker.lua index eb5dadbc..c3b6952e 100644 --- a/applications/luci-app-docker/luasrc/controller/docker.lua +++ b/applications/luci-app-docker/luasrc/controller/docker.lua @@ -4,7 +4,7 @@ function index() if not nixio.fs.access("/etc/config/dockerd") then return end - + entry({"admin", "services", "docker"}, cbi("docker"), _("Docker CE Container"), 199).dependent = true entry({"admin", "services", "docker", "status"}, call("act_status")).leaf = true end diff --git a/applications/luci-app-docker/luasrc/model/cbi/docker.lua b/applications/luci-app-docker/luasrc/model/cbi/docker.lua index 037f3ee8..6b4ffe2f 100644 --- a/applications/luci-app-docker/luasrc/model/cbi/docker.lua +++ b/applications/luci-app-docker/luasrc/model/cbi/docker.lua @@ -7,17 +7,17 @@ end m = Map("dockerd", "Docker CE", translate("Docker is a set of platform-as-a-service (PaaS) products that use OS-level virtualization to deliver software in packages called containers.") .. button) - -m:section(SimpleSection).template = "docker/docker_status" +m:section(SimpleSection).template = "docker/docker_status" s = m:section(TypedSection, "docker") s.anonymous = true -wan_mode = s:option(Flag, "wan_mode", translate("Enable WAN access Docker"), translate("Enable WAN access docker mapped ports")) +wan_mode = s:option(Flag, "wan_mode", translate("Enable WAN access Docker")) +wan_mode.description = translate("Enable WAN access docker mapped ports") wan_mode.default = 0 wan_mode.rmempty = false -o = s:option(DummyValue,"readme",translate(" ")) +o = s:option(DummyValue, "readme", translate(" ")) o.description = translate(""..translate("Download DockerReadme.pdf").."") return m diff --git a/applications/luci-app-docker/root/etc/docker-init b/applications/luci-app-docker/root/etc/docker-init index 9bade865..45b9769a 100755 --- a/applications/luci-app-docker/root/etc/docker-init +++ b/applications/luci-app-docker/root/etc/docker-init @@ -23,4 +23,3 @@ w fi echo "y" | mkfs.ext4 /dev/sda$partid - diff --git a/applications/luci-app-docker/root/etc/docker-web b/applications/luci-app-docker/root/etc/docker-web index 361589b3..25cd6475 100755 --- a/applications/luci-app-docker/root/etc/docker-web +++ b/applications/luci-app-docker/root/etc/docker-web @@ -1,3 +1,3 @@ #!/bin/sh -docker run -d --restart=always --name="portainer" -p 9999:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce \ No newline at end of file +docker run -d --restart=always --name="portainer" -p 9999:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce diff --git a/applications/luci-app-docker/root/etc/init.d/dockerd b/applications/luci-app-docker/root/etc/init.d/dockerd index 5d6f36bf..094e3c60 100755 --- a/applications/luci-app-docker/root/etc/init.d/dockerd +++ b/applications/luci-app-docker/root/etc/init.d/dockerd @@ -18,5 +18,4 @@ start_service() { procd_set_param command /usr/bin/dockerd $dockerwan procd_set_param limits nofile="${nofile} ${nofile}" procd_close_instance - }