You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pankajkoti (via GitHub)" <gi...@apache.org> on 2023/06/23 13:29:52 UTC

[GitHub] [airflow] pankajkoti commented on a diff in pull request #32052: Disable allowing by default testing of connnections in UI

pankajkoti commented on code in PR #32052:
URL: https://github.com/apache/airflow/pull/32052#discussion_r1239822050


##########
airflow/www/static/js/connection_form.js:
##########
@@ -123,6 +125,16 @@ function applyFieldBehaviours(connection) {
  */
 function handleTestConnection(connectionType, testableConnections) {
   const testButton = document.getElementById("test-connection");
+
+  if (!configTestConnectionEnabled) {
+    // If test connection is not enabled in config, disable button and display toolip
+    // alerting the user.
+    $(testButton)
+      .prop("disabled", true)
+      .attr("title", "Test connection is not enabled in config.");

Review Comment:
   okay, so maybe we can give another config param to allow removing the button altogether? 
   `remove_test_connection_button` set by default to `False` meaning this button will appear by default.
   
   And `enable_test_connection=False` would control enabling/disabling the functionality
   
   For evaluation:
   remove_test_connection_button = Priority 0
   enable_test_connection = Priority 1
   
   0 has higher priority than 1. Would that make sense?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org