summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-dockerman/luasrc/view/dockerman/container.htm
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-06-10 10:56:12 +0200
committerGitHub <noreply@github.com>2020-06-10 10:56:12 +0200
commit490596a623d9fd0e763e593ee388ec81477a892b (patch)
treee8940a7900596e7e659c4a60b1c18dd8eac1004c /applications/luci-app-dockerman/luasrc/view/dockerman/container.htm
parentaed292ad45d09407f6008d68b236ceaa79270ab2 (diff)
parent7aabe27c00323870ddab5e2a4e658a1c5902e03f (diff)
Merge pull request #4073 from TDT-AG/pr/20200427-luci-app-dockerman
luci-app-dockerman: add package
Diffstat (limited to 'applications/luci-app-dockerman/luasrc/view/dockerman/container.htm')
-rw-r--r--applications/luci-app-dockerman/luasrc/view/dockerman/container.htm27
1 files changed, 27 insertions, 0 deletions
diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/container.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/container.htm
new file mode 100644
index 000000000..dab1dee56
--- /dev/null
+++ b/applications/luci-app-dockerman/luasrc/view/dockerman/container.htm
@@ -0,0 +1,27 @@
+<br>
+<ul class="cbi-tabmenu">
+ <li id="cbi-tab-container_info"><a id="a-cbi-tab-container_info" href=""><%:Info%></a></li>
+ <li id="cbi-tab-container_resources"><a id="a-cbi-tab-container_resources" href=""><%:Resources%></a></li>
+ <li id="cbi-tab-container_stats"><a id="a-cbi-tab-container_stats" href=""><%:Stats%></a></li>
+ <li id="cbi-tab-container_file"><a id="a-cbi-tab-container_file" href=""><%:File%></a></li>
+ <li id="cbi-tab-container_console"><a id="a-cbi-tab-container_console" href=""><%:Console%></a></li>
+ <li id="cbi-tab-container_inspect"><a id="a-cbi-tab-container_inspect" href=""><%:Inspect%></a></li>
+ <li id="cbi-tab-container_logs"><a id="a-cbi-tab-container_logs" href=""><%:Logs%></a></li>
+</ul>
+
+<script type="text/javascript">
+ let re = /\/admin\/docker\/container\//
+ let p = window.location.href
+ let path = p.split(re)
+ let container_id = path[1].split('/')[0] || path[1]
+ let action = path[1].split('/')[1] || "info"
+ let actions=["info","resources","stats","file","console","logs","inspect"]
+ actions.forEach(function(item) {
+ document.getElementById("a-cbi-tab-container_" + item).href= path[0]+"/admin/docker/container/"+container_id+'/'+item
+ if (action === item) {
+ document.getElementById("cbi-tab-container_" + item).className="cbi-tab"
+ } else {
+ document.getElementById("cbi-tab-container_" + item).className="cbi-tab-disabled"
+ }
+ })
+</script>