You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/09/03 15:34:51 UTC

[GitHub] [superset] stevetracvc opened a new issue #16580: Dashboard Share URL excludes Experimental Filters and Cross Filters values

stevetracvc opened a new issue #16580:
URL: https://github.com/apache/superset/issues/16580


   When you share a dashboard (Copy Dashboard URL, Share dashboard by email, or click the link icon next to a tab, etc), the native filter values and deprecated filter values are exported with the shortened link. However, cross filters and the new experimental embedded filters (eg, Range Filter, Select Filter, etc) are NOT exported.
   
   ### Expected results
   
   When you share a dashboard's state with someone, you'd expect ALL parts of the state to be shared. This would include every filter's setting
   
   ### Actual results
   
   The Cross Filter-type filter values are not exported
   
   #### How to reproduce the bug
   
   1. Add Native filters and Range Filter or Select Filter boxes to a dashboard. Also set a table to emit cross filters.
   2. Set several filter values, on Native Filters and the embedded Range Filter, as well as cross filters for a table.
   3. Click on the dashboard's three dots and choose "Copy dashboard URL"
   4. Paste this URL into a new browser tab
   5. Note that the Native Filter values are populated, but the Range Filter, Select Filter, and emitted Cross Filter values are not
   
   ### Environment
   
   - superset version: master, as of Aug 27 (last commit was 62d8ab7f9c044e2887de794484c30c2108213e0b)
   using the Docker version, so all other software is as-is from the Docker configs
   - any feature flags active:
       "DASHBOARD_NATIVE_FILTERS": True,
       "DASHBOARD_CROSS_FILTERS": True,
       "DASHBOARD_FILTERS_EXPERIMENTAL": True,
       "ENABLE_EXPLORE_DRAG_AND_DROP": False,
       "ENABLE_TEMPLATE_PROCESSING": True,
       "DYNAMIC_PLUGINS": True,
       "DASHBOARD_RBAC": True,
   
   ### Checklist
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   A little discussion here: https://apache-superset.slack.com/archives/C016B3LG5B4/p1629643453183200
   
   The generated URLs are shortened, but prior to getting shortened, they're basically a bunch of URL parameters. I dug around and found that the Native Filters and old (deprecated) filter boxes are properly exported, but in file src/dashboard/actions/hydrate.js is what loads the preselect_filters and native_filters from the URL parameters. There's a section on setting up cross filters, but not loading any values for them from URL params. It also doesn't do anything for things like Range Filters. 
   
   I tried changing line 194, which only looks for "filter_box" elements, to instead include "filter_*" so that it would catch the range filters. It generated this example set of URL parameters:
   
   `preselect_filters={"998":{"COLUMN_NAME":"All"},"1104":{"ANOTHER_COLUMN_NAME":{"filters":[{"col":"ANOTHER_COLUMN_NAME","op":">=","val":93.75}]}}}&native_filters=(NATIVE_FILTER-XofC8k3la:(extraFormData:(),filterState:(),id:NATIVE_FILTER-XofC8k3la,ownState:()))
   `
   element 998 is an old-school (apparently deprecated) filter, element 1104 is a range filter (cross filter), and I had no value set for my one native filter. This link doesn't actually apply the set values to element 1104.
   
   
   
   I might be able to fix this myself, if I get some assistance on where to look. These filters seem to apply similar to cross filters rather than native filters, so I'm guessing I need to look there.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on issue #16580: Dashboard Share URL excludes Experimental Filters and Cross Filters values

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on issue #16580:
URL: https://github.com/apache/superset/issues/16580#issuecomment-984593725


   Back-end part to fix this: #17536
   
   The front-end part will come next.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] stevetracvc commented on issue #16580: Dashboard Share URL excludes Experimental Filters and Cross Filters values

Posted by GitBox <gi...@apache.org>.
stevetracvc commented on issue #16580:
URL: https://github.com/apache/superset/issues/16580#issuecomment-984669449


   Awesome thanks @michael-s-molina ! So this should fix all the issues related to filter state?
   
   What about old saved URLs? eg, our team already is using /r/156 for something. Will loading state from URL be kept long-term, or do you expect these to be deprecated and thus migrated to the new form? I would vote to NOT deprecate, as I also build links in the dashboard, to take you to another tab with filters pre-set. Eg, I have a table with data. One column is a list of names, and they're from a calculated column in the table that I built to generate a link to another dashboard, pre-filling filter values for that name. Sort of like a clunky drill-down.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org