Delete directory 'html'
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Porygon</title>
|
||||
|
||||
<style>
|
||||
.server {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.status {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.online {
|
||||
background-color: lightgreen;
|
||||
}
|
||||
|
||||
.offline {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
body {
|
||||
background: url("background.png") center / cover no-repeat fixed;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<font size=5><p>Hypervisors</p></font>
|
||||
|
||||
<div class="server">
|
||||
<span id="hypervisor-status" class="status"></span>
|
||||
<a href="hypervisor/">hypervisor</a>
|
||||
</div>
|
||||
|
||||
<font size=5><p>On-Prem</p></font>
|
||||
|
||||
<div class="server">
|
||||
<span id="realserver-status" class="status"></span>
|
||||
<a href="realserver/">realserver</a>
|
||||
</div>
|
||||
|
||||
<font size=5><p>Cloud</p></font>
|
||||
|
||||
<div class="server">
|
||||
<span id="vps-status" class="status"></span>
|
||||
<a href="vps/">vps</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
fetch("status.json")
|
||||
.then(response => response.json())
|
||||
.then(status => {
|
||||
for (const server in status) {
|
||||
const element = document.getElementById(server + "-status");
|
||||
if (!element) continue;
|
||||
if (status[server]) {
|
||||
element.classList.add("online");
|
||||
} else {
|
||||
element.classList.add("offline");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
background-color: black;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<title>Server Stats</title>
|
||||
<h1 id="hostname">Loading...</h1>
|
||||
|
||||
<p>Uptime: <span id="uptime">-</span></p>
|
||||
<p>CPU usage: <span id="cpu">-</span>%</p>
|
||||
<p>CPU count: <span id="cpu-count">-</span></p>
|
||||
<p>RAM usage: <span id="ram">-</span>%</p>
|
||||
<p>RAM total: <span id="ram-total">-</span> GB</p>
|
||||
<p>Swap usage: <span id="swap">-</span>%</p>
|
||||
<p>Swap total: <span id="swap-total">-</span> GB</p>
|
||||
<p>Disk total: <span id="disk-total">-</span> GB</p>
|
||||
<p>Disk usage: <span id="disk">-</span>%</p>
|
||||
<p>Last updated: <span id="timestamp">-</span></p>
|
||||
|
||||
<script>
|
||||
fetch("stats.json")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
document.getElementById("hostname").textContent = data.hostname;
|
||||
document.getElementById("uptime").textContent = data.uptime;
|
||||
document.getElementById("cpu").textContent = data.cpu_usage;
|
||||
document.getElementById("cpu-count").textContent = data.cpu_count;
|
||||
document.getElementById("ram").textContent = data.ram_usage;
|
||||
document.getElementById("ram-total").textContent = data.ram_total_gb;
|
||||
document.getElementById("swap").textContent = data.swap_usage;
|
||||
document.getElementById("swap-total").textContent = data.swap_total_gb;
|
||||
document.getElementById("disk-total").textContent = data.disk_total_gb;
|
||||
document.getElementById("disk").textContent = data.disk_usage;
|
||||
document.getElementById("timestamp").textContent = data.timestamp;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user