Skip to content

Commit

Permalink
Merge branch 'release/2.1rc1'
Browse files Browse the repository at this point in the history
* release/2.1rc1:
  Fiz #26. Form was not correctly cleaning healthcheck data and sending incorrect parameters to networkapi.
  Update requirements.txt
  update requirements.txt
  update requirements.txt
  updated ServerPool layout, datatable, js
  Alterando config
  • Loading branch information
Marcus Vinicius Goncalves Cesario committed Apr 6, 2015
2 parents c397576 + 467b756 commit 915c20c
Show file tree
Hide file tree
Showing 16 changed files with 675 additions and 203 deletions.
20 changes: 16 additions & 4 deletions CadVlan/Pool/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@

class PoolForm(forms.Form):

def __init__(self, env_choices, choices_opvip, choices_healthcheck, *args, **kwargs):
def __init__(self, env_choices, choices_opvip, *args, **kwargs):
super(PoolForm, self).__init__(*args, **kwargs)


self.fields['environment'].choices = env_choices
self.fields['balancing'].choices = choices_opvip
self.fields['healthcheck'].choices = choices_healthcheck

identifier = forms.CharField(label=u'Identifier', min_length=3, max_length=40, required=True,
error_messages=error_messages, widget=forms.TextInput(attrs={'style': "width: 300px"}))
Expand All @@ -38,8 +37,7 @@ def __init__(self, env_choices, choices_opvip, choices_healthcheck, *args, **kwa
error_messages=error_messages, widget=forms.Select(attrs={'style': "width: 310px"}))
balancing = forms.ChoiceField(label=u'Balanceamento', choices=[], required=True,
error_messages=error_messages, widget=forms.Select(attrs={'style': "width: 310px"}))
healthcheck = forms.ChoiceField(label=u'HealthCheck', choices=[], required=True,
error_messages=error_messages, widget=forms.Select(attrs={'style': "width: 310px"}))



class SearchPoolForm(forms.Form):
Expand All @@ -60,3 +58,17 @@ def __init__(self, environment_list, *args, **kwargs):
error_messages=error_messages,
widget=forms.Select(attrs={"style": "width: 300px"})
)


class PoolFormEdit(forms.Form):

def __init__(self, choices_opvip, *args, **kwargs):

super(PoolFormEdit, self).__init__(*args, **kwargs)

self.fields['balancing'].choices = choices_opvip

default_port = forms.CharField(label=u'Default Port', min_length=2, max_length=5, required=True,
error_messages=error_messages, widget=forms.TextInput(attrs={'style': "width: 100px"}))
balancing = forms.ChoiceField(label=u'Balanceamento', choices=[], required=True,
error_messages=error_messages, widget=forms.Select(attrs={'style': "width: 310px"}))
Loading

0 comments on commit 915c20c

Please sign in to comment.