Skip to content

Commit

Permalink
fix: add back view for report reload error (apache#19522)
Browse files Browse the repository at this point in the history
* fix: add back view for report reload error

* remove print

* run black
  • Loading branch information
pkdotson authored Apr 4, 2022
1 parent c2fae82 commit 79abd23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/initialization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def init_views(self) -> None:
from superset.reports.logs.api import ReportExecutionLogRestApi
from superset.security.api import SecurityRestApi
from superset.views.access_requests import AccessRequestsModelView
from superset.views.alerts import AlertView
from superset.views.alerts import AlertView, ReportView
from superset.views.annotations import (
AnnotationLayerModelView,
AnnotationModelView,
Expand Down Expand Up @@ -445,6 +445,7 @@ def init_views(self) -> None:
and self.config["DRUID_METADATA_LINKS_ENABLED"]
),
)
appbuilder.add_view_no_menu(ReportView)
appbuilder.add_link(
"Refresh Druid Metadata",
label=__("Refresh Druid Metadata"),
Expand Down
5 changes: 5 additions & 0 deletions superset/views/alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@ def log(self, pk: int) -> FlaskResponse: # pylint: disable=unused-argument
class AlertView(BaseAlertReportView):
route_base = "/alert"
class_permission_name = "ReportSchedule"


class ReportView(BaseAlertReportView):
route_base = "/report"
class_permission_name = "ReportSchedule"

0 comments on commit 79abd23

Please sign in to comment.