potiuk commented on a change in pull request #12837:
URL: https://github.com/apache/airflow/pull/12837#discussion_r537079296
##########
File path: airflow/www/forms.py
##########
@@ -230,14 +236,14 @@ class ConnectionForm(DynamicForm):
port = IntegerField(lazy_gettext('Port'), validators=[Optional()],
widget=BS3TextFieldWidget())
extra = TextAreaField(lazy_gettext('Extra'),
widget=BS3TextAreaFieldWidget())
- # You should add connection form fields in the hooks via
get_connection_form_widgets() method
- # See for example airflow/providers/jdbc/hooks/jdbc.py
- # It is esed to customized the form, the forms elements get rendered
- # and results are stored in the extra field as json. All of these
- # need to be prefixed with extra__ and then the conn_type ___ as in
- # extra__{conn_type}__name. You can also hide form elements and rename
- # others from the connection_form.js file
+ # Used to store a dictionary of field customizations used to dynamically
change available
+ # fields in ConnectionForm based on type of connection chosen
+ field_parameters = HiddenField(
+ lazy_gettext('field_parameters'),
default=json.dumps(_get_field_customizations())
+ )
Review comment:
Yep. Good one. Will try 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.
For queries about this service, please contact Infrastructure at:
[email protected]