mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
Add email-to option in action buttons for dashboard and slice (#1705)
* Add email-to option in explore action buttons * email to option for dashboard
This commit is contained in:
@@ -44,6 +44,9 @@ class Controls extends React.PureComponent {
|
||||
render() {
|
||||
const dashboard = this.props.dashboard;
|
||||
const canSave = dashboard.context.dash_save_perm;
|
||||
const emailBody = `Checkout this dashboard: ${window.location.href}`;
|
||||
const emailLink = 'mailto:?Subject=Superset%20Dashboard%20'
|
||||
+ `${dashboard.dashboard_title}&Body=${emailBody}`;
|
||||
return (
|
||||
<ButtonGroup>
|
||||
<Button
|
||||
@@ -93,6 +96,11 @@ class Controls extends React.PureComponent {
|
||||
<i className="fa fa-save" />
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
onClick={() => { window.location = emailLink; }}
|
||||
>
|
||||
<i className="fa fa-envelope"></i>
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user