-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add binary chart #2094
base: master
Are you sure you want to change the base?
Add binary chart #2094
Conversation
#2661 Bundle Size — 10.19MiB (+0.13%).
Warning Bundle contains 3 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch Terdious:add-binary-chart Project dashboard |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2094 +/- ##
=======================================
Coverage 98.41% 98.41%
=======================================
Files 865 865
Lines 14169 14169
=======================================
Hits 13945 13945
Misses 224 224 ☔ View full report in Codecov by Sentry. |
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.
I created a device with 2 states in DB: opened at 3:32 in the morning, then closed at 7:32 in the morning :
Then, I open Gladys and create a binary chart for this device :
When I display the dashboard, the UI completely freezes and uses 100% CPU. I'm unable to do anything on the UI.
IMO there is something in the front that loops too much and blocks the JS
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.
Hey @Terdious ! Thanks for the changes :)
I have a few bugs when trying it:
- Text is inside the "bar" :
- I get a freeze when saving the dashboard with a binary chart on a power plug
Here is the error :
The payload :
- If I select a binary device, then unselect it, then select a non-binary device, I get a weird state where the chart type is unknown :
Before:
After :
- When I'm using Gladys in English, the text inside the popup is in french:
- On mobile, the popup is outside of the screen :
Thanks for this PR 🙂
…inary device, get a weird state where the chart type is unknown
I'm sorry but I tried to reproduce and despite zooming in / out changing resolution, etc. I never managed to get your result. On the other hand, before my previous modification I had the same problem, but I corrected it before your review
I added a
Corrected
Corrected
Corrected. Display top left box |
@Terdious Thanks for the fixes! Here is the payload that causes the freeze:
The response is 422 :
It's just because I didn't select the "chart type" ^^ It's maybe not related to this PR, but I wonder if we could make a fix to avoid freezing in this situation... I have another feedback, now the date in english is not correct: |
Pull Request check-list
To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:
npm test
on both front)npm run eslint
on both front)npm run prettier
on both front)npm run compare-translations
on front)front/src/config/demo.js
) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
Description of change
Taken from the original PR: #Binary graph #1948
Thanks to @callemand for all the work done