From 2a1e1c368ce9c3a6105aa85192cbaa8fdcbd28bb Mon Sep 17 00:00:00 2001 From: Shulhan Date: Fri, 22 Jan 2021 02:50:19 +0700 Subject: _www: display the list of caches in front page When user open the rescached web interface, the front page will render and refresh the list of non-local caches per 10 seconds. --- _www/index.html | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- _www/rescached.js | 30 ++++++++++++++++++------- go.mod | 2 +- go.sum | 4 ++-- httpd.go | 41 +++++++++++++++++++++++++++++++--- 5 files changed, 128 insertions(+), 16 deletions(-) diff --git a/_www/index.html b/_www/index.html index 3403751..aea85e5 100644 --- a/_www/index.html +++ b/_www/index.html @@ -12,6 +12,18 @@ padding: 1em 0px; border-bottom: 1px solid silver; } + #summary { + margin: 1em 0; + } + #caches { + height: 20em; + overflow: auto; + font-family: monospace; + } + .QType { + width: 3em; + display: inline-block; + } .rr { margin-left: 1em; width: 100%; @@ -37,7 +49,7 @@ } - +