Skip to content
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

feat/hardware listing backend #492

Merged
merged 4 commits into from
Nov 4, 2024
Merged

Commits on Nov 4, 2024

  1. feat(requests): add hardware listing httpie tests

    Added two new scripts for hardware listing:
    - hardware-listing-fast.sh for fast mode
    - hardware-listing-slow.sh for slow mode
    
    These scripts make HTTP requests to the hardware API endpoint with
    different modes.
    
    Part of #445
    WilsonNet committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    dc68fa1 View commit details
    Browse the repository at this point in the history
  2. feat(urls): add hardware endpoint

    - Added a new URL pattern for the hardware endpoint in `urls.py`.
    - Created `HardwareView` in `views/hardwareView.py` to handle hardware data.
    - Implemented `__getSlowResult` and `__getFastResult` methods to fetch hardware
      data based on the mode.
    - Added error handling for invalid `daysInterval` and `mode` parameters.
    
    Closes #445
    WilsonNet committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    d61431b View commit details
    Browse the repository at this point in the history
  3. feat(helpers): add build status map and interval parser

    - Added build_status_map to map build status to string values.
    - Implemented parseIntervalInDaysGetParameter to parse and validate
      intervalInDays parameter.
    - Created ExceptionWithJsonResponse class to handle exceptions with
      JSON responses.
    
    Part of #445
    WilsonNet committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    b1540e2 View commit details
    Browse the repository at this point in the history
  4. feat: update interval parameter handling in views

    - Replaced `daysInterval` with `intervalInDays` in `hardwareDetailsView.py`
      and `treeView.py`.
    - Updated import statements to include `parseIntervalInDaysGetParameter` and
      `ExceptionWithJsonResponse`.
    - Modified `hardware.sh` to use the new `intervalInDays` parameter.
    - Adjusted error handling to use `ExceptionWithJsonResponse` for better
      consistency.
    WilsonNet committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    9b40060 View commit details
    Browse the repository at this point in the history