aboutsummaryrefslogtreecommitdiff
path: root/admin/panes/hardware.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/panes/hardware.php')
-rw-r--r--admin/panes/hardware.php76
1 files changed, 76 insertions, 0 deletions
diff --git a/admin/panes/hardware.php b/admin/panes/hardware.php
new file mode 100644
index 0000000..05c839f
--- /dev/null
+++ b/admin/panes/hardware.php
@@ -0,0 +1,76 @@
+<?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><?php
+
+function command($command) {
+ $data = [];
+ exec($command, $data);
+ return implode("\n", $data);
+}
+
+?>
+
+<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
+ <h2 style="text-align:center;">Hardware Information</h2>
+ <ul class="list-group">
+ <li class="list-group-item">
+ <details>
+ <summary>General system information</summary>
+ <iframe src="/admin/panes/hardware.lshw.php" style="border:none;width:100%;height:100vh;"></iframe>
+ </details>
+ </li>
+ <li class="list-group-item">
+ <details>
+ <summary>Attached PCI devices</summary>
+ <pre style="background:#111;color:white;border-radius:5px;padding: 10px;"><?= command("lspci") ?></pre>
+ </details>
+ </li>
+ <li class="list-group-item">
+ <details>
+ <summary>Attached USB devices</summary>
+ <pre style="background:#111;color:white;border-radius:5px;padding: 10px;"><?= command("lsusb -t") ?></pre>
+ </details>
+ </li>
+ <li class="list-group-item">
+ <details>
+ <summary>Attached processors</summary>
+ <pre style="background:#111;color:white;border-radius:5px;padding: 10px;"><?= command("lscpu") ?></pre>
+ </details>
+ </li>
+ <li class="list-group-item">
+ <details>
+ <summary>Loaded kernel modules</summary>
+ <pre style="background:#111;color:white;border-radius:5px;padding: 10px;"><?= command("lsmod") ?></pre>
+ </details>
+ </li>
+ </ul>
+</div>
+
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?> \ No newline at end of file