summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-07-15 15:41:37 +0200
committerGitHub <noreply@github.com>2020-07-15 15:41:37 +0200
commitd7d57217bb15f4f558dd66bf5cfde3035cb5c7d3 (patch)
treec35a34a8adc0896e1f262b3cb6d1939cf7db04a6 /applications
parentb99f33b6ce2ad8c654c14bf7cc9931cde9255a89 (diff)
parent1f8e181f0720d9131247665047e14e27c34e1cf4 (diff)
Merge pull request #4265 from TDT-AG/pr/20200713-luci-app-dockerman
luci-app-dockerman: improvements
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm2
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm2
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm4
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/images_import.htm2
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/images_load.htm2
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm4
-rwxr-xr-xapplications/luci-app-dockerman/root/etc/init.d/dockerman7
7 files changed, 12 insertions, 11 deletions
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm
index b1b193257..a061a6dba 100644
--- a/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinebutton.htm
@@ -1,6 +1,6 @@
<div style="display: inline-block;">
<% if self:cfgvalue(section) ~= false then %>
- <input class="cbi-button cbi-button-<%=self.inputstyle or "button" %>" type="submit"" <% if self.disable then %>disabled <% end %><%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.inputtitle or self.title)%> />
+ <input class="btn cbi-button cbi-button-<%=self.inputstyle or "button" %>" type="submit"" <% if self.disable then %>disabled <% end %><%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.inputtitle or self.title)%> />
<% else %>
-
<% end %>
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm
index 51c97f5c9..e4b0cf7a0 100644
--- a/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/cbi/inlinevalue.htm
@@ -28,6 +28,6 @@
ifattr(#self.keylist > 0, "data-choices", { self.keylist, self.vallist })
%> />
<%- if self.password then -%>
- <div class="cbi-button cbi-button-neutral" title="<%:Reveal/hide password%>" onclick="var e = this.previousElementSibling; e.type = (e.type === 'password') ? 'text' : 'password'">∗</div>
+ <div class="btn cbi-button cbi-button-neutral" title="<%:Reveal/hide password%>" onclick="var e = this.previousElementSibling; e.type = (e.type === 'password') ? 'text' : 'password'">∗</div>
<% end %>
</div>
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm
index c0778329f..8be43fbdd 100644
--- a/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm
@@ -11,8 +11,8 @@
</div>
<br>
<div class="cbi-value-field">
- <input type="button"" class="cbi-button cbi-button-action important" id="upload" name="upload" value="<%:Upload%>" />
- <input type="button"" class="cbi-button cbi-button-action important" id="download" name="download" value="<%:Download%>" />
+ <input type="button"" class="btn cbi-button cbi-button-action important" id="upload" name="upload" value="<%:Upload%>" />
+ <input type="button"" class="btn cbi-button cbi-button-action important" id="download" name="download" value="<%:Download%>" />
</div>
</div>
<script type="text/javascript">
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/images_import.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/images_import.htm
index eafb65490..6587087b6 100644
--- a/applications/luci-app-dockerman/luasrc/view/dockerman/images_import.htm
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/images_import.htm
@@ -1,7 +1,7 @@
<input type="text" class="cbi-input-text" name="isrc" placeholder="http://host/image.tar" id="isrc" />
<input type="text" class="cbi-input-text" name="itag" placeholder="repository:tag" id="itag" />
<div style="display: inline-block;">
- <input type="button"" class=" cbi-button cbi-button-add" id="btnimport" name="import" value="<%:Import%>" />
+ <input type="button"" class="btn cbi-button cbi-button-add" id="btnimport" name="import" value="<%:Import%>" />
<input type="file" id="file_import" style="visibility:hidden; position: absolute;top: 0px; left: 0px;" />
</div>
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/images_load.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/images_load.htm
index 4fe34e1ba..3ea4bd066 100644
--- a/applications/luci-app-dockerman/luasrc/view/dockerman/images_load.htm
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/images_load.htm
@@ -1,5 +1,5 @@
<div style="display: inline-block;">
- <input type="button"" class="cbi-button cbi-button-add" id="btnload" name="load" value="<%:Load%>" />
+ <input type="button"" class="btn cbi-button cbi-button-add" id="btnload" name="load" value="<%:Load%>" />
<input type="file" id="file_load" style="visibility:hidden; position: absolute;top: 0px; left: 0px;" accept="application/x-tar" />
</div>
<script type="text/javascript">
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm
index 50d88740d..1b130b4ec 100644
--- a/applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/newcontainer_resolve.htm
@@ -82,7 +82,7 @@
}
function show_reslov_dialog() {
- document.getElementById('dialog_reslov') || document.body.insertAdjacentHTML("beforeend", '<div id="dialog_reslov"><div class="dialog_box"><div class="dialog_line"></div><div class="dialog_line"><span><%:Plese input <docker create/run> command line:%></span><br><span id="cmd-line-status"></span></div><div class="dialog_line"><textarea class="cbi-input-textarea" id="dialog_reslov_text" style="width: 100%; height:100%;" rows="15" onkeyup="clear_text()"></textarea></div><div class="dialog_line" style="text-align: right;"><input type="button" class="cbi-button cbi-button-apply" type="submit" value="<%:Submit%>" onclick="reslov_container()" /> <input type="button" class="cbi-button cbi-button-reset" type="reset" value="<%:Cancel%>" onclick="close_reslov_dialog()" /></div><div class="dialog_line"></div></div></div>')
+ document.getElementById('dialog_reslov') || document.body.insertAdjacentHTML("beforeend", '<div id="dialog_reslov"><div class="dialog_box"><div class="dialog_line"></div><div class="dialog_line"><span><%:Plese input <docker create/run> command line:%></span><br><span id="cmd-line-status"></span></div><div class="dialog_line"><textarea class="cbi-input-textarea" id="dialog_reslov_text" style="width: 100%; height:100%;" rows="15" onkeyup="clear_text()"></textarea></div><div class="dialog_line" style="text-align: right;"><input type="button" class="btn cbi-button cbi-button-apply" type="submit" value="<%:Submit%>" onclick="reslov_container()" /> <input type="button" class="btn cbi-button cbi-button-reset" type="reset" value="<%:Cancel%>" onclick="close_reslov_dialog()" /></div><div class="dialog_line"></div></div></div>')
document.body.classList.add('dialog-reslov-active')
let s = document.getElementById('cmd-line-status')
s.innerHTML = ""
@@ -90,6 +90,6 @@
}
</script>
<%+cbi/valueheader%>
-<input type="button" class="cbi-button cbi-button-apply" value="<%:Command line%>" onclick="show_reslov_dialog()" />
+<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Command line%>" onclick="show_reslov_dialog()" />
<%+cbi/valuefooter%>
diff --git a/applications/luci-app-dockerman/root/etc/init.d/dockerman b/applications/luci-app-dockerman/root/etc/init.d/dockerman
index 22629c193..601dcf9c7 100755
--- a/applications/luci-app-dockerman/root/etc/init.d/dockerman
+++ b/applications/luci-app-dockerman/root/etc/init.d/dockerman
@@ -3,9 +3,6 @@
START=99
DOCKERD_CONF="/etc/docker/daemon.json"
-config_load dockerman
-config_get daemon_ea "local" daemon_ea
-
init_dockerman_chain(){
iptables -N DOCKER-MAN >/dev/null 2>&1
iptables -F DOCKER-MAN >/dev/null 2>&1
@@ -31,6 +28,10 @@ handle_allowed_interface(){
start(){
[ ! -x "/etc/init.d/dockerd" ] && return 0
+
+ config_load dockerman
+ config_get daemon_ea "local" daemon_ea
+
init_dockerman_chain
if [ -n "$daemon_ea" ]; then
handle_allowed_interface