aboutsummaryrefslogtreecommitdiff
path: root/admin/panes/uptime.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/panes/uptime.php')
-rw-r--r--admin/panes/uptime.php76
1 files changed, 0 insertions, 76 deletions
diff --git a/admin/panes/uptime.php b/admin/panes/uptime.php
deleted file mode 100644
index 199df52..0000000
--- a/admin/panes/uptime.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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;"><?= l("The server has been running for", "Le serveur est en fonctionnement depuis") ?></h2>
-
- <h4 style="text-align:center;" id="uptime">---</h4>
- <!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
- <script>
- setInterval(() => {
- $.ajax("/admin/api/serverTime.php", {
- success: (data) => {
- document.getElementById("uptime").innerText = data;
- }
- });
- }, 500)
- </script>
-
- <ul class="list-group" style="margin-top:20px;">
- <li class="list-group-item">
- <b><?php
-
- exec("journalctl --disk-usage", $ret);
- $data = trim(implode("\n", $ret));
-
- $val = explode(" ", $data)[6];
- echo($val);
-
- ?></b> <?= l("of data has been collected to ensure easy system maintenance and audit", "de données ont été recueillies pour faciliter la maintenance du système et les audits de sécurité") ?>
- </li>
- <li class="list-group-item" id="logsummary">
- <?= l("Calculating...", "Calcul en cours...") ?>
- </li>
- <!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
- <script>
- $.ajax("/admin/api/serverLogSummary.php", {
- success: (data) => {
- document.getElementById("logsummary").innerHTML = data;
- },
- error: () => {
- document.getElementById("logsummary").innerText = "<?= l("An error occurred while loading this content, perhaps you don't have permission to access it", "Une erreur s'est produite lors du chargement de ce contenu, peut-être que vous n'avez pas la permission d'y accéder") ?>";
- }
- });
- </script>
- </ul>
-</div>
-
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?> \ No newline at end of file