You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/04/05 03:57:04 UTC

[GitHub] mistercrunch commented on a change in pull request #4760: URL shortner for dashboards

mistercrunch commented on a change in pull request #4760: URL shortner for dashboards
URL: https://github.com/apache/incubator-superset/pull/4760#discussion_r179326998
 
 

 ##########
 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);
     getShortUrl(longUrl, this.onShortUrlSuccess.bind(this));
   }
 
   renderPopover() {
-    const emailBody = t('Check out this slice: %s', this.state.shortUrl);
+    const emailBody = t('Check out this %s: %s', this.props.type.toLowerCase(), this.state.shortUrl);
 
 Review comment:
   `emailBody` and `emailSubject` could be the prop to make the component more generic

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services