Commit 7514d52f by Bence Dányi

firewall_gui: display hosts belonging to hostgroup

parent e655ed8a
...@@ -73,3 +73,11 @@ ...@@ -73,3 +73,11 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="span12">
<h3>Hosts belonging to this hostgroup</h3>
<div class="well well-small">
<span class="label label-info" ng-repeat="host in entity.hosts">
<a href="#/hosts/{{host.id}}">{{host.name}}</a>
</span>
</div>
</div>
...@@ -365,6 +365,10 @@ def show_hostgroup(request, id): ...@@ -365,6 +365,10 @@ def show_hostgroup(request, id):
}, },
'created_at': group.created_at.isoformat(), 'created_at': group.created_at.isoformat(),
'modified_at': group.modified_at.isoformat(), 'modified_at': group.modified_at.isoformat(),
'hosts': [{
'id': host.id,
'name': host.hostname
} for host in group.host_set.all()],
'rules': [{ 'rules': [{
'id': rule.id, 'id': rule.id,
'direction': rule.get_direction_display(), 'direction': rule.get_direction_display(),
......
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