You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2022/02/10 00:17:32 UTC
[superset] 02/02: remove for testing
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch xp/db-modal-anywhere
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 73253796e09580f9e9464c468e59d9537430f351
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Feb 9 16:15:52 2022 -0800
remove for testing
---
.../src/views/CRUD/data/database/DatabaseModal/index.tsx | 9 ++++-----
superset-frontend/src/views/components/MenuRight.tsx | 12 ------------
2 files changed, 4 insertions(+), 17 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 fdfa8de..a74e944 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
@@ -135,7 +135,7 @@ interface DatabaseModalProps {
onHide: () => void;
show: boolean;
databaseId: number | undefined; // If included, will go into edit mode
- deeplinkDb: string | undefined; // if included goto step 2 with engine already set
+ setDBEngine: string | undefined; // if included goto step 2 with engine already set
}
enum ActionType {
@@ -429,9 +429,8 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
onHide,
show,
databaseId,
- deeplinkDb,
+ setDBEngine,
}) => {
- console.log(deeplinkDb);
const [db, setDB] = useReducer<
Reducer<Partial<DatabaseObject> | null, DBReducerActionType>
>(dbReducer, null);
@@ -855,9 +854,9 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
setLoading(false);
}
- if (deeplinkDb && availableDbs) {
+ if (availableDbs && setDBEngine) {
// set model if passed into props
- setDatabaseModel(deeplinkDb);
+ setDatabaseModel(setDBEngine);
}
}, [availableDbs]);
diff --git a/superset-frontend/src/views/components/MenuRight.tsx b/superset-frontend/src/views/components/MenuRight.tsx
index 43d56f3..e38df7e 100644
--- a/superset-frontend/src/views/components/MenuRight.tsx
+++ b/superset-frontend/src/views/components/MenuRight.tsx
@@ -106,18 +106,6 @@ const RightMenu = ({
const showActionDropdown = canSql || canChart || canDashboard;
return (
<StyledDiv align={align}>
- <DatabaseModal
- databaseId={null}
- show
- onHide={() => {
- console.log('hide');
- }}
- onDatabaseAdd={() => {
- console.log('adding');
- }}
- deeplinkDb={'Trino'}
- />
-
<Menu mode="horizontal">
{!navbarRight.user_is_anonymous && showActionDropdown && (
<SubMenu