From bd924190a68e7b6879e229f57aab54f5689dc3f1 Mon Sep 17 00:00:00 2001 From: Arash Date: Wed, 24 Nov 2021 11:03:24 -0700 Subject: [PATCH 1/6] a lot of console logs --- superset-frontend/src/SqlLab/components/App/index.jsx | 2 ++ superset-frontend/src/SqlLab/components/SqlEditor/index.jsx | 1 + .../src/SqlLab/components/TabbedSqlEditors/index.jsx | 4 ++++ superset-frontend/src/SqlLab/reducers/getInitialState.js | 1 + 4 files changed, 8 insertions(+) diff --git a/superset-frontend/src/SqlLab/components/App/index.jsx b/superset-frontend/src/SqlLab/components/App/index.jsx index bce43f477800e..8e6a70fc6b9d5 100644 --- a/superset-frontend/src/SqlLab/components/App/index.jsx +++ b/superset-frontend/src/SqlLab/components/App/index.jsx @@ -37,6 +37,8 @@ import QuerySearch from '../QuerySearch'; class App extends React.PureComponent { constructor(props) { super(props); + console.log('this is App'); + console.log(props); this.state = { hash: window.location.hash, }; diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx index e06d89832716b..a393e484d0f4c 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx @@ -630,6 +630,7 @@ class SqlEditor extends React.PureComponent { )} ); + return (
diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.jsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.jsx index ea400b8b91c73..c164bfce316b7 100644 --- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.jsx +++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.jsx @@ -75,6 +75,7 @@ const userOS = detectOS(); class TabbedSqlEditors extends React.PureComponent { constructor(props) { super(props); + console.log('this is the tabbed', props); const sqlLabUrl = '/superset/sqllab'; this.state = { sqlLabUrl, @@ -93,6 +94,8 @@ class TabbedSqlEditors extends React.PureComponent { componentDidMount() { // migrate query editor and associated tables state to server + console.log('we here boys'); + console.log(this.props); if (isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)) { const localStorageTables = this.props.tables.filter( table => table.inLocalStorage, @@ -434,6 +437,7 @@ TabbedSqlEditors.propTypes = propTypes; TabbedSqlEditors.defaultProps = defaultProps; function mapStateToProps({ sqlLab, common, requestedQuery }) { + console.log(sqlLab); return { databases: sqlLab.databases, queryEditors: sqlLab.queryEditors, diff --git a/superset-frontend/src/SqlLab/reducers/getInitialState.js b/superset-frontend/src/SqlLab/reducers/getInitialState.js index 0eceebfa3ad2b..b6931045d6e85 100644 --- a/superset-frontend/src/SqlLab/reducers/getInitialState.js +++ b/superset-frontend/src/SqlLab/reducers/getInitialState.js @@ -85,6 +85,7 @@ export default function getInitialState({ functionNames: [], schema: activeTab.schema, queryLimit: activeTab.query_limit, + remoteId: activeTab.remoteId, validationResult: { id: null, errors: [], From f377d9976c1b7086ccc77fddf019576cad69fa78 Mon Sep 17 00:00:00 2001 From: Arash Date: Wed, 24 Nov 2021 13:47:43 -0700 Subject: [PATCH 2/6] testing --- superset-frontend/src/SqlLab/reducers/getInitialState.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/reducers/getInitialState.js b/superset-frontend/src/SqlLab/reducers/getInitialState.js index b6931045d6e85..2a3dc68797897 100644 --- a/superset-frontend/src/SqlLab/reducers/getInitialState.js +++ b/superset-frontend/src/SqlLab/reducers/getInitialState.js @@ -29,6 +29,9 @@ export default function getInitialState({ requested_query: requestedQuery, user, }) { + console.log('this is queries'); + console.log(activeTab); + console.log(requestedQuery); /** * Before YYYY-MM-DD, the state for SQL Lab was stored exclusively in the * browser's localStorage. The feature flag `SQLLAB_BACKEND_PERSISTENCE` @@ -85,7 +88,6 @@ export default function getInitialState({ functionNames: [], schema: activeTab.schema, queryLimit: activeTab.query_limit, - remoteId: activeTab.remoteId, validationResult: { id: null, errors: [], From ae56ed413659d82446aee80f086c6d6b63e53b23 Mon Sep 17 00:00:00 2001 From: Arash Date: Wed, 15 Dec 2021 14:39:41 -0500 Subject: [PATCH 3/6] test --- superset-frontend/src/SqlLab/actions/sqlLab.js | 17 +++++++++++++++++ .../src/SqlLab/components/SqlEditor/index.jsx | 11 ++++++++++- .../src/SqlLab/reducers/getInitialState.js | 1 + ..._add_saved_query_foreign_key_to_tab_state.py | 4 ++++ superset/models/sql_lab.py | 4 ++++ 5 files changed, 36 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js b/superset-frontend/src/SqlLab/actions/sqlLab.js index a4c01772fdb4a..a6e00c73724d4 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.js +++ b/superset-frontend/src/SqlLab/actions/sqlLab.js @@ -877,6 +877,23 @@ export function saveQuery(query) { ); } +export function addSavedQueryToTabState(queryEditor, query) { + return function (dispatch) { + const sync = isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE) + ? SupersetClient.put({ + endpoint: `/tabstateview/${queryEditor.id}`, + postPayload: { saved_query_id: query.remoteId }, + }) + : Promise.resolve(); + + return sync + .catch(() => { + dispatch(addDangerToast(t('Your query was not properly saved'))); + }) + .then(() => dispatch(updateQueryEditor(query))); + }; +} + export function updateSavedQuery(query) { return dispatch => SupersetClient.put({ diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx index a393e484d0f4c..2a92215f1dded 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx @@ -52,6 +52,7 @@ import { queryEditorSetTemplateParams, runQuery, saveQuery, + addSavedQueryToTabState, scheduleQuery, setActiveSouthPaneTab, updateSavedQuery, @@ -192,6 +193,7 @@ class SqlEditor extends React.PureComponent { this.canValidateQuery = this.canValidateQuery.bind(this); this.runQuery = this.runQuery.bind(this); this.stopQuery = this.stopQuery.bind(this); + this.saveQuery = this.saveQuery.bind(this); this.onSqlChanged = this.onSqlChanged.bind(this); this.setQueryEditorSql = this.setQueryEditorSql.bind(this); this.setQueryEditorSqlWithDebounce = debounce( @@ -592,6 +594,12 @@ class SqlEditor extends React.PureComponent { ); } + saveQuery(query) { + const { queryEditor: qe } = this.props; + this.props.actions.saveQuery(query); + this.props.action.addSavedQueryToTabState(qe, query); + } + renderEditorBottomBar() { const { queryEditor: qe } = this.props; @@ -694,7 +702,7 @@ class SqlEditor extends React.PureComponent { @@ -810,6 +818,7 @@ function mapDispatchToProps(dispatch) { queryEditorSetTemplateParams, runQuery, saveQuery, + addSavedQueryToTabState, scheduleQuery, setActiveSouthPaneTab, updateSavedQuery, diff --git a/superset-frontend/src/SqlLab/reducers/getInitialState.js b/superset-frontend/src/SqlLab/reducers/getInitialState.js index 2a3dc68797897..4efe46a9472ea 100644 --- a/superset-frontend/src/SqlLab/reducers/getInitialState.js +++ b/superset-frontend/src/SqlLab/reducers/getInitialState.js @@ -70,6 +70,7 @@ export default function getInitialState({ * Load state from the backend. This will be empty if the feature flag * `SQLLAB_BACKEND_PERSISTENCE` is off. */ + console.log(activeTab); tabStateIds.forEach(({ id, label }) => { let queryEditor; if (activeTab && activeTab.id === id) { diff --git a/superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py b/superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py index a70b95af0ad42..ce22a7eeff273 100644 --- a/superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py +++ b/superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py @@ -38,5 +38,9 @@ def upgrade(): def downgrade(): with op.batch_alter_table("tab_state") as batch_op: +<<<<<<< HEAD batch_op.drop_constraint("saved_query_id", type_="foreignkey") +======= + batch_op.drop_contraint("saved_query_id", type_="foreignkey") +>>>>>>> test batch_op.drop_column("saved_query_id") diff --git a/superset/models/sql_lab.py b/superset/models/sql_lab.py index ef0f34e4ffbd5..3fd09143be35f 100644 --- a/superset/models/sql_lab.py +++ b/superset/models/sql_lab.py @@ -285,6 +285,10 @@ class TabState(Model, AuditMixinNullable, ExtraJSONMixin): template_params = Column(Text) hide_left_bar = Column(Boolean, default=False) + # any saved queries that are associated with the Tab State + saved_query_id = Column(Integer, ForeignKey("saved_query.id"), nullable=True) + saved_query = relationship("SavedQuery") + def to_dict(self) -> Dict[str, Any]: return { "id": self.id, From b621a25775b03da2903443b3e9eff54d67802554 Mon Sep 17 00:00:00 2001 From: Arash Date: Tue, 4 Jan 2022 14:38:03 -0500 Subject: [PATCH 4/6] added saved_query to remoteId --- superset-frontend/src/SqlLab/actions/sqlLab.js | 13 ++++++++----- superset-frontend/src/SqlLab/actions/sqlLab.test.js | 4 +--- .../src/SqlLab/components/App/index.jsx | 2 -- .../src/SqlLab/components/SqlEditor/index.jsx | 8 ++++---- .../SqlLab/components/TabbedSqlEditors/index.jsx | 4 ---- .../src/SqlLab/reducers/getInitialState.js | 5 +---- superset-frontend/src/SqlLab/types.ts | 1 - ...08dd_add_saved_query_foreign_key_to_tab_state.py | 4 ---- superset/models/sql_lab.py | 8 +++++++- 9 files changed, 21 insertions(+), 28 deletions(-) diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js b/superset-frontend/src/SqlLab/actions/sqlLab.js index a6e00c73724d4..43d63addfc8a3 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.js +++ b/superset-frontend/src/SqlLab/actions/sqlLab.js @@ -636,12 +636,13 @@ export function switchQueryEditor(queryEditor, displayLimit) { title: json.label, sql: json.sql, selectedText: null, - latestQueryId: json.latest_query ? json.latest_query.id : null, + latestQueryId: json.latest_query?.id, autorun: json.autorun, dbId: json.database_id, templateParams: json.template_params, schema: json.schema, queryLimit: json.query_limit, + remoteId: json.saved_query?.id, validationResult: { id: null, errors: [], @@ -869,20 +870,20 @@ export function saveQuery(query) { query, result: convertQueryToClient(result.json.item), }); - dispatch(addSuccessToast(t('Your query was saved'))); dispatch(queryEditorSetTitle(query, query.title)); + return convertQueryToClient(result.json.item); }) .catch(() => dispatch(addDangerToast(t('Your query could not be saved'))), ); } -export function addSavedQueryToTabState(queryEditor, query) { +export function addSavedQueryToTabState(queryEditor, savedQuery) { return function (dispatch) { const sync = isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE) ? SupersetClient.put({ endpoint: `/tabstateview/${queryEditor.id}`, - postPayload: { saved_query_id: query.remoteId }, + postPayload: { saved_query_id: savedQuery.remoteId }, }) : Promise.resolve(); @@ -890,7 +891,9 @@ export function addSavedQueryToTabState(queryEditor, query) { .catch(() => { dispatch(addDangerToast(t('Your query was not properly saved'))); }) - .then(() => dispatch(updateQueryEditor(query))); + .then(() => { + dispatch(addSuccessToast(t('Your query was saved'))); + }); }; } diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.test.js b/superset-frontend/src/SqlLab/actions/sqlLab.test.js index bc16c64091373..49b523a683b83 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.test.js +++ b/superset-frontend/src/SqlLab/actions/sqlLab.test.js @@ -23,7 +23,6 @@ import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import shortid from 'shortid'; import * as featureFlags from 'src/featureFlags'; -import { ADD_TOAST } from 'src/components/MessageToasts/actions'; import * as actions from 'src/SqlLab/actions/sqlLab'; import { defaultQueryEditor, query } from '../fixtures'; @@ -93,7 +92,7 @@ describe('async actions', () => { expect.assertions(1); return makeRequest().then(() => { - expect(dispatch.callCount).toBe(3); + expect(dispatch.callCount).toBe(2); }); }); @@ -111,7 +110,6 @@ describe('async actions', () => { const store = mockStore({}); const expectedActionTypes = [ actions.QUERY_EDITOR_SAVED, - ADD_TOAST, actions.QUERY_EDITOR_SET_TITLE, ]; return store.dispatch(actions.saveQuery(query)).then(() => { diff --git a/superset-frontend/src/SqlLab/components/App/index.jsx b/superset-frontend/src/SqlLab/components/App/index.jsx index 8e6a70fc6b9d5..bce43f477800e 100644 --- a/superset-frontend/src/SqlLab/components/App/index.jsx +++ b/superset-frontend/src/SqlLab/components/App/index.jsx @@ -37,8 +37,6 @@ import QuerySearch from '../QuerySearch'; class App extends React.PureComponent { constructor(props) { super(props); - console.log('this is App'); - console.log(props); this.state = { hash: window.location.hash, }; diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx index 2a92215f1dded..22711fb88d9e8 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx @@ -594,10 +594,10 @@ class SqlEditor extends React.PureComponent { ); } - saveQuery(query) { - const { queryEditor: qe } = this.props; - this.props.actions.saveQuery(query); - this.props.action.addSavedQueryToTabState(qe, query); + async saveQuery(query) { + const { queryEditor: qe, actions } = this.props; + const savedQuery = await actions.saveQuery(query); + actions.addSavedQueryToTabState(qe, savedQuery); } renderEditorBottomBar() { diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.jsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.jsx index c164bfce316b7..ea400b8b91c73 100644 --- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.jsx +++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.jsx @@ -75,7 +75,6 @@ const userOS = detectOS(); class TabbedSqlEditors extends React.PureComponent { constructor(props) { super(props); - console.log('this is the tabbed', props); const sqlLabUrl = '/superset/sqllab'; this.state = { sqlLabUrl, @@ -94,8 +93,6 @@ class TabbedSqlEditors extends React.PureComponent { componentDidMount() { // migrate query editor and associated tables state to server - console.log('we here boys'); - console.log(this.props); if (isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)) { const localStorageTables = this.props.tables.filter( table => table.inLocalStorage, @@ -437,7 +434,6 @@ TabbedSqlEditors.propTypes = propTypes; TabbedSqlEditors.defaultProps = defaultProps; function mapStateToProps({ sqlLab, common, requestedQuery }) { - console.log(sqlLab); return { databases: sqlLab.databases, queryEditors: sqlLab.queryEditors, diff --git a/superset-frontend/src/SqlLab/reducers/getInitialState.js b/superset-frontend/src/SqlLab/reducers/getInitialState.js index 4efe46a9472ea..d5f02029d0ccf 100644 --- a/superset-frontend/src/SqlLab/reducers/getInitialState.js +++ b/superset-frontend/src/SqlLab/reducers/getInitialState.js @@ -29,9 +29,6 @@ export default function getInitialState({ requested_query: requestedQuery, user, }) { - console.log('this is queries'); - console.log(activeTab); - console.log(requestedQuery); /** * Before YYYY-MM-DD, the state for SQL Lab was stored exclusively in the * browser's localStorage. The feature flag `SQLLAB_BACKEND_PERSISTENCE` @@ -70,7 +67,6 @@ export default function getInitialState({ * Load state from the backend. This will be empty if the feature flag * `SQLLAB_BACKEND_PERSISTENCE` is off. */ - console.log(activeTab); tabStateIds.forEach(({ id, label }) => { let queryEditor; if (activeTab && activeTab.id === id) { @@ -83,6 +79,7 @@ export default function getInitialState({ latestQueryId: activeTab.latest_query ? activeTab.latest_query.id : null, + remoteId: activeTab.saved_query?.id, autorun: activeTab.autorun, templateParams: activeTab.template_params || undefined, dbId: activeTab.database_id, diff --git a/superset-frontend/src/SqlLab/types.ts b/superset-frontend/src/SqlLab/types.ts index 1308f58bfdb7c..21404527f1575 100644 --- a/superset-frontend/src/SqlLab/types.ts +++ b/superset-frontend/src/SqlLab/types.ts @@ -69,7 +69,6 @@ export type Query = { queryLimit: number; limitingFactor: string; }; - export interface QueryEditor { dbId?: number; title: string; diff --git a/superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py b/superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py index ce22a7eeff273..a70b95af0ad42 100644 --- a/superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py +++ b/superset/migrations/versions/c53bae8f08dd_add_saved_query_foreign_key_to_tab_state.py @@ -38,9 +38,5 @@ def upgrade(): def downgrade(): with op.batch_alter_table("tab_state") as batch_op: -<<<<<<< HEAD batch_op.drop_constraint("saved_query_id", type_="foreignkey") -======= - batch_op.drop_contraint("saved_query_id", type_="foreignkey") ->>>>>>> test batch_op.drop_column("saved_query_id") diff --git a/superset/models/sql_lab.py b/superset/models/sql_lab.py index 3fd09143be35f..d2e9b3fefb018 100644 --- a/superset/models/sql_lab.py +++ b/superset/models/sql_lab.py @@ -211,6 +211,11 @@ class SavedQuery(Model, AuditMixinNullable, ExtraJSONMixin, ImportExportMixin): def __repr__(self) -> str: return str(self.label) + def to_dict(self) -> Dict[str, Any]: + return { + "id": self.id, + } + @property def pop_tab_link(self) -> Markup: return Markup( @@ -287,7 +292,7 @@ class TabState(Model, AuditMixinNullable, ExtraJSONMixin): # any saved queries that are associated with the Tab State saved_query_id = Column(Integer, ForeignKey("saved_query.id"), nullable=True) - saved_query = relationship("SavedQuery") + saved_query = relationship("SavedQuery", foreign_keys=[saved_query_id]) def to_dict(self) -> Dict[str, Any]: return { @@ -304,6 +309,7 @@ def to_dict(self) -> Dict[str, Any]: "autorun": self.autorun, "template_params": self.template_params, "hide_left_bar": self.hide_left_bar, + "saved_query": self.saved_query.to_dict() if self.saved_query else None, } From ed14a6fccd3780ec9fa5a990d52e09794470bb3e Mon Sep 17 00:00:00 2001 From: Arash Date: Wed, 5 Jan 2022 16:44:21 -0500 Subject: [PATCH 5/6] created useEffect so that title properly changes in modal --- .../src/SqlLab/components/SaveQuery/index.tsx | 7 ++++++- superset-frontend/src/SqlLab/types.ts | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx index 1c0dee4269407..99cda810b23fc 100644 --- a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx +++ b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import { Row, Col, Input, TextArea } from 'src/common/components'; import { t, styled } from '@superset-ui/core'; import Button from 'src/components/Button'; @@ -90,6 +90,11 @@ export default function SaveQuery({ description, }); + useEffect(() => { + if (!isSaved) { + setLabel(defaultLabel); + } + }, [defaultLabel]); const close = () => { setShowSave(false); }; diff --git a/superset-frontend/src/SqlLab/types.ts b/superset-frontend/src/SqlLab/types.ts index 21404527f1575..1308f58bfdb7c 100644 --- a/superset-frontend/src/SqlLab/types.ts +++ b/superset-frontend/src/SqlLab/types.ts @@ -69,6 +69,7 @@ export type Query = { queryLimit: number; limitingFactor: string; }; + export interface QueryEditor { dbId?: number; title: string; From 69eae1ccd511ee340e9e5e8da9e3bf9b07ef64d0 Mon Sep 17 00:00:00 2001 From: AAfghahi <48933336+AAfghahi@users.noreply.github.com> Date: Mon, 10 Jan 2022 17:28:24 -0500 Subject: [PATCH 6/6] Update superset-frontend/src/SqlLab/actions/sqlLab.js Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com> --- superset-frontend/src/SqlLab/actions/sqlLab.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js b/superset-frontend/src/SqlLab/actions/sqlLab.js index 43d63addfc8a3..2605c43e739fc 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.js +++ b/superset-frontend/src/SqlLab/actions/sqlLab.js @@ -865,21 +865,22 @@ export function saveQuery(query) { stringify: false, }) .then(result => { + const savedQuery = convertQueryToClient(result.json.item); dispatch({ type: QUERY_EDITOR_SAVED, query, - result: convertQueryToClient(result.json.item), + result: savedQuery, }); dispatch(queryEditorSetTitle(query, query.title)); - return convertQueryToClient(result.json.item); + return savedQuery; }) .catch(() => dispatch(addDangerToast(t('Your query could not be saved'))), ); } -export function addSavedQueryToTabState(queryEditor, savedQuery) { - return function (dispatch) { +export const addSavedQueryToTabState = + (queryEditor, savedQuery) => dispatch => { const sync = isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE) ? SupersetClient.put({ endpoint: `/tabstateview/${queryEditor.id}`, @@ -895,7 +896,6 @@ export function addSavedQueryToTabState(queryEditor, savedQuery) { dispatch(addSuccessToast(t('Your query was saved'))); }); }; -} export function updateSavedQuery(query) { return dispatch =>