diff options
Diffstat (limited to 'pages/computers.inc')
-rw-r--r-- | pages/computers.inc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/pages/computers.inc b/pages/computers.inc index b711c32..643fe87 100644 --- a/pages/computers.inc +++ b/pages/computers.inc @@ -36,11 +36,11 @@ if (count($parts) === 2 || count($parts) === 3) { array_unshift($parts, null); } -if (str_ends_with($computer["os"], "unknown")) { +if (isset($computer["os"]) && str_ends_with($computer["os"], "unknown")) { $computer["os"] = trim(substr($computer["os"], 0, -7)); } -if (str_ends_with($computer["os"], "rolling")) { +if (isset($computer["os"]) && str_ends_with($computer["os"], "rolling")) { $computer["os"] = trim(substr($computer["os"], 0, -7)); } @@ -194,7 +194,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; </tr> <tr> <td style="padding-right: 10px; text-align: right;"><b>Main processor:</b></td> - <td><?= trim($computer["cpu"]["manufacturer"] . " " . $computer["cpu"]["brand"] . " " . $computer["cpu"]["model"]) ?> (<?= $computer["cpu"]["speed"] ?> GHz)</td> + <td><?= trim(($computer["cpu"]["manufacturer"] ?? "") . " " . ($computer["cpu"]["brand"] ?? "") . " " . ($computer["cpu"]["model"] ?? "")) ?> (<?= $computer["cpu"]["speed"] ?? "" ?> GHz)</td> </tr> <tr> <td style="padding-right: 10px; text-align: right;"><b>Processor threading:</b></td> @@ -307,7 +307,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; <td style="padding-right: 10px; text-align: right;"><b>Kernel version:</b></td> <td><?= $computer["os_info"]["kernel"] ?></td> </tr> - <?php if ($computer["os_info"]["codepage"]): ?> + <?php if (isset($computer["os_info"]["codepage"])): ?> <tr> <td style="padding-right: 10px; text-align: right;"><b>Code page:</b></td> <td><?= $computer["os_info"]["codepage"] ?></td> @@ -601,7 +601,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; <tr> <th scope="row"><?= $process["pid"] ?></th> <td><?= $process["name"] ?></td> - <td><?= round($process["cpu"], 2) ?>%</td> + <td><?= round($process["cpu"] ?? 0, 2) ?>%</td> <td><?= round($process["ram"], 2) ?>%</td> <td><?= $process["user"] ?></td> <td><?= isset($process["date"]) ? timeAgo($process["date"]) : "" ?></td> @@ -896,6 +896,10 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; <h2>Devices</h2> <p>Click on a device to view information about it</p> + <div class="alert alert-warning"> + <b>Luna and the Cold Haze Devices software are deprecated.</b> These applications are now deprecated and monitoring devices through Luna is not supported anymore. Basic support and servers will be shut down in August 2023. + </div> + <ul class="list-group"> <?php |