cb149 opened a new issue #19386: URL: https://github.com/apache/airflow/issues/19386
### Apache Airflow version 2.2.0 ### Operating System Ubuntu ### Versions of Apache Airflow Providers _No response_ ### Deployment Other ### Deployment details airflow standalone ### What happened Relabeling of fields in **Add Connection** never gets reverted, so switching connection types results in the form showing wrong field names. ### What you expected to happen Changing connection type while adding a connection should show the fields/fieldnames for that connection. ### How to reproduce 1. Install microsoft-azure and docker provider package (or any provider package that has relabeling) 2. Click **Add a new record** in the Connections UI 3. This will default to connection type Azure 4. Change connection type to HTTP or other connection with Login and/or Password 5. Login and Password fields now show as Azure Client ID and Azure Secret 6. Change connection type to Docker 7. Change connection type to HTTP again 8. Host will now show as Registry URL, Login will show Username and Password fields still shows Azure Secret ### Anything else If I am not mistaken, the issues is with the code in [connection_form.js](https://github.com/apache/airflow/blob/main/airflow/www/static/js/connection_form.js#L87) ```js if (connection.relabeling) { Object.keys(connection.relabeling).forEach((field) => { const label = document.querySelector(`label[for='${field}']`); label.dataset.origText = label.innerText; label.innerText = connection.relabeling[field]; }); } ``` and there should probably be a reset to the default label texts before it. Also, when trying to open a provider issue the newest available Airflow version in the version selector is 2.1.4 ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
