luci-app-dockerman: sync with upstream source

This commit is contained in:
CN_SZTL 2020-01-29 00:54:45 +08:00
parent 66d3af4eec
commit 346cb27e51
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
9 changed files with 11 additions and 13 deletions

View File

@ -123,7 +123,7 @@ docker_status = m:section(SimpleSection)
docker_status.template="docker/apply_widget"
docker_status.err=nixio.fs.readfile(dk.options.status_path)
-- luci.util.perror(docker_status.err)
if docker_status then docker:clear_status() end
if docker_status.err then docker:clear_status() end
action_section = m:section(Table,{{}})

View File

@ -81,7 +81,7 @@ docker_status = m:section(SimpleSection)
docker_status.template="docker/apply_widget"
docker_status.err=nixio.fs.readfile(dk.options.status_path)
-- luci.util.perror(docker_status.err)
if docker_status then docker:clear_status() end
if docker_status.err then docker:clear_status() end
c_table = m:section(Table, c_lists, translate("Containers"))
c_table.nodescr=true
@ -200,6 +200,4 @@ btnstop.write = function(self, section)
start_stop_remove(m,"stop")
end
return m

View File

@ -151,7 +151,7 @@ end
docker_status = m:section(SimpleSection)
docker_status.template="docker/apply_widget"
docker_status.err=nixio.fs.readfile(dk.options.status_path)
if docker_status then docker:clear_status() end
if docker_status.err then docker:clear_status() end
action = m:section(Table,{{}})
action.notitle=true

View File

@ -75,7 +75,7 @@ end
docker_status = m:section(SimpleSection)
docker_status.template="docker/apply_widget"
docker_status.err=nixio.fs.readfile(dk.options.status_path)
if docker_status then docker:clear_status() end
if docker_status.err then docker:clear_status() end
action = m:section(Table,{{}})
action.notitle=true

View File

@ -157,7 +157,7 @@ m.redirect = luci.dispatcher.build_url("admin", "docker", "containers")
docker_status = m:section(SimpleSection)
docker_status.template="docker/apply_widget"
docker_status.err=nixio.fs.readfile(dk.options.status_path)
if docker_status then docker:clear_status() end
if docker_status.err then docker:clear_status() end
local s = m:section(SimpleSection, translate("New Container"))
s.addremove = true

View File

@ -20,7 +20,7 @@ m.redirect = luci.dispatcher.build_url("admin", "docker", "networks")
docker_status = m:section(SimpleSection)
docker_status.template="docker/apply_widget"
docker_status.err=nixio.fs.readfile(dk.options.status_path)
if docker_status then docker:clear_status() end
if docker_status.err then docker:clear_status() end
s = m:section(SimpleSection, translate("New Network"))
s.addremove = true

View File

@ -79,7 +79,7 @@ end
docker_status = m:section(SimpleSection)
docker_status.template="docker/apply_widget"
docker_status.err=nixio.fs.readfile(dk.options.status_path)
if docker_status then docker:clear_status() end
if docker_status.err then docker:clear_status() end
action = m:section(Table,{{}})
action.notitle=true

View File

@ -128,7 +128,7 @@ function fnSubmitForm(el){
}
<% if self.err then -%>
docker_status_message('warning', "<%=self.err%>");
docker_status_message('warning', `<%=self.err%>`);
document.getElementById('docker_apply_overlay').addEventListener("click", (e)=>{
docker_status_message()
})

View File

@ -13,9 +13,9 @@
return;
}
let re = /\/admin\/docker\/newcontainer\//
let p = window.location.href
let path = p.split(re)
window.location = path[0] + "/admin/docker/newcontainer/" + encodeURI(cmd_line)
let p = window.location.href
let path = p.split(re)
window.location.href = path[0] + "/admin/docker/newcontainer/" + encodeURI(cmd_line)
}
</script>
<input type="button" class="cbi-button cbi-button-apply" value="Command line" onclick="resolv_container('<%=self.option%>')" />