From bca9c232333001b34648adc54183a429118cf1f7 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Thu, 17 Oct 2019 19:56:08 -0700 Subject: [PATCH] luci-app-docker: readme pdf link --- package/lean/luci-app-docker/Makefile | 2 +- .../luasrc/model/cbi/docker.lua | 27 ++----------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/package/lean/luci-app-docker/Makefile b/package/lean/luci-app-docker/Makefile index 19ea282ed..34979a90b 100755 --- a/package/lean/luci-app-docker/Makefile +++ b/package/lean/luci-app-docker/Makefile @@ -10,7 +10,7 @@ LUCI_TITLE:=Luci for Docker-CE LUCI_DEPENDS:=+docker-ce LUCI_PKGARCH:=all PKG_VERSION:=1 -PKG_RELEASE:=8 +PKG_RELEASE:=9 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-docker/luasrc/model/cbi/docker.lua b/package/lean/luci-app-docker/luasrc/model/cbi/docker.lua index 750418b76..270fecbbc 100644 --- a/package/lean/luci-app-docker/luasrc/model/cbi/docker.lua +++ b/package/lean/luci-app-docker/luasrc/model/cbi/docker.lua @@ -17,30 +17,7 @@ wan_mode = s:option(Flag, "wan_mode", translate("Enable WAN access Dokcer"), tra wan_mode.default = 0 wan_mode.rmempty = false - -o = s:option(Button,"readme",translate("Docker Readme First")) -o.inputtitle = translate("Download DockerReadme.pdf") -o.description = translate("Please download DockerReadme.pdf to read when first-running") -o.inputstyle = "reload" -o.write = function() - Download() -end - -function Download() - local t,e - t=nixio.open("/www/DockerReadme.pdf","r") - luci.http.header('Content-Disposition','attachment; filename="DockerReadme.pdf"') - luci.http.prepare_content("application/octet-stream") - while true do - e=t:read(nixio.const.buffersize) - if(not e)or(#e==0)then - break - else - luci.http.write(e) - end - end - t:close() - luci.http.close() -end +o=s:option(DummyValue,"readme",translate(" ")) +o.description=translate(""..translate("Download DockerReadme.pdf").."") return m \ No newline at end of file