mistercrunch commented on a change in pull request #4760: URL shortner for
dashboards
URL:
https://github.com/apache/incubator-superset/pull/4760#discussion_r179344602
##########
File path: superset/assets/javascripts/components/URLShortLinkButton.jsx
##########
@@ -25,20 +27,20 @@ export default class URLShortLinkButton extends
React.Component {
}
getCopyUrl() {
- const longUrl = getExploreLongUrl(this.props.latestQueryFormData);
+ const longUrl = (this.props.type === 'Dashboard') ?
getDashboardLongUrl(this.props.context) : getExploreLongUrl(this.props.context);
Review comment:
Also not sure why `getDashboardLongUrl` is necessary in the first place, can
we just use `window.location`? Assuming we want the current state of the
dashboard (with current filters), `window.location` should be in sync at that
point.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services