The test() method was using appTest() which only checked HTTP status codes,
causing false "Invalid credentials" errors even when credentials were valid.
This fix aligns the test() method with the working livestats() approach.
Changes:
- Use execute() directly with explicit POST method (same as livestats)
- Handle HTTP 400 errors for self-hosted controller auth failures
- Handle HTTP 401/403 errors for UDM auth failures
- Validate self-hosted response body (meta.rc === "ok")
- Verify login by fetching stats to confirm session is valid
- Provide descriptive error messages for different failure scenarios
Fixes#640, #695, #811
The livestats.blade.php view requires variables like $vm_running,
$cpu_percent, etc. When returning "inactive" status, we were passing
an empty array which caused undefined variable errors.
Now passing $inactiveData with default zero values so the view
renders properly even when the API is unreachable or returns no data.
The livestats() method would crash with a 500 error when:
- API calls returned null (connection failures, permission issues)
- Node status/VM/container data was missing expected properties
- Division by zero when no valid nodes were found
Changes:
- Add null check in apiCall() before calling getBody()
- Check nodeData for null before array_map()
- Add null checks for node_status, vm_stats, and container_stats
- Track valid_nodes count to prevent division by zero
- Use null coalescing for optional properties (cpu, memory)
- Return "inactive" status gracefully instead of crashing
Fixeslinuxserver/Heimdall#1533
Implement the EnhancedApps interface for Technitium DNS to display
queries blocked and percentage blocked stats on the dashboard tile.
- Add test() method for API connection validation
- Add livestats() method to fetch stats from /api/dashboard/stats/get
- Add config.blade.php for API token configuration
- Add livestats.blade.php for stats display template
- Set enhanced: true in app.json
Closeslinuxserver/Heimdall#1531
numbers of total and running containers and VMs are displayed nicer when using a dark background.
I don't see any benefit of using the span tags on values.
* feat(Tachidesk): add livestats and config support for Tachidesk app
Implement livestats functionality to display active series and unread chapters
Add config page with URL override and category selection
Update app description and enable enhanced features
* Fixed tachidesk logo size
* refactor: remove unused Log import and debug statement
---------
Co-authored-by: Lucas Araujo <lucas.ribeiro.de.araujo@rabobank.nl>
* feat: add MySpeed app integration with live stats and config
- Implement MySpeed app with live statistics display for download/upload speeds
- Add configuration page with URL override option
- Include app icon and metadata in app.json
* style: format constructor with consistent spacing
* refactor: remove empty line in MySpeed constructor
---------
Co-authored-by: Lucas Araujo <lucas.ribeiro.de.araujo@rabobank.nl>
* feat(Audiobookshelf): enhance stats display and add book count
- Rename "Total Playtime" to "Playtime" for brevity
- Add book count to stats display
- Simplify time format by removing seconds
- Clean up constructor and unused code
- Update API endpoint for testing
* style: fix constructor formatting in Audiobookshelf class
* refactor: rename methods and variables to follow camelCase convention
---------
Co-authored-by: Lucas Araujo <lucas.ribeiro.de.araujo@rabobank.nl>
* feat(Memos): add livestats and config support for Memos app
Implement livestats functionality to display memo count and add config support for API access. Enable enhanced app features in app.json.
* style(Memos): improve code formatting and readability
* style: remove empty line in Memos constructor
---------
Co-authored-by: Lucas Araujo <lucas.ribeiro.de.araujo@rabobank.nl>
* feat: add Readeck integration with live stats and config
Add support for Readeck application including live stats display for bookmarks count and configuration options for API key and URL override
* style: fix constructor formatting in Readeck class
* refactor: remove empty constructor from Readeck class
---------
Co-authored-by: Lucas Araujo <lucas.ribeiro.de.araujo@rabobank.nl>