Commit fb85d493 by Bence Dányi

firewall_gui: fix record name display

parent 14a431bc
......@@ -34,7 +34,7 @@
<td>
<div class="well well-small">
<span class="label label-info" ng-repeat="record in domain.records">
<a href="#/records/{{record.id}}">{{record.name}}(#{{record.id}})</a>
<a href="#/records/{{record.id}}">{{record.name}}</a>
</span>
</div>
</td>
......
......@@ -31,7 +31,7 @@
<th colspan="2">Tulajdonos</th>
</tr>
<tr ng-repeat="record in getPage()">
<td>
<td style="max-width: 250px; overflow-x: auto;">
<a href="#/records/{{record.id}}">{{record.name}}</a>
</td>
<td>{{record.type}}</td>
......
......@@ -145,11 +145,11 @@ def list_entities(request, name):
'modified_at',
'ttl',
'description',
('records', lambda entity: [{'id':entity.id, 'name':entity.name} for entity in entity.record_set.all()]),
('records', lambda entity: [{'id':entity.id, 'name':entity.get_name()} for entity in entity.record_set.all()]),
'owner']),
'records': make_entity_lister(Record, [
'id',
'name',
('name', lambda entity: entity.get_name()),
'domain',
'host',
'type',
......@@ -546,7 +546,8 @@ def show_domain(request, id=None):
'created_at': domain.created_at.isoformat(),
'modified_at': domain.modified_at.isoformat(),
'ttl': domain.ttl,
'description': domain.description
'description': domain.description,
}
except:
domain = {
......
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