mirror of https://github.com/apache/superset.git
[sqllab] Added share button to bottom menu (#4584)
* added sharebtn * address comments
This commit is contained in:
parent
d522292b01
commit
c6af4882cd
|
@ -0,0 +1,22 @@
|
|||
import React from 'react';
|
||||
|
||||
import CopyToClipboard from '../../components/CopyToClipboard';
|
||||
import CopyQueryTabUrl from './CopyQueryTabUrl';
|
||||
import Button from '../../components/Button';
|
||||
import { t } from '../../locales';
|
||||
|
||||
export default class ShareQueryBtn extends CopyQueryTabUrl {
|
||||
render() {
|
||||
return (
|
||||
<CopyToClipboard
|
||||
copyNode={(
|
||||
<Button bsSize="small" className="toggleSave">
|
||||
<i className="fa fa-clipboard" /> {t('Share Query')}
|
||||
</Button>
|
||||
)}
|
||||
tooltipText={t('copy URL to clipboard')}
|
||||
shouldShowText={false}
|
||||
getText={this.getUrl.bind(this)}
|
||||
/>);
|
||||
}
|
||||
}
|
|
@ -19,6 +19,7 @@ import Button from '../../components/Button';
|
|||
import TemplateParamsEditor from './TemplateParamsEditor';
|
||||
import SouthPane from './SouthPane';
|
||||
import SaveQuery from './SaveQuery';
|
||||
import ShareQuery from './ShareQuery';
|
||||
import Timer from '../../components/Timer';
|
||||
import SqlEditorLeftBar from './SqlEditorLeftBar';
|
||||
import AceEditorWrapper from './AceEditorWrapper';
|
||||
|
@ -195,6 +196,9 @@ class SqlEditor extends React.PureComponent {
|
|||
dbId={qe.dbId}
|
||||
/>
|
||||
</span>
|
||||
<span className="m-r-5">
|
||||
<ShareQuery queryEditor={qe} />
|
||||
</span>
|
||||
{ctasControls}
|
||||
</Form>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue