From 5aa119912ceff70ed2d6d7a29ac7d47cc5928ae2 Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Mon, 13 Jun 2022 20:51:57 -0700 Subject: [PATCH 1/2] fix: update connection modal to use existing catalog --- .../src/views/CRUD/data/database/DatabaseModal/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index 392df834dd7b2..d0dbf84546c2a 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -203,6 +203,7 @@ function dbReducer( let deserializeExtraJSON = { allows_virtual_table_explore: true }; let extra_json: DatabaseObject['extra_json']; + console.log('action.type', action.type) switch (action.type) { case ActionType.extraEditorChange: return { @@ -366,18 +367,17 @@ function dbReducer( configuration_method: action.payload.configuration_method, extra_json: deserializeExtraJSON, catalog: engineParamsCatalog, - parameters: action.payload.parameters, + parameters: action.payload.parameters || trimmedState.parameters, query_input, }; } - return { ...action.payload, encrypted_extra: action.payload.encrypted_extra || '', engine: action.payload.backend || trimmedState.engine, configuration_method: action.payload.configuration_method, extra_json: deserializeExtraJSON, - parameters: action.payload.parameters, + parameters: action.payload.parameters || trimmedState.parameters, query_input, }; From b1c6126c8eac47cb97bea6e14384687af4f41da0 Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Tue, 14 Jun 2022 09:03:50 -0700 Subject: [PATCH 2/2] remove console --- .../src/views/CRUD/data/database/DatabaseModal/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index d0dbf84546c2a..544dcbdf9482e 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -203,7 +203,6 @@ function dbReducer( let deserializeExtraJSON = { allows_virtual_table_explore: true }; let extra_json: DatabaseObject['extra_json']; - console.log('action.type', action.type) switch (action.type) { case ActionType.extraEditorChange: return {