chore: harmonize and clean up list views (#25961)

This commit is contained in:
Ville Brofeldt
2023-12-04 11:51:18 -08:00
committed by GitHub
parent 3ab27c6ec9
commit 0b477e3f7c
47 changed files with 785 additions and 667 deletions

View File

@@ -111,6 +111,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
include_route_methods = RouteMethod.REST_MODEL_VIEW_CRUD_SET | {
RouteMethod.EXPORT,
RouteMethod.IMPORT,
RouteMethod.RELATED,
"tables",
"table_metadata",
"table_extra_metadata",
@@ -162,6 +163,8 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
"backend",
"changed_on",
"changed_on_delta_humanized",
"changed_by.first_name",
"changed_by.last_name",
"created_by.first_name",
"created_by.last_name",
"database_name",
@@ -194,7 +197,17 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
edit_columns = add_columns
search_columns = [
"allow_file_upload",
"allow_dml",
"allow_run_async",
"created_by",
"changed_by",
"database_name",
"expose_in_sqllab",
]
search_filters = {"allow_file_upload": [DatabaseUploadEnabledFilter]}
allowed_rel_fields = {"changed_by", "created_by"}
list_select_columns = list_columns + ["extra", "sqlalchemy_uri", "password"]
order_columns = [