mirror of
https://github.com/openwrt/luci.git
synced 2025-01-18 23:02:09 +00:00
ae8bbb814f
* HTML Cleanup: Meta tags. * Converted charset to shorthand. * Removed meta tags with `Content-Script-Type` attribute. (Invalid in HTML5 spec.) * HTML Cleanup: CSS tags. * Removed `type` attribute with CSS files from link tags. (HTML5 spec recommends omitting it.) * Removed `type` attribute from style tags. (Deprecated in HTML5 spec.) https://html.spec.whatwg.org/#attr-link-type https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style * HTML Cleanup: Convert from XHTML to HTML5 * Removed XML declaration. * Removed XML namespace. * Changed doctype to HTML5. * HTML Cleanup: CDATA tags. * CDATA sections should not be used within HTML they are considered as comments and not displayed. https://developer.mozilla.org/en-US/docs/Web/API/CDATASection * HTML Cleanup: Script tags. * Removed `language` attribute from script tags. (No longer valid in HTML5) * Removed `type` attribute with JavaScript MIME type from script tags. (HTML5 spec recommends omitting it.) https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type https://mimesniff.spec.whatwg.org/#javascript-mime-type Signed-off-by: Mustafa Can Elmacı <mustafacan@elmaci.net>
29 lines
1.3 KiB
HTML
29 lines
1.3 KiB
HTML
<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>
|
|
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>
|