-
Notifications
You must be signed in to change notification settings - Fork 1
/
logs.php
36 lines (35 loc) · 896 Bytes
/
logs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
session_start();
include "util.php";
checkAuth();
$envs = getEnvVars();
?>
<?php include "header.php"; ?>
<?php include "sidebar.php"; ?>
<div class="sidebar-content">
<div class="app-card">
<div class="logo-container">
<img src="./images/reactivesearch-logo.png" width="150" alt="logo"/>
</div>
<h2 class="centered-text">ReactiveSearch API Logs</h2>
<div class="icon">
<i onclick="reloadLogsContent()" style="font-size:24px" class="fa"></i>
</div>
<div id="logs" class="logs-content">
</div>
</div>
</div>
<script>
async function reloadLogsContent() {
const res = await fetch('log-command.php');
const html = await res.text();
const logContainer = document.getElementById('logs');
if (logContainer) {
logContainer.innerHTML = html;
}
}
reloadLogsContent();
setInterval(function(){
reloadLogsContent();
}, 5000);
</script>