diff options
-rwxr-xr-x | dmt/dmt | 5 | ||||
-rw-r--r-- | dmt/html/master.html | 1 | ||||
-rw-r--r-- | dmt/html/stats.html | 17 |
3 files changed, 23 insertions, 0 deletions
@@ -116,6 +116,11 @@ case ${route[0]} in template "html/master.html" text/html ;; + "stats") + page_template="html/stats.html" + template "html/master.html" text/html + ;; + "style.css") template "style.css" text/css ;; diff --git a/dmt/html/master.html b/dmt/html/master.html index dfeeef3..42f77f7 100644 --- a/dmt/html/master.html +++ b/dmt/html/master.html @@ -11,6 +11,7 @@ <nav class="links"> <a href="/">jobs</a> | <a href="/services">services</a> + | <a href="/stats">stats</a> <span class="right"> %{ echo -n "$CYCHE_SITE_NAME" | escape_html %} diff --git a/dmt/html/stats.html b/dmt/html/stats.html new file mode 100644 index 0000000..8d03762 --- /dev/null +++ b/dmt/html/stats.html @@ -0,0 +1,17 @@ +<h1>Daemon Stats</h1> + +% fmt='table {{.ID}}\t{{.Image}}\t{{.RunningFor}}\t{{.Status}}' + +<div class="box"> + <div class="box-title">Containers</div> + <div class="box-text"> + <pre>%{ docker ps --all --format "$fmt" %}</pre> + </div> +</div> + +<div class="box"> + <div class="box-title">Usage</div> + <div class="box-text"> + <pre>%{ docker system df %}</pre> + </div> +</div> |