Commit 54db2c0a by Bence Dányi

firewall_gui: fix missing fields

parent d00cb31a
...@@ -116,6 +116,18 @@ ...@@ -116,6 +116,18 @@
<span class="help-inline" ng-bind="getError('address')"></span> <span class="help-inline" ng-bind="getError('address')"></span>
</div> </div>
</div> </div>
<div class="control-group" ng-class="hasError('ttl')">
<label class="control-label" for="ttl">TTL</label>
<div class="controls">
<input
type="text"
autocomplete="off"
id="ttl"
ng-model="entity.ttl"
title="Time To Live" />
<span class="help-inline" ng-bind="getError('ttl')"></span>
</div>
</div>
<div class="control-group" ng-class="hasError('description')"> <div class="control-group" ng-class="hasError('description')">
<label class="control-label" for="description">Description</label> <label class="control-label" for="description">Description</label>
<div class="controls"> <div class="controls">
......
...@@ -87,6 +87,29 @@ ...@@ -87,6 +87,29 @@
<span class="help-inline" ng-bind="getError('ipv6')"></span> <span class="help-inline" ng-bind="getError('ipv6')"></span>
</div> </div>
</div> </div>
<div class="control-group" ng-class="hasError('net4')">
<label class="control-label" for="net4">Net4</label>
<div class="controls">
<input
type="text"
id="net4"
ng-model="entity.net4"
title="Net4 address of this Vlan (with subnet mask)" />
<span class="help-inline" ng-bind="getError('net4')"></span>
</div>
</div>
<div class="control-group" ng-class="hasError('net6')">
<label class="control-label" for="net6">Net6</label>
<div class="controls">
<input
type="text"
class="input-xlarge"
id="net6"
ng-model="entity.net6"
title="Net6 address of this Vlan (with subnet mask)" />
<span class="help-inline" ng-bind="getError('net6')"></span>
</div>
</div>
<div class="control-group" ng-class="hasError('snat_ip')"> <div class="control-group" ng-class="hasError('snat_ip')">
<label class="control-label" for="snat_ip">NAT</label> <label class="control-label" for="snat_ip">NAT</label>
<div class="controls"> <div class="controls">
......
...@@ -329,6 +329,8 @@ def show_vlan(request, id=None): ...@@ -329,6 +329,8 @@ def show_vlan(request, id=None):
'name': vlan.name, 'name': vlan.name,
'ipv4': vlan.ipv4+'/'+str(vlan.prefix4), 'ipv4': vlan.ipv4+'/'+str(vlan.prefix4),
'ipv6': vlan.ipv6+'/'+str(vlan.prefix6), 'ipv6': vlan.ipv6+'/'+str(vlan.prefix6),
'net4': vlan.net4+'/'+str(vlan.prefix4),
'net6': vlan.net6+'/'+str(vlan.prefix6),
'nat': vlan.snat_ip, 'nat': vlan.snat_ip,
'description': vlan.description, 'description': vlan.description,
'comment': vlan.comment, 'comment': vlan.comment,
...@@ -676,9 +678,11 @@ def save_vlan(request): ...@@ -676,9 +678,11 @@ def save_vlan(request):
errors = {} errors = {}
vlan.vid = data['vid'] vlan.vid = data['vid']
vlan.name = data['name'] vlan.name = data['name']
vlan.ipv4 = vlan.net4 = data['ipv4'].split('/')[0] #TODO ez így nem jó! vlan.ipv4 = data['ipv4'].split('/')[0]
vlan.net4 = data['net4'].split('/')[0]
vlan.prefix4 = data['ipv4'].split('/')[1] vlan.prefix4 = data['ipv4'].split('/')[1]
vlan.ipv6 = vlan.net6 = data['ipv6'].split('/')[0] #TODO ez így nem jó! vlan.ipv6 = data['ipv6'].split('/')[0]
vlan.net6 = data['net6'].split('/')[0]
vlan.prefix6 = data['ipv6'].split('/')[1] vlan.prefix6 = data['ipv6'].split('/')[1]
vlan.snat_ip = data['nat'] vlan.snat_ip = data['nat']
vlan.description = data['description'] vlan.description = data['description']
...@@ -793,6 +797,8 @@ def save_record(request): ...@@ -793,6 +797,8 @@ def save_record(request):
record.name = data['name'] record.name = data['name']
record.ttl = data['ttl'] record.ttl = data['ttl']
record.description = data['description'] record.description = data['description']
record.type = data['type']
record.address = data['address']
set_field(record, 'owner', errors, username=data['owner']['name']) set_field(record, 'owner', errors, username=data['owner']['name'])
set_field(record, 'domain', errors, name=data['domain']['name']) set_field(record, 'domain', errors, name=data['domain']['name'])
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment