-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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: Add database search in available charts on dashboard. #19244
fix: Add database search in available charts on dashboard. #19244
Conversation
function fetchSlices( | ||
userId, | ||
excludeFilterBox, | ||
dispatch, |
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.
you could transform this to an action creator function (like the ones below) to avoid passing this param around
dispatch, | ||
filter_value, | ||
sortColumn = 'changed_on_delta_humanized', | ||
slices = {} |
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.
do you need the current slices? aren't we fetching here and need to replace the existing ones?
Codecov Report
@@ Coverage Diff @@
## master #19244 +/- ##
==========================================
+ Coverage 66.65% 66.69% +0.03%
==========================================
Files 1729 1749 +20
Lines 64910 65321 +411
Branches 6842 6935 +93
==========================================
+ Hits 43268 43568 +300
- Misses 19893 19998 +105
- Partials 1749 1755 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@yousoph Ephemeral environment spinning up at http://35.86.145.242:8080. Credentials are |
Open issue to address: Recently created charts don't appear in charts section in dashboard edit mode if user sorts by recent |
/testenv up |
@yousoph Ephemeral environment spinning up at http://54.184.5.242:8080. Credentials are |
/testenv up |
@yousoph Ephemeral environment spinning up at http://52.35.138.69:8080. Credentials are |
/testenv up |
@yousoph Ephemeral environment spinning up at http://34.215.177.50:8080. Credentials are |
export function getDatasourceParameter(datasourceId, datasourceType) { | ||
return `${datasourceId}__${datasourceType}`; | ||
export function fetchSlices( | ||
userId, |
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.
Could we send these as an Option object
? So we don't have to worry about the order we send it and we avoid sending undefined
when calling it? So we just send what options we need and we destructure here to get them?
userId, | ||
excludeFilterBox, | ||
dispatch, | ||
undefined, |
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.
If passed as an Option object
there's no need to worry about order or sending undefined.
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.
LGTM... we can address any touchups from comments in followup PRs.
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
On dashboard, when we try to add a new chart, we can see only 200 charts in chart list section. Because we are fetching charts by limitation of amount of 200.
And
filtering chart
,sort by
option only works in frontend, not against database. So we can't see old charts if we have more than 200 charts in database.Solution.
Need to make
filter/sort by
option work against database.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
charts
tab in crud pane.Result: You should be able to see that it hits the endpoint, reloads charts data again.
ADDITIONAL INFORMATION