mirror of https://github.com/apache/superset.git
[dashboard] fix, add config to optionally enable react replacement fo… (#9025)
* [dashboard] fix, add config to optionally enable react replacement for CRUD views * move app.config to function scope
This commit is contained in:
parent
a0cda321b7
commit
d0aab05e79
|
@ -699,6 +699,10 @@ DOCUMENTATION_URL = None
|
|||
DOCUMENTATION_TEXT = "Documentation"
|
||||
DOCUMENTATION_ICON = None # Recommended size: 16x16
|
||||
|
||||
# Enables the replacement react views for all the FAB views: list, edit, show.
|
||||
# This is a work in progress so not all features available in FAB have been implemented
|
||||
ENABLE_REACT_CRUD_VIEWS = False
|
||||
|
||||
# What is the Last N days relative in the time selector to:
|
||||
# 'today' means it is midnight (00:00:00) in the local timezone
|
||||
# 'now' means it is relative to the query issue time
|
||||
|
|
|
@ -25,7 +25,7 @@ from flask_appbuilder.security.decorators import has_access
|
|||
from flask_babel import gettext as __, lazy_gettext as _
|
||||
|
||||
import superset.models.core as models
|
||||
from superset import db, event_logger
|
||||
from superset import app, db, event_logger
|
||||
from superset.constants import RouteMethod
|
||||
from superset.utils import core as utils
|
||||
|
||||
|
@ -57,6 +57,8 @@ class DashboardModelView(
|
|||
@has_access
|
||||
@expose("/list/")
|
||||
def list(self):
|
||||
if not app.config["ENABLE_REACT_CRUD_VIEWS"]:
|
||||
return super().list()
|
||||
payload = {
|
||||
"user": bootstrap_user_data(g.user),
|
||||
"common": common_bootstrap_payload(),
|
||||
|
|
Loading…
Reference in New Issue