Skip to content

Commit

Permalink
BaseApi -> BaseSupersetApi, add statsd
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrag1 committed Jan 27, 2023
1 parent f232a5d commit 5ac29ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions superset/datasource/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@
# under the License.
import logging

from flask_appbuilder.api import BaseApi, expose, protect, safe
from flask_appbuilder.api import expose, protect, safe

from superset import app, db, event_logger
from superset.dao.exceptions import DatasourceNotFound, DatasourceTypeNotSupportedError
from superset.datasource.dao import DatasourceDAO
from superset.exceptions import SupersetSecurityException
from superset.superset_typing import FlaskResponse
from superset.utils.core import apply_max_row_limit, DatasourceType
from superset.views.base_api import BaseSupersetApi, statsd_metrics

logger = logging.getLogger(__name__)


class DatasourceRestApi(BaseApi):
class DatasourceRestApi(BaseSupersetApi):
allow_browser_login = True
class_permission_name = "Datasource"
resource_name = "datasource"
Expand All @@ -40,6 +41,7 @@ class DatasourceRestApi(BaseApi):
)
@protect()
@safe
@statsd_metrics
@event_logger.log_this_with_context(
action=lambda self, *args, **kwargs: f"{self.__class__.__name__}"
f".get_column_values",
Expand Down

0 comments on commit 5ac29ca

Please sign in to comment.