diff options
-rw-r--r-- | assets/logo/custom.css | 4 | ||||
-rw-r--r-- | includes/planner.inc | 2 | ||||
-rw-r--r-- | pages/computers.inc | 21 |
3 files changed, 16 insertions, 11 deletions
diff --git a/assets/logo/custom.css b/assets/logo/custom.css index a27d366..76ad1d5 100644 --- a/assets/logo/custom.css +++ b/assets/logo/custom.css @@ -604,8 +604,8 @@ peh-muted { } .card { - background-color: #111; - border: 1px solid rgba(255, 255, 255, .125); + background-color: #111 !important; + border: 1px solid rgba(255, 255, 255, .125) !important; } #member-banner-container > #member-banner > #system-info { diff --git a/includes/planner.inc b/includes/planner.inc index c537d17..225fca4 100644 --- a/includes/planner.inc +++ b/includes/planner.inc @@ -84,7 +84,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis ?> <tr class="planner-day" id="planner-header-<?= $diff ?>" <?php if ($disabled): ?>style="opacity: .75; pointer-events: none;"<?php endif; ?>> - <td colspan="10" contenteditable="true"><?= $display ?></td> + <td colspan="10"><?= $display ?></td> <?php if (!isset($cloudburst[date('Y-m-d', time() + (86400 * $diff))])) $cloudburst[date('Y-m-d', time() + (86400 * $diff))] = []; diff --git a/pages/computers.inc b/pages/computers.inc index 6880d48..1541fa6 100644 --- a/pages/computers.inc +++ b/pages/computers.inc @@ -136,7 +136,7 @@ if (count($parts) === 2 || count($parts) === 3) { <td style="padding-right: 10px; text-align: right;"><b>Graphics processor<?= count($computer["gpu"]["controllers"]) > 1 ? "s" : "" ?>:</b></td> <td> <?php $index = 0; foreach ($computer["gpu"]["controllers"] as $controller): ?> - <?= $controller["bus"] ?> <?= $controller["model"] ?> (<?= $controller["cores"] ?> cores, <?= $controller["vramDynamic"] ? "dynamic graphics memory" : $controller["vram"] . " MiB" ?>) + <?= $controller["bus"] ?> <?= $controller["model"] ?> (<?php if (isset($controller["cores"])): ?><?= $controller["cores"] ?> cores, <?php endif; ?><?= $controller["vramDynamic"] ? "dynamic graphics memory" : $controller["vram"] . " MiB" ?>) <?= $index < count($computer["gpu"]["controllers"]) - 1 ? "<br>" : "" ?> <?php $index++; endforeach; ?> </td> @@ -170,7 +170,7 @@ if (count($parts) === 2 || count($parts) === 3) { <td style="padding-right: 10px; text-align: right;"><b>RAM chips:</b></td> <td> <?php $index = 0; foreach ($computer["ram_chips"] as $chip): ?> - <?= $chip["manufacturer"] ?> <?= round($chip["size"] / 1024**2, 2) ?> MiB <?= $chip["type"] ?> + <?php if (isset($chip["manufacturer"])): ?><?= $chip["manufacturer"] ?> <?php endif; ?><?= round($chip["size"] / 1024**2, 2) ?> MiB <?= $chip["type"] ?> <?= $index < count($computer["ram_chips"]) - 1 ? "<br>" : "" ?> <?php $index++; endforeach; ?> </td> @@ -194,7 +194,7 @@ if (count($parts) === 2 || count($parts) === 3) { </tr> <tr> <td style="padding-right: 10px; text-align: right;"><b>Remaining capacity:</b></td> - <td><?= $computer["battery"]["currentCapacity"] ?>/<?= $computer["battery"]["maxCapacity"] ?> <?= $computer["battery"]["capacityUnit"] ?> (designed for <?= $computer["battery"]["designedCapacity"] ?> <?= $computer["battery"]["capacityUnit"] ?>, <?= round(($computer["battery"]["maxCapacity"] / $computer["battery"]["designedCapacity"]) * 100, 2) ?>% left)</td> + <td><?= $computer["battery"]["currentCapacity"] ?>/<?= $computer["battery"]["maxCapacity"] ?> <?= $computer["battery"]["capacityUnit"] ?> (designed for <?= $computer["battery"]["designedCapacity"] ?> <?= $computer["battery"]["capacityUnit"] ?><?php if ($computer["battery"]["designedCapacity"] > 0): ?>, <?= round(($computer["battery"]["maxCapacity"] / $computer["battery"]["designedCapacity"]) * 100, 2) ?>% left<?php endif; ?>)</td> </tr> <?php else: ?><tr><td colspan="2">This computer does not contain a battery.</td></tr><?php endif; ?> @@ -321,7 +321,7 @@ if (count($parts) === 2 || count($parts) === 3) { <td><?= str_replace("�", "", $user["command"]) ?></td> <td><?= $user["user"] ?></td> <td><?= $user["date"] . " " . $user["time"] ?></td> - <td><?= trim($user["ip"]) === "" ? "Local" : "Remote (" . $user["ip"] . ")" ?></td> + <td><?= trim($user["ip"]) === "" || trim($user["ip"]) === ":1" || trim($user["ip"]) === "::1" ? "Local" : "Remote (" . $user["ip"] . ")" ?></td> </tr> <?php endforeach; ?> </tbody> @@ -438,7 +438,7 @@ if (count($parts) === 2 || count($parts) === 3) { <td><?= trim($iface["ip4"] !== "") ? $iface["ip4"] : "" ?><?= trim($iface["ip6"] !== "") ? (trim($iface["ip4"] !== "") ? ", " : "") . $iface["ip6"] : "" ?></td> <td><?= trim($iface["mac"] !== "") ? $iface["mac"] : "" ?></td> <td><?= $iface["type"] === "wireless" ? "Wireless" : "Wired" ?></td> - <td><?= $iface["internal"] ? "Yes" : "" ?></td> + <td><?= isset($iface["internal"]) && $iface["internal"] ? "Yes" : "" ?></td> <td><?= $iface["virtual"] ? "Yes" : "" ?></td> <td><?= $iface["dhcp"] ? "Yes" : "" ?></td> </tr> @@ -526,8 +526,8 @@ if (count($parts) === 2 || count($parts) === 3) { <tr> <th scope="row"><?= $process["pid"] ?></th> <td><?= $process["name"] ?></td> - <td><?= $process["cpu"] ?>%</td> - <td><?= $process["ram"] ?>%</td> + <td><?= round($process["cpu"], 2) ?>%</td> + <td><?= round($process["ram"], 2) ?>%</td> <td><?= $process["user"] ?></td> <td><?= timeAgo($process["date"]) ?></td> </tr> @@ -781,6 +781,11 @@ if (count($parts) === 2 || count($parts) === 3) { <h2>Computers</h2> <p>Click on a computer to view information about it (open windows, installed apps, ...).</p> + <div class="alert alert-danger"> + <b>Luna is not for production.</b> The Luna program version 1.0.0 is considered malware and must not be used on any computer other than a development machine. + </div> + + <!-- <ul class="list-group"> <?php foreach (array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/computers/metadata"), function ($i) { return !str_starts_with($i, "."); @@ -798,7 +803,7 @@ if (count($parts) === 2 || count($parts) === 3) { </div> </a> <?php endforeach; ?> - </ul> + </ul>--> </div> <?php endif; ?> </div> |