Skip to content

Commit

Permalink
Hide old alert box when testing conn with different value (#31606)
Browse files Browse the repository at this point in the history
(cherry picked from commit efe8473)
  • Loading branch information
utkarsharma2 authored and Elad Kalif committed Jun 8, 2023
1 parent 2e1a06a commit 3ea0e75
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions airflow/www/static/js/connection_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ $(document).ready(() => {
}
}

function hideAlert() {
const alertBox = $(".container .row .alert");
alertBox.hide();
}

/**
* Produces JSON stringified data from a html form data
*
Expand Down Expand Up @@ -299,6 +304,7 @@ $(document).ready(() => {
// Bind click event to Test Connection button & perform an AJAX call via REST API
$("#test-connection").on("click", (e) => {
e.preventDefault();
hideAlert();
$.ajax({
url: connectionTestUrl,
type: "post",
Expand Down

0 comments on commit 3ea0e75

Please sign in to comment.