Skip to content

Commit

Permalink
allow IP address in CIDR notation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkn committed Jun 23, 2013
1 parent 9fb32ed commit 9e4a6f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lwp.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def edit(container=None):

if request.method == 'POST':
cfg = lwp.get_container_settings(container)
ip_regex = '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'
ip_regex = '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|[12]?[0-9]))?'
info = lxc.info(container)

form = {}
Expand Down
2 changes: 1 addition & 1 deletion templates/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h3 class="head">{{ container|capitalize }}</small>
<div class="control-group">
<label class="control-label" for="inputIPaddress">IP address</label>
<div class="controls">
<input pattern="(^25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?$)|(^Undefined$)" type="text" id="inputIPadress" name="ipaddress" value="{{ settings.ipv4 }}" placeholder="Undefined">
<input pattern="(^25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/(3[0-2]|[12]?[0-9]))?$|(^Undefined$)" type="text" id="inputIPadress" name="ipaddress" value="{{ settings.ipv4 }}" placeholder="Undefined">
</div>
</div>
</div>
Expand Down

0 comments on commit 9e4a6f8

Please sign in to comment.