feat(connection): add dedicated ssh tunnel test button
This commit is contained in:
18 files changed
+228
-21
No files matched your search
@@ -379,6 +379,7 @@ async fn main() {
|
||||
// Connection
|
||||
.route("/connection/test", post(routes::connection::test_connection))
|
||||
.route("/connection/test-info", post(routes::connection::test_connection_with_info))
|
||||
.route("/connection/test-ssh-tunnel", post(routes::connection::test_ssh_tunnel))
|
||||
.route("/connection/connect", post(routes::connection::connect_db))
|
||||
.route("/connection/database-info", post(routes::connection::connected_database_info))
|
||||
.route("/connection/database-info/save", post(routes::connection::save_connection_database_info))
|
||||
|
||||
@@ -373,6 +373,13 @@ pub async fn test_connection_with_info(
|
||||
run_temporary_connection_test(&state.app, body.config, true).await.map(Json).map_err(AppError::from)
|
||||
}
|
||||
|
||||
pub async fn test_ssh_tunnel(
|
||||
State(state): State<Arc<WebState>>,
|
||||
Json(body): Json<ConnectRequest>,
|
||||
) -> Result<Json<String>, AppError> {
|
||||
state.app.test_connection_ssh_tunnel(&body.config.canonicalized()).await.map(Json).map_err(AppError::from)
|
||||
}
|
||||
|
||||
pub async fn connect_db(
|
||||
State(state): State<Arc<WebState>>,
|
||||
headers: HeaderMap,
|
||||
|
||||
Reference in new issue
Block a user