-
Couldn't load subscription status.
- Fork 1
25 add log file output to api and web UI system status page #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
25 add log file output to api and web UI system status page #111
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… transition from adding hours/minutes uistates.
…check' into 102-api-slow-response-error-fires-when-it-shouldnt
…check' into 101-view-and-control-space-state-check-period-on-web-ui-via-api
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…oll time for space state poll time field to 5 seconds.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…justed. Also add the ability to safely restart the task using the previous period if the poller was temporarily stopped.
…o 101-view-and-control-space-state-check-period-on-web-ui-via-api
…-via-api' into 105-web-ui-header-is-cluttered-text
…o 101-view-and-control-space-state-check-period-on-web-ui-via-api
…-via-api' into 105-web-ui-header-is-cluttered-text
… not disable the poller.
…o 101-view-and-control-space-state-check-period-on-web-ui-via-api
…-via-api' into 105-web-ui-header-is-cluttered-text
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds log file output capability to the API and displays it on a new web UI system status page. It also introduces a configuration management page for controlling the space state polling period dynamically.
Key changes:
- Added
/api/logs/readendpoint to retrieve log file contents - Created new Configuration page with poll period management UI
- Enhanced System Status page with logs viewer panel
- Renamed
SPACE_STATE_POLL_FREQUENCY_StoSPACE_STATE_POLL_PERIOD_Sthroughout codebase
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/smibhid_http/www/system.html | Added logs panel with refresh functionality to display log contents |
| src/smibhid_http/www/js/system.js | Implemented refreshLogs() function to fetch and display logs via API |
| src/smibhid_http/www/configuration.html | New page for configuration management with poll period controls |
| src/smibhid_http/www/js/configuration.js | Complete configuration page logic including validation and API calls |
| src/smibhid_http/www/css/style.css | Added styles for logs panel and restructured panel headers |
| src/smibhid_http/www/css/configuration.css | Comprehensive styling for configuration page components |
| src/smibhid_http/website.py | Added routes for configuration page, CSS/JS files, and API endpoints |
| src/lib/ulogging.py | Added read_logs() method to File class for reading log contents |
| src/lib/space_state.py | Refactored poll period logic into get/set methods with dynamic control |
| src/lib/config/config_template.py | Renamed poll frequency constant to poll period |
| src/config.py | Applied config constant rename |
| README.md | Updated documentation to reflect configuration UI feature |
| Multiple HTML files | Updated navigation links and added panel header wrappers consistently |
Comments suppressed due to low confidence (1)
src/lib/ulogging.py:1
- The API returns log contents wrapped in a JSON object with key 'log', but the JavaScript in system.js extracts it with
response.text()instead ofresponse.json(). This inconsistency means the client receives the JSON-serialized string (including quotes and escaped characters) rather than the actual log content. Either return plain text from the API or useresponse.json()in the JavaScript.
from gc import mem_free
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.