Skip to content

Commit 50765eb

Browse files
authored
Enable test connection in UI if explicitly set to Enabled (#33342)
Following up PR #32052 the test connection is disabled in UI, API and CLI. The API and CLI strictly check for the config value to be set as `Enabled` for the functionality to be enabled, whereas the UI just checks that is it not set to `Disabled`. As a result setting values to the config param other than `Disabled`, enables the button in the UI. Even though the button gets enabled, the API forbids it as there is a strict check in the API that the value is set to `Enabled` and only then allows, however, it makes sense to also strictly check in the UI that value is set to `Enabled`.
1 parent 1822959 commit 50765eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

airflow/www/static/js/connection_form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function handleTestConnection(connectionType, testableConnections) {
135135
$(testButton).hide();
136136
return;
137137
}
138-
if (configTestConnection === "disabled") {
138+
if (configTestConnection !== "enabled") {
139139
// If test connection is not enabled in config, disable button and display toolip
140140
// alerting the user.
141141
$(testButton)

0 commit comments

Comments
 (0)