You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2022/04/25 07:47:27 UTC
[superset] 06/14: fix(sql lab): replace the output column in the query history table (#19370)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch 1.5
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 87b51c26f496ed70779323a498b0ee3d056eda7b
Author: Diego Medina <di...@gmail.com>
AuthorDate: Wed Apr 13 12:22:03 2022 -0400
fix(sql lab): replace the output column in the query history table (#19370)
* fix(sql lab): replace the output column in the query history table
* improvements
(cherry picked from commit d4e7c65f6abc656625d827af362d2b6b0d0e1877)
---
.../src/SqlLab/components/QueryHistory/index.tsx | 2 +-
.../src/SqlLab/components/QueryTable/index.tsx | 15 ++++++---------
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx b/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx
index 7cf9d6ba65..e614017e96 100644
--- a/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx
+++ b/superset-frontend/src/SqlLab/components/QueryHistory/index.tsx
@@ -55,7 +55,7 @@ const QueryHistory = ({ queries, actions, displayLimit }: QueryHistoryProps) =>
'progress',
'rows',
'sql',
- 'output',
+ 'results',
'actions',
]}
queries={queries}
diff --git a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx
index 142d8a1309..50a3b626a6 100644
--- a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx
+++ b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx
@@ -35,10 +35,12 @@ import ResultSet from '../ResultSet';
import HighlightedSql from '../HighlightedSql';
import { StaticPosition, verticalAlign, StyledTooltip } from './styles';
-interface QueryTableQuery extends Omit<Query, 'state' | 'sql' | 'progress'> {
+interface QueryTableQuery
+ extends Omit<Query, 'state' | 'sql' | 'progress' | 'results'> {
state?: Record<string, any>;
sql?: Record<string, any>;
progress?: Record<string, any>;
+ results?: Record<string, any>;
}
interface QueryTableProps {
@@ -225,12 +227,12 @@ const QueryTable = ({
</Card>
);
if (q.resultsKey) {
- q.output = (
+ q.results = (
<ModalTrigger
className="ResultsModal"
triggerNode={
<Label type="info" className="pointer">
- {t('View results')}
+ {t('View')}
</Label>
}
modalTitle={t('Data preview')}
@@ -250,13 +252,8 @@ const QueryTable = ({
responsive
/>
);
- } else {
- // if query was run using ctas and force_ctas_schema was set
- // tempTable will have the schema
- const schemaUsed =
- q.ctas && q.tempTable && q.tempTable.includes('.') ? '' : q.schema;
- q.output = [schemaUsed, q.tempTable].filter(v => v).join('.');
}
+
q.progress =
state === 'success' ? (
<ProgressBar