diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2023-02-13 19:43:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2023-02-13 19:43:51 +0000 |
commit | f73f2356820468344757dbb9d7f3ec73ece7bf66 (patch) | |
tree | cc4d1f8559ab8d0e73f4efed80c1f5c866501a12 /web/html | |
parent | Reworking container version command in python. (diff) | |
download | compute-tools-f73f2356820468344757dbb9d7f3ec73ece7bf66.tar.xz compute-tools-f73f2356820468344757dbb9d7f3ec73ece7bf66.zip |
Updating.next+web
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/about.html.in | 53 | ||||
-rw-r--r-- | web/html/footer.html | 23 | ||||
-rw-r--r-- | web/html/header.html.in | 74 | ||||
-rw-r--r-- | web/html/index.html.in | 50 | ||||
-rw-r--r-- | web/html/log.html.in | 5 | ||||
-rw-r--r-- | web/html/monitoring.html.in | 75 | ||||
-rw-r--r-- | web/html/services.bottom.html.in | 2 | ||||
-rw-r--r-- | web/html/services.top.html.in | 20 | ||||
-rw-r--r-- | web/html/systems.bottom.html.in | 2 | ||||
-rw-r--r-- | web/html/systems.top.html.in | 20 | ||||
-rw-r--r-- | web/html/terminal.html | 18 | ||||
-rw-r--r-- | web/html/terminal.html.in | 1 |
12 files changed, 343 insertions, 0 deletions
diff --git a/web/html/about.html.in b/web/html/about.html.in new file mode 100644 index 0000000..1b27e87 --- /dev/null +++ b/web/html/about.html.in @@ -0,0 +1,53 @@ +<div style="height: 4em"></div> + +<div class="h-100 p-5 bg-light border rounded-3"> + <h1 style="margin-top: 0;"><b>compute-tools</b> ({cnt_version})</h1> + + <div style="height: 2em"></div> + + <div style="border-left: 1em solid #a40000; padding-top: 1em; padding-left: 1em; padding-bottom: 1em;"> + <h3 style="margin-top: 0;"> + <ul style="list-style: none;"> + <li> + <div class="row"> + <div class="col-md-3"> + <b>running on</b> + </div> + + <div class="col-md-9"> + {os_string} + </div> + </div> + </li> + + <li><div style="height: 1em"></div></li> + + <li> + <div class="row"> + <div class="col-md-3"> + <b>using</b> + </div> + + <div class="col-md-9"> + {kernel_name}, {kernel_version} [{host_architecture}] + </div> + </div> + </li> + + <li><div style="height: 1em"></div></li> + + <li> + <div class="row"> + <div class="col-md-3"> + <b>up since</b> + </div> + + <div class="col-md-9"> + {host_uptime} + </div> + </div> + </li> + </ul> + </h3> + </div> +</div> diff --git a/web/html/footer.html b/web/html/footer.html new file mode 100644 index 0000000..0875c39 --- /dev/null +++ b/web/html/footer.html @@ -0,0 +1,23 @@ + + <!-- End content --> + </main> + + <div style="height: 4em"></div> + + <footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top"> + <p class="col-md-4 mb-0 text-muted">© 2022</p> + + <ul class="nav col-md-4 justify-content-end"> + <li class="nav-item"><a href="https://open-infrastructure.net/contact" class="nav-link px-2 text-muted">Contact</a></li> + <li class="nav-item"><a href="https://open-infrastructure.net/legal" class="nav-link px-2 text-muted">Legal</a></li> + </ul> + </footer> + </div> + + <!-- Bootstrap core JS --> + <script src="/_static/popperjs/popper.min.js"></script> + <script src="/_static/bootstrap/js/bootstrap.min.js"></script> + + <!-- Custom scripts for this template --> + </body> +</html> diff --git a/web/html/header.html.in b/web/html/header.html.in new file mode 100644 index 0000000..e069099 --- /dev/null +++ b/web/html/header.html.in @@ -0,0 +1,74 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="author" content="system-administration@open-infrastructure.net"> + <meta name="description" content="Open Infrastructure"> + <meta name="generator" content="open-infrastructure.net"> + <title>{host_name}</title> + + <link rel="canonical" href="https://open-infrastructure.net"> + <link rel="icon" href="/favicon.svg" type="image/svg+xml"> + + <!-- Bootstrap core CSS --> + <link href="/_static/bootstrap/css/bootstrap.min.css" rel="stylesheet"> + + <!-- Custom styles for this template --> + <link href="/_static/bootstrap-icons/bootstrap-icons.css" rel="stylesheet"> + <link href="/_static/dejavu-fonts/dejavu-fonts.css" rel="stylesheet"> + + <link href="/_static/local/font.css" rel="stylesheet"> + <link href="/_static/local/icon.css" rel="stylesheet"> + </head> + + <body> + <nav class="navbar navbar-expand-md navbar-dark fixed-top" style="background: #a40000"> + <div class="container-fluid"> + <a class="navbar-brand" href="/"><b>{host_name}</b></a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div style="width: 8em"></div> + <div class="collapse navbar-collapse" id="navbarCollapse"> + <ul class="navbar-nav me-auto mb-2 mb-md-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="/systems.py">Systems</a> + </li> + <li><div style="width: 1em"></div></li> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="/services.py">Services</a> + </li> + <li><div style="width: 4em"></div></li> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="/log.py">Log</a> + </li> + <li><div style="width: 1em"></div></li> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="/terminal.py">Terminal</a> + </li> + <li><div style="width: 1em"></div></li> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="/html/terminal.html" target="_blank">Terminal [x]</a> + </li> + <li><div style="width: 1em"></div></li> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="/tools.py">Tools</a> + </li> + <li><div style="width: 4em"></div></li> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="/monitoring.py">Monitoring</a> + </li> + <li><div style="width: 4em"></div></li> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="/about.py">About</a> + </li> + </ul> + </div> + </div> + </nav> + + <div class="container"> + <main> + <!-- Begin content --> + diff --git a/web/html/index.html.in b/web/html/index.html.in new file mode 100644 index 0000000..214e8bb --- /dev/null +++ b/web/html/index.html.in @@ -0,0 +1,50 @@ +<div style="height: 4em"></div> + +<h1 class="pb-2 border-bottom">Pages</h1> + +<div class="row g-4 py-5 row-cols-1 row-cols-lg-4"> + <div class="feature col"> + <div class="feature-icon d-inline-flex align-items-center justify-content-center bg-gradient text-white fs-2 mb-3" style="background-color: #a40000;"> + <a href="/systems.py" class="text-light text-decoration-none"><i class="bi bi-stickies"></i></a> + </div> + + <h4>Systems</h4> + <p><a href="/systems.py">Container management for systemd-nspawn.</a></p> + </div> + + <div class="feature col"> + <div class="feature-icon d-inline-flex align-items-center justify-content-center bg-gradient text-white fs-2 mb-3" style="background-color: #a40000;"> + <a href="/services.py" class="text-light text-decoration-none"><i class="bi bi-gear"></i></a> + </div> + + <h4>Services</h4> + <p><a href="/services.py">Restart host services.</a></p> + </div> + + <div class="feature col"> + <div class="feature-icon d-inline-flex align-items-center justify-content-center bg-gradient text-white fs-2 mb-3" style="background-color: #a40000;"> + <a href="/tools.py" class="text-light text-decoration-none"><i class="bi bi-diagram-3"></i></a> + </div> + + <h4>Tools</h4> + <p><a href="/tools.py">Network debugging tools.</a></p> + </div> + + <div class="feature col"> + <div class="feature-icon d-inline-flex align-items-center justify-content-center bg-gradient text-white fs-2 mb-3" style="background-color: #a40000;"> + <a href="/ttyd.py" class="text-light text-decoration-none"><i class="bi bi-hdd-stack"></i></a> + </div> + + <h4>Terminal</h4> + <p><a href="/ttyd.py">Access the host system directly.</a></p> + </div> + + <div class="feature col"> + <div class="feature-icon d-inline-flex align-items-center justify-content-center bg-gradient text-white fs-2 mb-3" style="background-color: #a40000;"> + <a href="/log.py" class="text-light text-decoration-none"><i class="bi bi-stack"></i></a> + </div> + + <h4>Logfile</h4> + <p><a href="/log.py">Read container log file.</a></p> + </div> +</div> diff --git a/web/html/log.html.in b/web/html/log.html.in new file mode 100644 index 0000000..c39b813 --- /dev/null +++ b/web/html/log.html.in @@ -0,0 +1,5 @@ +<div id="header"><h2>/var/log/compute-tools/container.log <a class="pull-right" id="pause" href='#'>Pause</a></h2></div> +<pre id="data">Loading...</pre> + +<script src="/_static/jquery/jquery.min.js" /> +<script src="/log.js" /> diff --git a/web/html/monitoring.html.in b/web/html/monitoring.html.in new file mode 100644 index 0000000..d1dfdf7 --- /dev/null +++ b/web/html/monitoring.html.in @@ -0,0 +1,75 @@ +<script>var netdataNoBootstrap = true;</script> +<script type="text/javascript" src="https://{host_name}/netdata/dashboard.js"></script> + +<link href="/_static/local/font.css" rel="stylesheet"> + +<div style="height: 4em"></div> + +<h1>Monitoring</h1> + +<div style="height: 1em"></div> + +<div class="row"> + <div class="col-md-12"> + <div + data-title="Load" + data-netdata="system.load" + data-chart-library="dygraph" + data-width="100%" + data-height="10em" + data-after="-600" + ></div> + </div> +</div> + +<div style="height: 2em"></div> + +<div class="row"> + <div class="col-md-6"> + <div + data-title="CPUs" + data-netdata="system.cpu" + data-chart-library="dygraph" + data-width="100%" + data-height="10em" + data-after="-300" + ></div> + </div> + + <div class="col-md-6"> + <div + data-title="Storage" + data-netdata="system.io" + data-chart-library="dygraph" + data-width="100%" + data-height="10em" + data-after="-300" + ></div> + </div> +</div> + +<div style="height: 2em"></div> + +<div class="row"> + <div class="col-md-6"> + <div + data-title="Memory" + data-netdata="system.ram" + data-chart-library="dygraph" + data-width="100%" + data-height="10em" + data-after="-300" + ></div> + </div> + + <div class="col-md-6"> + <div + data-title="Network" + data-netdata="system.net" + data-chart-library="dygraph" + data-width="100%" + data-height="10em" + data-after="-300" + ></div> + </div> +</div> diff --git a/web/html/services.bottom.html.in b/web/html/services.bottom.html.in new file mode 100644 index 0000000..17b0d04 --- /dev/null +++ b/web/html/services.bottom.html.in @@ -0,0 +1,2 @@ + </div> +</form> diff --git a/web/html/services.top.html.in b/web/html/services.top.html.in new file mode 100644 index 0000000..3c223f1 --- /dev/null +++ b/web/html/services.top.html.in @@ -0,0 +1,20 @@ +<div style="height: 4em"></div> + +<form id="form"> + <div class="form-group"> + <div class="row"> + <div class="col-md-4"> + <h2>All services:</h2> + </div> + + <div class="col-md-8"> + <div class="btn-group" role="group"> + <a href="{Url}?name=ALL&command=start"><button type="button" class="btn btn-success">start</button></a> + <a href="{Url}?name=ALL&command=stop"><button type="button" class="btn btn-warning">stop</button></a> + </div> + + <a href="{Url}?name=ALL&command=kill"><button type="button" class="btn btn-danger">kill</button></a> + </div> + </div> + + <div style="height: 4em"></div> diff --git a/web/html/systems.bottom.html.in b/web/html/systems.bottom.html.in new file mode 100644 index 0000000..17b0d04 --- /dev/null +++ b/web/html/systems.bottom.html.in @@ -0,0 +1,2 @@ + </div> +</form> diff --git a/web/html/systems.top.html.in b/web/html/systems.top.html.in new file mode 100644 index 0000000..a17ab73 --- /dev/null +++ b/web/html/systems.top.html.in @@ -0,0 +1,20 @@ +<div style="height: 4em"></div> + +<form id="form"> + <div class="form-group"> + <div class="row"> + <div class="col-md-4"> + <h2>All systems</h2> + </div> + + <div class="col-md-8"> + <div class="btn-group" role="group"> + <a href="{Url}?name=ALL&command=start"><button type="button" class="btn btn-success">start</button></a> + <a href="{Url}?name=ALL&command=stop"><button type="button" class="btn btn-warning">stop</button></a> + </div> + + <a href="{Url}?name=ALL&command=kill"><button type="button" class="btn btn-danger">kill</button></a> + </div> + </div> + + <div style="height: 4em"></div> diff --git a/web/html/terminal.html b/web/html/terminal.html new file mode 100644 index 0000000..cd8a7a2 --- /dev/null +++ b/web/html/terminal.html @@ -0,0 +1,18 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="author" content="system-administration@open-infrastructure.net"> + <meta name="description" content="Open Infrastructure"> + <meta name="generator" content="open-infrastructure.net"> + <title>{host_name}</title> + + <link rel="canonical" href="https://open-infrastructure.net"> + <link rel="icon" href="/favicon.svg" type="image/svg+xml"> + </head> + + <body style="background-color: rgb(43, 43, 43);"> + <iframe src="/ttyd" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" scrolling="no" seamless="seamless" style="position: absolute; height: 98%; width: 98%; border: none;border-width:0px; padding: 0px; margin: 0px;" /> + </body> +</html> diff --git a/web/html/terminal.html.in b/web/html/terminal.html.in new file mode 100644 index 0000000..38c9212 --- /dev/null +++ b/web/html/terminal.html.in @@ -0,0 +1 @@ +<iframe src="/ttyd" style="border: none; height: 50em; width: 100%" /> |