forked from joshplant/Codiad-System-Information
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdialog.php
More file actions
executable file
·61 lines (47 loc) · 1.3 KB
/
dialog.php
File metadata and controls
executable file
·61 lines (47 loc) · 1.3 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
$hostname = exec("hostname");
$uptime = substr(exec("uptime -p"), 3);
?>
<script>
var killed = false;
$(document).ready(function() {
$("#close-handle").attr("onclick","codiad.modal.unload(); killed = true; return false;");
killed = false;
poll();
});
</script>
<h2 style="font-size:20px;">System Information</h2>
<br>
<p>Hostname: <strong><?php echo $hostname; ?></strong></p>
<br>
<table width="600px">
<tr>
<td>CPU Usage:</td>
<td id="cpuUsage"></td>
<td>
<span style="border:1px solid gray;border-radius:3px;width:150px;display:block;">
<span style="background-color:white;border-radius:3px;display:block;" id="cpuBar"> </span>
</span>
</td>
</tr>
<tr>
<td>Memory Usage:</td>
<td id="memoryUsage"></td>
<td>
<span style="border:1px solid gray;border-radius:3px;width:150px;display:block;">
<span style="background-color:white;border-radius:3px;display:block;" id="memoryBar"> </span>
</span>
</td>
</tr>
<tr
> <td>Used Disk Space:</td>
<td id="diskUsage"></td>
<td>
<span style="border:1px solid gray;border-radius:3px;width:150px;display:block;">
<span style="background-color:white;border-radius:3px;display:block;" id="diskBar"> </span>
</span>
</td>
</tr>
</table>
<br>
<p>System has been up for <?php echo $uptime; ?>.</p>