Skip to content

Conversation

@sjefferson99
Copy link
Member

No description provided.

sjefferson99 and others added 30 commits October 19, 2025 16:48
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
…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>
@sjefferson99 sjefferson99 self-assigned this Oct 21, 2025
@sjefferson99 sjefferson99 linked an issue Oct 21, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a 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/read endpoint 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_S to SPACE_STATE_POLL_PERIOD_S throughout 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 of response.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 use response.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add log file output to api and web UI system status page

1 participant