Skip to content

Commit

Permalink
feat: Update nav bar with new data information architecture for SQL L…
Browse files Browse the repository at this point in the history
…ab + SQL (#21245)
  • Loading branch information
hughhhh authored Sep 8, 2022
1 parent 8c2719b commit b302818
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
1 change: 1 addition & 0 deletions superset-frontend/src/views/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
46 changes: 24 additions & 22 deletions superset/initialization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,16 @@ def init_views(self) -> None:
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",
Expand All @@ -251,6 +261,16 @@ def init_views(self) -> None:
category="",
category_icon="",
)

appbuilder.add_link(
"Datasets",
label=__("Datasets"),
href="/tablemodelview/list/",
icon="fa-table",
category="",
category_icon="",
)

appbuilder.add_view(
DynamicPluginsView,
"Plugins",
Expand Down Expand Up @@ -328,18 +348,19 @@ def init_views(self) -> None:
)
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",
Expand All @@ -348,27 +369,8 @@ def init_views(self) -> None:
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(
Expand Down

0 comments on commit b302818

Please sign in to comment.