-
Notifications
You must be signed in to change notification settings - Fork 3
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): add non compatibles platforms #883
Conversation
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.
Seems to be working well but I made some comments in the code
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.
We have cases where the same compatible can have mulitple platforms (this does not matter the other way around since environment_compatible
has priority over platform
when creating a hardware details page). One example is amlogic,a311d (localhost). Shouldn't we account for this case? Maybe add a tooltip in the hardware listing page to show all of them or even just adding all of them to the cell with something like platforms.map(platform => <span>{platform}<br /></span>
(in this case the backend should return all platforms in the response)
One other option would be to leave it like it is now and discuss this in the mid sprint meeting
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.
If we want to keep both tree and hardware listing consistent, the search filter in hardware listing should also filter the platforms column (like we can filter by commits in the tree listing for example)
d3920cd
to
6084a49
Compare
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.
LGTM, nice work
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.
Well done!
# documentation purposes. This model is not used in the code. | ||
# TODO Remove timestamp from the api and this model | ||
class HardwareQueryParamsDocumentationOnly(BaseModel): | ||
origin: str = Field(default=DEFAULT_ORIGIN) |
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.
nit: I believe there's no need for Field(default=DEFAULT_ORIGIN)
here. Only this should be sufficient
origin: str = Field(default=DEFAULT_ORIGIN) | |
origin: str = DEFAULT_ORIGIN |
|
||
|
||
class HardwareQueryParams(BaseModel): | ||
origin: str = Field(default=DEFAULT_ORIGIN) |
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.
ditto about Field
query_params = HardwareQueryParams( | ||
start_date=request.GET.get("startTimestampInSeconds"), | ||
end_date=request.GET.get("endTimeStampInSeconds"), | ||
origin=request.GET.get("origin"), |
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.
That's nice to see!
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.
NIce job!!
6084a49
to
11d95f3
Compare
- List hardware that is not an environment_compatible but has platform - Introduced `platform` field in `HardwareItem` TypedDict in `hardwareView.py`. - Updated `_make_hardware_item` method to include `platform`. - Modified `_get_results` method to process `platform` field. - Added `platform` field to the frontend components: - `HardwareListingPage.tsx` - `HardwareTable.tsx` - `messages/index.ts` - `types/hardware.ts` Closes #867
11d95f3
to
80afbc2
Compare
Description
List hardware that is not an environment_compatible but has platform
Add platform column to the hardware listing
Add swagger documentation
Closes Add platforms as option for hardware listing #867 hardware view #887
How to test
Go to the hardware listing page and try to enter in a hardware details page that has the same repeat the process.