Revision f12b3d54

b/flowspec/forms.py
145 145
        if action_value:
146 146
            try:
147 147
                assert(int(action_value))
148
                if int(action_value) < 50:
149
                    raise forms.ValidationError('Rate-limiting cannot be < 50kbps')
148 150
                return "%s" %self.cleaned_data["action_value"]
149 151
            except:
150
                raise forms.ValidationError('Rate-limiting should be an integer')
151
            if int(action_value) < 50:
152
                raise forms.ValidationError('Rate-limiting cannot be < 50kbps')
152
                raise forms.ValidationError('Rate-limiting should be an integer < 50')
153 153
        else:
154 154
            raise forms.ValidationError('Cannot be empty')
155 155

  
......
159 159
            raise forms.ValidationError('Cannot select something other than rate-limit')
160 160
        else:
161 161
            return self.cleaned_data["action"]
162
    
162 163

  
163 164
class PortPlainForm(forms.ModelForm):
164 165
#    action = forms.CharField(initial='rate-limit')
b/flowspec/models.py
75 75
        return ret.rstrip(":")
76 76
    class Meta:
77 77
        db_table = u'then_action'
78
        unique_together = ("action", "action_value")
78 79

  
79 80
class Route(models.Model):
80 81
    name = models.SlugField(max_length=128)
b/templates/apply.html
148 148
}
149 149

  
150 150
.accord_wrapper{
151
	height: 100% !important;
151
	height: 452px !important;
152 152
} 
153 153

  
154 154
.help {
......
229 229
            </table>
230 230
            <div id='portsacc' style="width: 500px;">
231 231
            <h3 style="padding: 0.5em 0.5em 0.5em 0.7em;">Advanced Settings (Ports)</h3>
232
            <div class='accord_wrapper' style="height: 100% !important;">
232
            <div class='accord_wrapper' style="height: 452px !important;">
233 233
                Select source/destination port(s), or select common port(s) for both source/destination
234 234
                <table>
235 235
                <tr>

Also available in: Unified diff