[datasource] Ensure SQL Lab link opens in a new tab (#6195)

This commit is contained in:
John Bodley 2018-10-30 17:06:27 -07:00 committed by GitHub
parent 1473e2cced
commit 1190ebb1a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -127,11 +127,15 @@ class DatasourceControl extends React.PureComponent {
placement="right"
overlay={
<Tooltip id={'datasource-sqllab'}>
{t('Run SQL queries against this datasource')}
{t('Explore this datasource in SQL Lab')}
</Tooltip>
}
>
<a href={'/superset/sqllab?datasourceKey=' + this.props.value}>
<a
href={`/superset/sqllab?datasourceKey=${this.props.value}`}
target="_blank"
rel="noopener noreferrer"
>
<i className="fa fa-flask m-r-5" />
</a>
</OverlayTrigger>}