aboutsummaryrefslogtreecommitdiff
path: root/admin/panes/quotas.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-08 12:04:30 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-08 12:04:30 +0200
commit95112b1eb06a4be531ded59563d53a63a8d614e8 (patch)
treefd3dc676227309c87a39feab9ca458985e327907 /admin/panes/quotas.php
parent87303b0d3540037fb94efdde24dbaacb2880d6cb (diff)
downloadmain-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.gz
main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.bz2
main-95112b1eb06a4be531ded59563d53a63a8d614e8.zip
Opening!
Diffstat (limited to 'admin/panes/quotas.php')
-rw-r--r--admin/panes/quotas.php56
1 files changed, 56 insertions, 0 deletions
diff --git a/admin/panes/quotas.php b/admin/panes/quotas.php
new file mode 100644
index 0000000..91b6899
--- /dev/null
+++ b/admin/panes/quotas.php
@@ -0,0 +1,56 @@
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php";/** @var array $_DATA */ ?>
+
+<style>
+ ::-webkit-scrollbar {
+ width: 5px;
+ }
+
+ ::-webkit-scrollbar-track {
+ border-radius: 9999px;
+ background: transparent;
+ }
+
+ ::-webkit-scrollbar-thumb {
+ border-radius: 9999px;
+ background-color: rgba(136, 136, 136, 0.5);
+ transition: background 200ms;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(85, 85, 85, 0.75);
+ }
+
+ ::-webkit-scrollbar-thumb:active {
+ background-color: #222;
+ }
+
+ .list-group-item {
+ background: #34373c;
+ }
+</style>
+
+<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
+ <h2 style="text-align:center;">Neutron Cloud Quotas</h2>
+
+ <h4 style="text-align:center;">Websites that reached their limit can be locked down</h4>
+
+ <ul class="list-group" style="margin-top:20px;">
+ <?php $index=1;foreach (scandir("/mnt/minteckrolt-cloud") as $site): if (substr($site, 0, 1) === "~"): ?>
+ <li class="list-group-item"><i><?= strip_tags(file_get_contents("/mnt/minteckrolt-cloud/" . $site . "/data/webcontent/sitename")) ?></i> (<a href="https://cloud.minteck.ro.lt/<?= $site ?>" target="_blank"><code><?= $site ?></code></a>, X<?= file_get_contents("/mnt/minteckrolt-cloud/" . $site . "/Tier") ?> Tier)<br><span class="text-muted" id="quota-<?= $index ?>">Calculating...</span><span style="float:right;"><a href="/admin/NeutronManage/?_=<?= $site ?>" target="_blank">Admin Panel</a></span><!--suppress JSUnresolvedVariable, JSUnresolvedFunction, JSUnfilteredForInLoop -->
+ <script>
+ setTimeout(() => {
+ $.ajax("/admin/api/getQuota.php?_=<?= $site ?>", {
+ async: false,
+ success: (data) => {
+ document.getElementById("quota-<?= $index ?>").innerHTML = data;
+ },
+ error: () => {
+ document.getElementById("quota-<?= $index ?>").innerText = "Unable to calculate data usage";
+ }
+ });
+ }, 1000 * <?= $index ?>)
+ </script></li>
+ <?php $index++;endif;endforeach; ?>
+</div>
+
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?> \ No newline at end of file