Commit fb85d493 by Bence Dányi

firewall_gui: fix record name display

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