-
Notifications
You must be signed in to change notification settings - Fork 18
Fix 2 issues on Dashboard #305
Fix 2 issues on Dashboard #305
Conversation
[AD_DOC_FIELDS.DETECTOR_NAME]: !isEmpty(liveAnomalyData) ? '' : null, | ||
[AD_DOC_FIELDS.DETECTOR_NAME]: !isEmpty(liveAnomalyData) | ||
? '' | ||
: SPACE_STR, |
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.
This is the only change for fix on the live chart issue
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.
Looks weird to set detector name as '' or ' ' , can you explain why we need an empty detector name or space as detector name ?
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.
When there exists liveAnomalyData, using '' the empty string makes sure those placeholder data won't be shown in legend because its name is ''; When liveAnomalyData does not exist, using space string as detector name can make sure data is plotted in the chart, and because in the case of no liveAnomalyData, legend is hidden, then we are able to see the live chart shown, even without actual anomaly data. Actually the SPACE_STR can be anything, since legend is hidden in that case.
</Fragment> | ||
)} | ||
</Fragment> | ||
<div style={{ height: '1200px' }}> |
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.
This is the only change for full screen issue. The root cause is that not all parent divs have specified 100% height or explicit px for height. More details can be found here: https://stackoverflow.com/a/31728799
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.
Can you confirm if all tests and/or test snapshots are passing? |
Sure. Run it on my local workspace:
|
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.
Thanks for the fixes!
* Show live chart even when live anomaly data is empty * Fix full screen issue for Dashboard
Issue #, if available:
Description of changes:
Issue 1: Show live chart even when live anomaly data is empty
Before
After
Issue 2: Fix full screen issue for Dashboard
Before
After
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.