From b56e593a536ac8ff66ebcb10e3f7bc5a756ad9d2 Mon Sep 17 00:00:00 2001 From: Jeffrey Wang Date: Thu, 15 Nov 2018 18:38:51 -0500 Subject: [PATCH] Set default limit on creation of new qe and on run (#6400) (cherry picked from commit 8c4f723a6103c0fab0d8a4fff17d14363eb7fbfb) --- superset/assets/src/SqlLab/components/SqlEditor.jsx | 2 +- superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/superset/assets/src/SqlLab/components/SqlEditor.jsx b/superset/assets/src/SqlLab/components/SqlEditor.jsx index 7a387707c0ba4..63889ad8e6254 100644 --- a/superset/assets/src/SqlLab/components/SqlEditor.jsx +++ b/superset/assets/src/SqlLab/components/SqlEditor.jsx @@ -149,7 +149,7 @@ class SqlEditor extends React.PureComponent { schema: qe.schema, tempTableName: ctas ? this.state.ctas : '', templateParams: qe.templateParams, - queryLimit: qe.queryLimit, + queryLimit: qe.queryLimit || this.props.defaultQueryLimit, runAsync, ctas, }; diff --git a/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx b/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx index 7407dcbcfc35a..da0d9d127c81a 100644 --- a/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx +++ b/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx @@ -138,6 +138,7 @@ class TabbedSqlEditors extends React.PureComponent { sql: `${t( '-- Note: Unless you save your query, these tabs will NOT persist if you clear your cookies or change browsers.', )}\n\nSELECT ...`, + queryLimit: this.props.defaultQueryLimit, }; this.props.actions.addQueryEditor(qe); }