Enhancement: support 'nice name' for beszel system ID (#4495)

pull/4502/head
shamoon 2 months ago committed by GitHub
parent fd05ae377c
commit f717e59085
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save