Repository navigation
fix: Added message flash when chart with missing dataset is accessed. - #12468
Conversation
|
just one quick change - "datasource" to "dataset" in the message 🙏 |
etr2460
left a comment
There was a problem hiding this comment.
seems legit, although it seems like the redirect wouldn't even be necessary here
There was a problem hiding this comment.
This seems like a good pattern in general :)
It's done 👍 |
|
@kkucharc I think changing the underlying exception message makes more sense. We're trying to go with "dataset" moving forward. Also please wrap messages in babel translation |
There was a problem hiding this comment.
I think there could be other reasons for an exception, we should use the actual error message
There was a problem hiding this comment.
And don't forget to add i18n:
_("Error occurred when opening the chart: %(error)", error=utils.error_msg_from_exception(ex))There was a problem hiding this comment.
@kkucharc I think it's definitely worth creating a separate PR to change the naming for user-facing text and messages, not so sure about the code though.
|
What is the current behavior? User gets redirected to Explore and then sees an error message because the underlying datasource doesn't exist right? |
|
@zuzana-vej Now we have situation like on video - |
Codecov Report
@@ Coverage Diff @@
## master #12468 +/- ##
==========================================
- Coverage 66.81% 63.10% -3.72%
==========================================
Files 1015 485 -530
Lines 49548 29945 -19603
Branches 5080 0 -5080
==========================================
- Hits 33106 18897 -14209
+ Misses 16312 11048 -5264
+ Partials 130 0 -130
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
cb292a4 to
11b2430
Compare
There was a problem hiding this comment.
tested, and i noticed charts got completely removed from the list after their underlying dataset is deleted, which is not expected behavior. @adam-stasiak @kkucharc
Expected for this particular change:
User receives a toast message of "The dataset associated with this chart no longer exists" when clicking on a chart which its dataset was deleted from Datasets.
the chart should still be visible on the Charts list view. but the Dataset column should be empty.
|
@junlincc Could you describe steps to reproduce - > I tried to delete datasets and charts remain. |
There was a problem hiding this comment.
Tested again, LGTM. will merge with two code review approvals.
@kkucharc @adam-stasiak i didn't notice you force pushed. sorry about the confusion! 🙏



SUMMARY
Chart with deleted dataset is still available on charts list. While trying to access its explore view page redirects to charts list page. As discussed in issue #12464, I added flash notification message in right bottom corner.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
[Link to previous behaviour video] (https://user-images.githubusercontent.com/25153919/104351996-6655dd00-5506-11eb-929d-a7c1593098e0.mov)
After:

TEST PLAN
The datasource associated with this chart no longer existsADDITIONAL INFORMATION