mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Enhancement: support 'nice name' for beszel system ID (#4495)
This commit is contained in:
parent
fd05ae377c
commit
f717e59085
@ -7,7 +7,7 @@ Learn more about [Beszel](https://github.com/henrygd/beszel)
|
||||
|
||||
The widget has two modes, a single system with detailed info if `systemId` is provided, or an overview of all systems if `systemId` is not provided.
|
||||
|
||||
The `systemID` in the `id` field on the collections page of Beszel.
|
||||
The `systemID` is the `id` field on the collections page of Beszel under the PocketBase admin panel. You can also use the 'nice name' from the Beszel UI.
|
||||
|
||||
Allowed fields for 'overview' mode: `["systems", "up"]`
|
||||
Allowed fields for a single system: `["name", "status", "updated", "cpu", "memory", "disk", "network"]`
|
||||
|
@ -26,7 +26,7 @@ export default function Component({ service }) {
|
||||
if (systems && !systems.items) {
|
||||
finalError = { message: "No items returned from beszel API" };
|
||||
} else if (systems && systems.items && systemId) {
|
||||
system = systems.items.find((item) => item.id === systemId);
|
||||
system = systems.items.find((item) => item.id === systemId || item.name === systemId);
|
||||
if (!system) {
|
||||
finalError = { message: `System with id ${systemId} not found` };
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user