diff --git a/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx b/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx index 0732a1cc49be5..3325afe185a5b 100644 --- a/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx +++ b/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx @@ -126,12 +126,15 @@ class TabbedSqlEditors extends React.PureComponent { const activeQueryEditor = this.activeQueryEditor(); const qe = { title: t('Untitled Query %s', queryCount), - dbId: (activeQueryEditor && activeQueryEditor.dbId) ? - activeQueryEditor.dbId : - this.props.defaultDbId, - schema: (activeQueryEditor) ? activeQueryEditor.schema : null, + dbId: + activeQueryEditor && activeQueryEditor.dbId + ? activeQueryEditor.dbId + : this.props.defaultDbId, + schema: activeQueryEditor ? activeQueryEditor.schema : null, autorun: false, - sql: 'SELECT ...', + sql: `${t( + '-- Note: Unless you save your query, these tabs will NOT persist if you clear your cookies or change browsers.', + )}\n\nSELECT ...`, }; this.props.actions.addQueryEditor(qe); } @@ -150,7 +153,7 @@ class TabbedSqlEditors extends React.PureComponent { } render() { const editors = this.props.queryEditors.map((qe, i) => { - const isSelected = (qe.id === this.activeQueryEditor().id); + const isSelected = qe.id === this.activeQueryEditor().id; let latestQuery; if (qe.latestQueryId) { @@ -160,25 +163,20 @@ class TabbedSqlEditors extends React.PureComponent { if (qe.dbId) { database = this.props.databases[qe.dbId]; } - const state = (latestQuery) ? latestQuery.state : ''; + const state = latestQuery ? latestQuery.state : ''; const tabTitle = (