Commit f69117b2 by Bence Dányi

firewall_gui: show snat_to field of vlan

parent d00fee67
......@@ -60,8 +60,6 @@
<span class="help-inline" ng-bind="getError('owner')"></span>
</div>
</div>
</div>
<div class="span5">
<div class="control-group" ng-class="hasError('interface')">
<label class="control-label" for="interface">Interface</label>
<div class="controls">
......@@ -69,6 +67,8 @@
<span class="help-inline" ng-bind="getError('interface')"></span>
</div>
</div>
</div>
<div class="span5">
<div class="control-group" ng-class="hasError('domain')">
<label class="control-label" for="domain">Domain</label>
<div class="controls">
......@@ -107,6 +107,22 @@
<span class="help-inline" ng-bind="getError('dhcp_pool')"></span>
</div>
</div>
<div class="control-group" ng-class="hasError('vlans')">
<label class="control-label" for="hostgroups">NAT to (?)</label>
<div class="controls">
<div class="well well-small">
<span class="label label-info" ng-repeat="vlan in entity.vlans | filter: destroyed">
<a href="#/vlans/{{vlan.id}}">{{vlan.name}}</a>
<a href ng-click="removeVlan(vlan)"><i class="icon-remove"></i></a>
</span>
</div>
<div class="input-append">
<input class="span2 vlan" id="vlan" type="text" ng-model="newVlan">
<button class="btn" type="button" ng-click="addVlan(newVlan)">Add</button>
<span class="help-inline" ng-bind="getError('vlans')"></span>
</div>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn" ng-click="save()">Save</button>
......
......@@ -288,7 +288,11 @@ def show_vlan(request, id):
},
'accept': rule.accept,
'nat': rule.nat
} for rule in vlan.rules.all()]
} for rule in vlan.rules.all()],
'vlans': [{
'id': vlan.id,
'name': vlan.name,
} for vlan in vlan.snat_to.all()]
}
return HttpResponse(json.dumps(vlan), content_type='application/json')
......
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