From 67a819530044c20266f9ceea89a647c24aa4c418 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 10 Feb 2020 14:15:43 +0800 Subject: [PATCH] luci-app-dockerman: bump to v0.2.1 --- package/ctcgfw/luci-app-dockerman/Makefile | 2 +- .../luasrc/model/cbi/docker/newcontainer.lua | 9 +++ .../luasrc/view/docker/resolv_container.htm | 55 ++++++++++--------- 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/package/ctcgfw/luci-app-dockerman/Makefile b/package/ctcgfw/luci-app-dockerman/Makefile index a6865a4bcc..6d78ce7b77 100644 --- a/package/ctcgfw/luci-app-dockerman/Makefile +++ b/package/ctcgfw/luci-app-dockerman/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-dockerman -PKG_VERSION:=v0.2 +PKG_VERSION:=v0.2.1 PKG_RELEASE:=beta PKG_MAINTAINER:=lisaac PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/package/ctcgfw/luci-app-dockerman/luasrc/model/cbi/docker/newcontainer.lua b/package/ctcgfw/luci-app-dockerman/luasrc/model/cbi/docker/newcontainer.lua index 712cee0580..bd4a6f992f 100644 --- a/package/ctcgfw/luci-app-dockerman/luasrc/model/cbi/docker/newcontainer.lua +++ b/package/ctcgfw/luci-app-dockerman/luasrc/model/cbi/docker/newcontainer.lua @@ -54,6 +54,7 @@ if cmd_line and cmd_line:match("^docker.+") then else default_config[_key] = default_config[_key] .. " ".. w if is_quot_complete(default_config[_key]) then + -- clear quotation marks default_config[_key] = default_config[_key]:gsub("[\"\']", "") _key = nil end @@ -101,8 +102,12 @@ if cmd_line and cmd_line:match("^docker.+") then if key == "mount" or key == "link" or key == "env" or key == "dns" or key == "port" or key == "device" or key == "tmpfs" then if not default_config[key] then default_config[key] = {} end table.insert( default_config[key], val ) + -- clear quotation marks + default_config[key][#default_config[key]] = default_config[key][#default_config[key]]:gsub("[\"\']", "") else default_config[key] = val + -- clear quotation marks + default_config[key] = default_config[key]:gsub("[\"\']", "") end -- if there are " or ' in val and separate by space, we need keep the _key to link with next w if is_quot_complete(val) then @@ -119,8 +124,12 @@ if cmd_line and cmd_line:match("^docker.+") then if key == "mount" or key == "link" or key == "env" or key == "dns" or key == "port" or key == "device" or key == "tmpfs" then if not default_config[key] then default_config[key] = {} end table.insert( default_config[key], w ) + -- clear quotation marks + default_config[key][#default_config[key]] = default_config[key][#default_config[key]]:gsub("[\"\']", "") else default_config[key] = w + -- clear quotation marks + default_config[key] = default_config[key]:gsub("[\"\']", "") end if key == "cpus" or key == "cpushare" or key == "memory" or key == "blkioweight" or key == "device" or key == "tmpfs" then default_config["advance"] = 1 diff --git a/package/ctcgfw/luci-app-dockerman/luasrc/view/docker/resolv_container.htm b/package/ctcgfw/luci-app-dockerman/luasrc/view/docker/resolv_container.htm index 140f0ae81f..5e42ad1a82 100644 --- a/package/ctcgfw/luci-app-dockerman/luasrc/view/docker/resolv_container.htm +++ b/package/ctcgfw/luci-app-dockerman/luasrc/view/docker/resolv_container.htm @@ -1,4 +1,3 @@ -<%+cbi/valueheader%> - - +<%+cbi/valueheader%> + + <%+cbi/valuefooter%> \ No newline at end of file