Skip to content

Commit

Permalink
Add more informations in the debug status page
Browse files Browse the repository at this point in the history
* Number of VM in a project
* Number of client connected
  • Loading branch information
julien-duponchelle committed Dec 22, 2015
1 parent a0987bb commit 3104635
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
7 changes: 7 additions & 0 deletions gns3server/modules/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,13 @@ def stop_listen_queue(self, queue):

self._listeners.remove(queue)

@property
def listeners(self):
"""
List of current clients listening for event in this projects
"""
return self._listeners

@asyncio.coroutine
def list_files(self):
"""
Expand Down
18 changes: 15 additions & 3 deletions gns3server/templates/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@ <h1>
The purpose of this page is to help for GNS3 debug.

<h2>Opened projects</h2>
<ul>
<table border="1">
<tr>
<th>Name</th>
<th>ID</td>
<th>VMs</th>
<th>Clients connected</th>
</tr>
{% for project in project_manager.projects %}
<li>{{project.name}} ({{project.id}})</li>
<tr>
<td>{{project.name}}</td>
<td>{{project.id}}</td>
<td>{{project.vms|length}}</td>
<td>{{project.listeners|length}}</td>
</tr>
{% endfor %}
</ul>
</table>


<h2>Ports reserved by GNS3</h2>
<h3>TCP</h3>
Expand Down

0 comments on commit 3104635

Please sign in to comment.