mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
feat: deprecate /superset/testconn and migrate to api v1 (#20002)
* feat: deprecate /superset/testconn and migrate to api v1 * bring back core_tests
This commit is contained in:
parent
87a4379d0a
commit
7b7de9592b
@ -22,7 +22,7 @@
|
||||
.append('<button id="testconn" class="btn btn-sm btn-primary">{{ _("Test Connection") }}</button>');
|
||||
$("#testconn").click(function(e) {
|
||||
e.preventDefault();
|
||||
var url = "/superset/testconn";
|
||||
var url = "/api/v1/database/test_connection";
|
||||
var csrf_token = "{{ csrf_token() if csrf_token else '' }}";
|
||||
|
||||
$.ajaxSetup({
|
||||
|
@ -1333,6 +1333,11 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
||||
@expose("/testconn", methods=["POST", "GET"])
|
||||
def testconn(self) -> FlaskResponse: # pylint: disable=no-self-use
|
||||
"""Tests a sqla connection"""
|
||||
logger.warning(
|
||||
"%s.testconn "
|
||||
"This API endpoint is deprecated and will be removed in version 3.0.0",
|
||||
self.__class__.__name__,
|
||||
)
|
||||
db_name = request.json.get("name")
|
||||
uri = request.json.get("uri")
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user