You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2023/08/14 09:27:03 UTC
[airflow] 01/09: Enable test connection in UI if explicitly set to `Enabled` (#33342)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-7-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit eda4bc4b87deb6095cb009825ace9bf87eead369
Author: Pankaj Koti <pa...@gmail.com>
AuthorDate: Sat Aug 12 18:57:36 2023 +0530
Enable test connection in UI if explicitly set to `Enabled` (#33342)
Following up PR https://github.com/apache/airflow/pull/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`.
(cherry picked from commit 50765eb0883652c16b40d69d8a1ac78096646610)
---
airflow/www/static/js/connection_form.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/www/static/js/connection_form.js b/airflow/www/static/js/connection_form.js
index 453be58411..2451da05a3 100644
--- a/airflow/www/static/js/connection_form.js
+++ b/airflow/www/static/js/connection_form.js
@@ -135,7 +135,7 @@ function handleTestConnection(connectionType, testableConnections) {
$(testButton).hide();
return;
}
- if (configTestConnection === "disabled") {
+ if (configTestConnection !== "enabled") {
// If test connection is not enabled in config, disable button and display toolip
// alerting the user.
$(testButton)