-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Fix refresh frequency #7248
Fix refresh frequency #7248
Conversation
Codecov Report
@@ Coverage Diff @@
## lyftga #7248 +/- ##
==========================================
+ Coverage 64.53% 64.54% +<.01%
==========================================
Files 425 425
Lines 20861 20863 +2
Branches 2280 2282 +2
==========================================
+ Hits 13463 13465 +2
Misses 7272 7272
Partials 126 126
Continue to review full report at Codecov.
|
@@ -105,9 +105,9 @@ describe('HeaderActionsDropdown', () => { | |||
expect(wrapper.find(MenuItem)).toHaveLength(2); | |||
}); | |||
|
|||
it('should render the RefreshIntervalModal', () => { | |||
it('should not render the RefreshIntervalModal', () => { |
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.
should we add tests that assert it renders this in editMode
?
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 them already, actually. I didn't have to change them. See https://github.com/apache/incubator-superset/pull/7248/files#diff-c130332fd863f354e0dd6e8e6097f72fR142
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 looks good to me except it seems like we should probably have tests that assert the option to update renders in editMode
?
Thanks, @williaster! |
@betodealmeida this PR makes auto-refresh interval only available to dashboard owner: For Superset dashboard, only owner can enable edit mode. check I think we need to keep auto refresh interval choice available for all dashboard viewer. |
@graceguo-supercat good point. I'll bring back the other option, I just think we need to improve the wording. We should differentiate between setting a refresh on the dashboard the user is currently seeing, versus saving it with the dashboard metadata. |
SUMMARY
Setting the refresh frequency is not working properly:
/superset/save_dash/
;hasUnsavedChanges
, so the user might not save the change.I added the refresh frequency to the payload, and made it so that modifying the refresh frequency sets
hasUnsavedChanges
to true, prompting the user to save the dash.Note that in order to do the latter I changed the dropdown to only show the option when the user is in edit mode. This can be changed, but I'm worried that users will not know the difference between setting the frequency without entering edit mode (it's not saved, and only applies to the current browser tab) vs. changing it in edit mode (it is saved and applies to all dashboards). Thoughts on this?
TEST PLAN
Created new dashboard, changed the refresh frequency. Value is present in the payload, saved in the DB. On next load, the initial value is correctly read from the DB.
ADDITIONAL INFORMATION
REVIEWERS
@xtinec @mistercrunch