Skip to content

Commit

Permalink
Enhancement: support netalertX token for password-protected instances (
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon authored Oct 12, 2024
1 parent 20048ff commit db1fb4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/widgets/services/netalertx.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ _Note that the project was renamed from PiAlert to NetAlertX._

Allowed fields: `["total", "connected", "new_devices", "down_alerts"]`.

If you have enabled a password on your NetAlertX instance, you will need to provide the `SYNC_api_token` as the `key` in your config.

```yaml
widget:
type: netalertx
url: http://ip:port
key: netalertxsyncapitoken # optional, only if password is enabled
```
1 change: 1 addition & 0 deletions src/utils/proxy/handlers/credentialed.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default async function credentialedProxyHandler(req, res, map) {
"ghostfolio",
"linkwarden",
"mealie",
"netalertx",
"tailscale",
"tandoor",
"pterodactyl",
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/netalertx/widget.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import genericProxyHandler from "utils/proxy/handlers/generic";
import credentialedProxyHandler from "utils/proxy/handlers/credentialed";

const widget = {
api: "{url}/php/server/devices.php?action=getDevicesTotals",
proxyHandler: genericProxyHandler,
proxyHandler: credentialedProxyHandler,

mappings: {
data: {
Expand Down

0 comments on commit db1fb4b

Please sign in to comment.