-
Notifications
You must be signed in to change notification settings - Fork 38
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
927 status API endpoint and UI #941
Conversation
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Currently the UI shows a list of the last values in the table (not formatted properly yet). Issue #927 describes a tooltip that might show the last values, since there is quite some space it might be better to show them in the table directly. I would suggest showing a list of the last values and the timestamps in the table. They could also be in a tooltip. @nhoening Please let me know what your preferred option is. |
I agree it is interesting to show for now. Let's keep it. |
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.
Good start, although I recommend not creating a dedicated REST endpoint.
Review was made on a phone, excuses if I overlooked something.
Signed-off-by: GustaafL <guus@seita.nl>
As discussed with @Flix6x:
I will refactor the code so there is no new endpoint and make a utils function or staticmethod that can be used to query the relevant status data. |
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
… staleness for forecasts Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.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.
Another good step, thanks for the extra testing.
I have to be a stickler about naming and docstrings, though.
And there is also something I would improve about staleness search when thinking about the existence of forecasts in the sensor data.
flexmeasures/api/common/schemas/tests/test_sensor_data_schema.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
…xmeasures into 927-status-page
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.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.
Almost there. Two issues in review next to code.
Also, when I look at the UI, namely the asset page, I miss two things:
- The asset page should also show the status column in the table for its child assets ("All child assets for... ")
- And it should have a button for its own status. There is already a double button at the top left, not sure how an added "Status" button would look there (or move the content to the right). But let's try.
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.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.
Great thanks!
Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.com>
Signed-off-by: Nikolai Rozanov <nickolay.rozanov@gmail.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.
Just noticing that the changelog will need a small fix.
@@ -9,6 +9,8 @@ v0.21.0 | April XX, 2024 | |||
New features | |||
------------- | |||
|
|||
* Add asset/<id>/status page to view asset statuses [see `PR #41 <https://github.com/FlexMeasures/flexmeasures/pull/941/>`_] |
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.
PR #941
Description
API endpoint
sensor/<id>/status
that will give the status of a sensor. This is checked by confirming data has been posted within an expected time before now (for measurements - forecasts & schedules will be treated next).Look & Feel
The new page at http://localhost:5000/assets/ID/status/ is the main contribution. It shows a traffic light (green / red) system to indicate which sensor of the asset has "stale" data.
Buttons to reach this page have been added to the account page and asset page (for the shown asset and also for child assets)
How to test
Go to an account page, an asset page or the assets page and click on the "status" button.
Further Improvements
status_specs
?flex_context
Related Items
Related issue: #927
Flex-context: #1016