picluster/web/blank.html
Verita84 48111c89c0 fix
2021-08-25 08:44:55 -06:00

73 lines
1.8 KiB
HTML

<html>
<head>
<script src="/assets/jquery.min.js"></script>
<link rel="stylesheet" href="/assets/picluster-iframe.css">
<link rel="stylesheet" href="/assets/circle.css">
<script>
function getContainerStatus() {
setTimeout(function () {
if (parent.token) {
$.get("/nodes?token=" + parent.token, function (data) {
var check_data = data;
var total = check_data.total_containers;
var running = 0;
for (var i in check_data.data) {
running = running + check_data.data[i].total_running_containers;
}
var calc = Math.floor((running / total * 100));
var percent = 0;
(!calc == 100) ? percent = percent = Math.ceil((calc + 1) / 100) * 10: percent = calc;
document.getElementById("running_containers").textContent = percent + "%";
document.getElementById("running-class").className = "c100 p" + percent + " small";
getContainerStatus();
});
}
}, 5000)
}
</script>
</head>
<body>
<div id="landing_page">
<img id="logo" src="/logo.png">
<br>
<b>Welcome to PiCluster!</b>
</div>
<div id="source_issues_circle">
<a href='https://git.rage.lol/verita84/picluster/' id='source' target="_blank">
<img src="/assets/images/GitHub-Mark-120px-plus.png">
<br>
Git
</a>
<a href='https://git.rage.lol/verita84/picluster/issues' id='issues' target="_blank">
<img src="/assets/images/Debug-Bug-icon.png">
<br>
Report Issue
</a>
<a href="containers-layout.html" id="status_circle">
<div class="page">
<div class="clearfix">
<div id="running-class" class="c100 p0 small">
<span id='running_containers'>0%</span>
<div class="slice">
<div class="bar"></div>
<div class="fill"></div>
</div>
</div>
</div>
</div>
Running
</a>
</div>
<script>
getContainerStatus();
</script>
</body>
</html>