mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 00:10:57 +00:00 
			
		
		
		
	Enhancement: support netalertX token for password-protected instances (#4122)
This commit is contained in:
		
							parent
							
								
									20048ff567
								
							
						
					
					
						commit
						db1fb4b899
					
				@ -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
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@ -41,6 +41,7 @@ export default async function credentialedProxyHandler(req, res, map) {
 | 
			
		||||
          "ghostfolio",
 | 
			
		||||
          "linkwarden",
 | 
			
		||||
          "mealie",
 | 
			
		||||
          "netalertx",
 | 
			
		||||
          "tailscale",
 | 
			
		||||
          "tandoor",
 | 
			
		||||
          "pterodactyl",
 | 
			
		||||
 | 
			
		||||
@ -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: {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user