From ead3d48133e7e1ab8b91d51e561544a544b4eaad Mon Sep 17 00:00:00 2001 From: michellethomas Date: Mon, 18 Mar 2019 10:14:26 -0700 Subject: [PATCH] Adding warning message for sqllab save query (#7028) --- .../assets/src/SqlLab/components/SaveQuery.jsx | 14 ++++++++++++++ .../assets/src/SqlLab/components/SqlEditor.jsx | 3 +++ .../src/SqlLab/components/TabbedSqlEditors.jsx | 4 ++++ superset/config.py | 3 +++ superset/views/base.py | 1 + 5 files changed, 25 insertions(+) diff --git a/superset/assets/src/SqlLab/components/SaveQuery.jsx b/superset/assets/src/SqlLab/components/SaveQuery.jsx index 4a3ac1ba5..6ae2508ec 100644 --- a/superset/assets/src/SqlLab/components/SaveQuery.jsx +++ b/superset/assets/src/SqlLab/components/SaveQuery.jsx @@ -31,11 +31,13 @@ const propTypes = { dbId: PropTypes.number, animation: PropTypes.bool, onSave: PropTypes.func, + saveQueryWarning: PropTypes.string, }; const defaultProps = { defaultLabel: t('Undefined'), animation: true, onSave: () => {}, + saveQueryWarning: null, }; class SaveQuery extends React.PureComponent { @@ -108,6 +110,18 @@ class SaveQuery extends React.PureComponent {
+ {this.props.saveQueryWarning && ( +
+ + + + {this.props.saveQueryWarning} + + + +
+
+ )}