Repository navigation
feat: add production-ready Pi-hole & Unbound monitoring dashboard - #31
Conversation
- Adds a responsive, vanilla HTML/JS/CSS dashboard in `dashboard/` - Implements secure API key authentication via `sessionStorage` - Exposes dashboard through `start_suite.py` using FastAPI `StaticFiles` - Integrates frontend assets into `install.sh` deployment - Adds comprehensive mock-based test suite in `tests/test_suite.py` - Implements Unbound configuration health check - Sets up GitHub Actions CI workflow for automated testing - Updates English and German documentation with dashboard details Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1cef18a498
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (allHealthy) { | ||
| updateStatusIndicator('overall-status .status-indicator', 'healthy'); | ||
| updateElementText('overall-status .status-text', 'Alle Kernsysteme gesund'); | ||
| } else { | ||
| updateStatusIndicator('overall-status .status-indicator', 'warning'); | ||
| updateElementText('overall-status .status-text', 'Probleme erkannt'); |
There was a problem hiding this comment.
Target the overall status children without replacing the container
On every refresh, the overall status remains stuck at “Wird geladen...” regardless of whether the services are healthy or failing. Both update helpers use getElementById, so arguments such as overall-status .status-indicator and overall-status .status-text never resolve to elements. Additionally, the loading update replaces the wrapper's system-status class with status-indicator loading, applying the small indicator styling to the entire summary. Target the actual child elements, using dedicated IDs or selector-aware helpers, and preserve the wrapper's class.
Useful? React with 👍 / 👎.
| // Auto-refresh every 30 seconds | ||
| setTimeout(fetchData, 30000); |
There was a problem hiding this comment.
Cancel the refresh loop when the user logs out
After a user logs out, the pending timeout still calls fetchData, sends all six requests with a null API key, and schedules another timeout. Logging in again starts an additional independent refresh loop, so each logout/login cycle permanently increases polling and the associated backend subprocess work. Store and clear the timeout on logout, guard refreshes against an unauthenticated state, and prevent an in-flight refresh from rescheduling after logout.
Useful? React with 👍 / 👎.
- Updated `actions/checkout` to `v4` and `actions/setup-python` to `v5` to avoid Node.js 20 deprecation warnings. - Added `PYTHONPATH=.` before `pytest tests/` in CI workflow so that `start_suite.py` can be discovered and imported. Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
This pull request implements a production-ready, read-only web dashboard to monitor the Pi-hole + Unbound DNS stack, as requested.
Implemented functionality:
Architectural decisions:
dashboarddirectory dynamically onto the existingstart_suite.pyFastAPI app.SUITE_API_KEY. Prompts the user on page load and stores the key insessionStorageso it automatically clears when the tab closes.Security considerations:
localStorage.127.0.0.1locally, matching existing security boundaries.Testing:
tests/test_suite.py) was introduced usingpytestandfastapi.testclient.unittest.mock.patchto simulate subprocess results (e.g.pihole -v,dig,systemctl) without requiring actual system configurations.Known limitations:
Instructions for safely testing on real hardware:
./install.shon the system. It will safely copy the dashboard assets into$STATE_DIR/app/dashboard.sudo systemctl status pihole-suite.service.ssh -L 8090:127.0.0.1:8090 user@your-pihole-host.http://127.0.0.1:8090/.SUITE_API_KEY(from your.envfile) when prompted and verify the UI.PR created automatically by Jules for task 2921188429567859752 started by @TimInTech