o-nikolas commented on code in PR #32052:
URL: https://github.com/apache/airflow/pull/32052#discussion_r1240093747


##########
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:
   To play the other Devil's advocate, I think complicating this config beyond 
a boolean might be over-engineering this. I think having the button there, but 
greyed out, is useful for discoverability, and I don't think folks will really 
harass the deployment manager much in reality because of it.



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to