Skip to content
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

Fixed dashboard filters carrying over to explore slice #3461

Merged
merged 1 commit into from
Sep 14, 2017

Conversation

Mogball
Copy link
Contributor

@Mogball Mogball commented Sep 13, 2017

To fix issue #3172

  • Applying a dashboard filter in the filter_box will refresh the slices with the extra filters
  • But clicking on "Explore Chart" afterwards did not display the slice with the dashboard filters

Solution

  • The URLs for "Export CSV" and "Explore Chart" are updated to contain the dashboard filters whenever they are changed

href={getExploreUrl(slice.form_data, 'csv')}
title="Export CSV"
data-toggle="tooltip"
>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these lines the same as in master, but formatted differently?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

className was added, and eslint wants the code formatted this way when having it on one line would exceed 100 characters

href={getExploreUrl(slice.form_data)}
title="Explore chart"
data-toggle="tooltip"
>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@coveralls
Copy link

coveralls commented Sep 14, 2017

Coverage Status

Coverage remained the same at 69.112% when pulling a6985ed on Mogball:mogball/bugfix/explore_filters into 49f24d1 on apache:master.

const formDataExtra = Object.assign({}, formData);
const extraFilters = controller.effectiveExtraFilters(sliceId);
formDataExtra.filters = formDataExtra.filters.concat(extraFilters);
controls.find('a.exploreChart').attr('href', getExploreUrl(formDataExtra));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look a very react-ish way to handle this, shouldn't the component that renders the link should take formDataExtra and render again when it changes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xrmx eventually this whole module will get refactored out as we write a 100% React dashboard app (currently we have a lot of non-react JS in that app...), this is ok as is for now. We'll have to nuke all the jQuery code out of there in the future...

@mistercrunch mistercrunch merged commit 745784f into apache:master Sep 14, 2017
@mistercrunch
Copy link
Member

img

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.20.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants