Skip to content

Commit

Permalink
chore: Removes old saved query code
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Aug 17, 2023
1 parent 35eb66a commit eacef0c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 216 deletions.
73 changes: 0 additions & 73 deletions superset-frontend/src/showSavedQuery/index.jsx

This file was deleted.

44 changes: 0 additions & 44 deletions superset-frontend/src/showSavedQuery/utils.js

This file was deleted.

64 changes: 0 additions & 64 deletions superset-frontend/src/showSavedQuery/utils.test.jsx

This file was deleted.

1 change: 0 additions & 1 deletion superset-frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ const config = {
spa: addPreamble('/src/views/index.tsx'),
embedded: addPreamble('/src/embedded/index.tsx'),
sqllab: addPreamble('/src/SqlLab/index.tsx'),
showSavedQuery: [path.join(APP_DIR, '/src/showSavedQuery/index.jsx')],
},
output,
stats: 'minimal',
Expand Down
2 changes: 0 additions & 2 deletions superset/initialization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ def init_views(self) -> None:
from superset.views.redirects import R
from superset.views.sql_lab.views import (
SavedQueryView,
SavedQueryViewApi,
SqlLab,
TableSchemaView,
TabStateView,
Expand Down Expand Up @@ -312,7 +311,6 @@ def init_views(self) -> None:
appbuilder.add_view_no_menu(R)
appbuilder.add_view_no_menu(ProfileView)
appbuilder.add_view_no_menu(SavedQueryView)
appbuilder.add_view_no_menu(SavedQueryViewApi)
appbuilder.add_view_no_menu(SliceAsync)
appbuilder.add_view_no_menu(SqlLab)
appbuilder.add_view_no_menu(SqlMetricInlineView)
Expand Down
32 changes: 0 additions & 32 deletions superset/views/sql_lab/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,38 +100,6 @@ def pre_update(self, item: "SavedQueryView") -> None:
self.pre_add(item)


class SavedQueryViewApi(SavedQueryView): # pylint: disable=too-many-ancestors
include_route_methods = {
RouteMethod.API_READ,
RouteMethod.API_CREATE,
RouteMethod.API_UPDATE,
RouteMethod.API_GET,
}

class_permission_name = "SavedQuery"
method_permission_name = MODEL_VIEW_RW_METHOD_PERMISSION_MAP

list_columns = [
"id",
"label",
"sqlalchemy_uri",
"user_email",
"schema",
"description",
"sql",
"extra_json",
"extra",
]
add_columns = ["label", "db_id", "schema", "description", "sql", "extra_json"]
edit_columns = add_columns
show_columns = add_columns + ["id"]

@has_access_api
@expose("show/<pk>")
def show(self, pk: int) -> FlaskResponse:
return super().show(pk)


def _get_owner_id(tab_state_id: int) -> int:
return db.session.query(TabState.user_id).filter_by(id=tab_state_id).scalar()

Expand Down

0 comments on commit eacef0c

Please sign in to comment.