aboutsummaryrefslogtreecommitdiff
path: root/admin/panes/uptime.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/uptime.php
parent87303b0d3540037fb94efdde24dbaacb2880d6cb (diff)
downloadmain-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.gz
main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.bz2
main-95112b1eb06a4be531ded59563d53a63a8d614e8.zip
Opening!
Diffstat (limited to 'admin/panes/uptime.php')
-rw-r--r--admin/panes/uptime.php172
1 files changed, 86 insertions, 86 deletions
diff --git a/admin/panes/uptime.php b/admin/panes/uptime.php
index 71a6545..bc2a43e 100644
--- a/admin/panes/uptime.php
+++ b/admin/panes/uptime.php
@@ -1,87 +1,87 @@
-<?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;">The server has been running for</h2>
-
- <h4 style="text-align:center;" id="uptime"><?php
-
- $str = @file_get_contents('/proc/uptime');
- $num = floatval($str);
- $secs = fmod($num, 60); $num = intdiv($num, 60);
- $mins = $num % 60; $num = intdiv($num, 60);
- $hours = $num % 24; $num = intdiv($num, 24);
- $days = $num;
-
- echo($days . " day·s, " . $hours . " hour·s, " . $mins . " minute·s, " . ceil($secs) . " second·s")
-
- ?></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> of data has been collected to ensure easy system maintenance and audit
- </li>
- <li class="list-group-item" id="logsummary">
- Calculating...
- </li>
- <!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
- <script>
- $.ajax("/admin/api/serverLogSummary.php", {
- success: (data) => {
- document.getElementById("logsummary").innerHTML = data;
- },
- error: () => {
- document.getElementById("logsummary").innerText = "An error occurred while loading this content";
- }
- });
- </script>
- </ul>
-</div>
-
+<?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;">The server has been running for</h2>
+
+ <h4 style="text-align:center;" id="uptime"><?php
+
+ $str = @file_get_contents('/proc/uptime');
+ $num = floatval($str);
+ $secs = fmod($num, 60); $num = intdiv($num, 60);
+ $mins = $num % 60; $num = intdiv($num, 60);
+ $hours = $num % 24; $num = intdiv($num, 24);
+ $days = $num;
+
+ echo($days . " day·s, " . $hours . " hour·s, " . $mins . " minute·s, " . ceil($secs) . " second·s")
+
+ ?></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> of data has been collected to ensure easy system maintenance and audit
+ </li>
+ <li class="list-group-item" id="logsummary">
+ Calculating...
+ </li>
+ <!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
+ <script>
+ $.ajax("/admin/api/serverLogSummary.php", {
+ success: (data) => {
+ document.getElementById("logsummary").innerHTML = data;
+ },
+ error: () => {
+ document.getElementById("logsummary").innerText = "An error occurred while loading this content";
+ }
+ });
+ </script>
+ </ul>
+</div>
+
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?> \ No newline at end of file