#339-Big-card-for-all-temperature-sensors #385
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#339-Big-card-for-all-temperature-sensors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue #339
Added function to retrieve all sensors in tempService
Added TemperatureAllView.js
Added useTemperatureAll.js
Added TemperatureAllView to the dropdown in Dashboard.js
Waiting for c24elipe to review
Small problems regarding formatting in service/tempService/Program.cs.
Formal review comes later, can't do one now
Review on #385
Tested on CahyOS & Linux Mint using Firefox
ERRORS: An error that was found was in relation to a 505 error when trying to fetch the data from the back-end. However, this issue was found to be the result of running this application with the Brave browser or some ad-blocking plugins on Firefox. Once fixed, all such errors disappeared.
Tested: This application was tested by first running it normally and seeing that all Docker containers start as they should. After they were found to indeed work correctly, the Firefox browser was opened to the frontend container, and from the dropdown, the relevant "TemperatureAllView" was added correctly. I also then tried to format the relevant files using Prettier and noted the file changes using git. (red being the current version)
Inspected the following files
OBS: No new dependencies from outside of this repo were found or added.
frontend/src/features/temperature/TemperatureAllView.js
The indentation and style standards are almost completely followed by the Prettier-enforced formatting. The only formatting not allowed was around the import of "useTemperatureAll" at the top of the file.
The Naming convention was followed.
No comments are present. But I, as the review belive that the code is self-documenting enough to get away with it.
The code quality is acceptable. Not too hard to understand, and it does what it needs to.
A general issue I found with all Temperature components was that they include CSS in their JS files, but since all others do it, and it seems to be the standard, I deem it okay.
frontend/src/components/Dashboard/Dashboard.js:
Since this is such a small change, with no formatting errors, that seems to be copied and pasted from other code, is that all I will write on the matter?
frontend/src/features/temperature/useTemperatureAll.js:
service/tempService/Program.cs:
A new endpoint was added here from lines 78->107.
The indentation and style standard is again almost correct. The first error shown is that the whole function mapping is a little weirdly formatted. The main offender is "app.MapGet", that is for more space to the right than it should be to follow the standards set.

Besides, were there errors, no other style standard blunders were found.
To follow the Naming convention, the variable "sql" (found on line 81) is named incorrectly all over the file. The correct name should be "Sql" or "SQL" ( depending on preference ) due to the code standard stating "- Use PascalCase for constant names, both fields and local constants."
The code quality is good, adequate, and is on par with the rest of the file.
Comments are placed correctly and only where they are needed, on more complex logic.
What needs to be done
What needs to be done is a simple formatting on all relevant files, and if the "sql" naming convention is deemed to be correct, then a small refactor of the variable in service/tempService/Program.cs needs to be refactored.
Conclusion
Besides small flaws, this code looks good, and if fixed, can be merged.
Thank you for the review!
I think I have fixed the formatting issues and also the naming convention of sql -> Sql.
Also the reason for some code being copied in "Since this is such a small change, with no formatting errors, that seems to be copied and pasted from other code, is that all I will write on the matter?" was because I had to redo the branch and so I copied all my code and pasted it in, that was maybe also the reason why the indentation was wrong in some areas.
I have rechecked, and all flaws found are now fixed.
Conflict has been resolved and been merged into team_2_week_2. PR can be closed.
a24danwe referenced this pull request2026-04-27 07:44:30 +00:00
Pull request closed