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/09/08 02:08:59 UTC
[superset] branch master updated: feat: Update nav bar with new data information architecture for SQL Lab + SQL (#21245)
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new b302818522 feat: Update nav bar with new data information architecture for SQL Lab + SQL (#21245)
b302818522 is described below
commit b3028185225fdc8ee3eb8b9058f3867d1a28ea86
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Wed Sep 7 19:08:46 2022 -0700
feat: Update nav bar with new data information architecture for SQL Lab + SQL (#21245)
---
superset-frontend/src/views/components/Menu.tsx | 1 +
superset/initialization/__init__.py | 46 +++++++++++++------------
2 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/superset-frontend/src/views/components/Menu.tsx b/superset-frontend/src/views/components/Menu.tsx
index 320eea4e16..1566187fe8 100644
--- a/superset-frontend/src/views/components/Menu.tsx
+++ b/superset-frontend/src/views/components/Menu.tsx
@@ -355,6 +355,7 @@ export default function MenuWrapper({ data, ...rest }: MenuProps) {
};
// Menu items that should go into settings dropdown
const settingsMenus = {
+ Data: true,
Security: true,
Manage: true,
};
diff --git a/superset/initialization/__init__.py b/superset/initialization/__init__.py
index a4dcfc9291..12d3692ac9 100644
--- a/superset/initialization/__init__.py
+++ b/superset/initialization/__init__.py
@@ -226,6 +226,16 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
href="/superset/welcome/",
cond=lambda: bool(appbuilder.app.config["LOGO_TARGET_PATH"]),
)
+
+ appbuilder.add_view(
+ DatabaseView,
+ "Databases",
+ label=__("Database Connections"),
+ icon="fa-database",
+ category="Data",
+ category_label=__("Data"),
+ )
+
appbuilder.add_view(
AnnotationLayerModelView,
"Annotation Layers",
@@ -251,6 +261,16 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
category="",
category_icon="",
)
+
+ appbuilder.add_link(
+ "Datasets",
+ label=__("Datasets"),
+ href="/tablemodelview/list/",
+ icon="fa-table",
+ category="",
+ category_icon="",
+ )
+
appbuilder.add_view(
DynamicPluginsView,
"Plugins",
@@ -328,18 +348,19 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
)
appbuilder.add_link(
"SQL Editor",
- label=_("SQL Editor"),
+ label=_("SQL Lab"),
href="/superset/sqllab/",
category_icon="fa-flask",
icon="fa-flask",
category="SQL Lab",
- category_label=__("SQL Lab"),
+ category_label=__("SQL"),
)
appbuilder.add_link(
__("Saved Queries"),
href="/savedqueryview/list/",
icon="fa-save",
category="SQL Lab",
+ category_label=__("SQL"),
)
appbuilder.add_link(
"Query Search",
@@ -348,27 +369,8 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
icon="fa-search",
category_icon="fa-flask",
category="SQL Lab",
- category_label=__("SQL Lab"),
- )
- appbuilder.add_view(
- DatabaseView,
- "Databases",
- label=__("Databases"),
- icon="fa-database",
- category="Data",
- category_label=__("Data"),
- category_icon="fa-database",
- )
- appbuilder.add_link(
- "Datasets",
- label=__("Datasets"),
- href="/tablemodelview/list/",
- icon="fa-table",
- category="Data",
- category_label=__("Data"),
- category_icon="fa-table",
+ category_label=__("SQL"),
)
- appbuilder.add_separator("Data")
appbuilder.add_api(LogRestApi)
appbuilder.add_view(