mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Basic project stats.
This commit is contained in:
1 parent
90ce6093d8
commit
fb3bcf3b8f
2 files changed
+24
No files matched your search
@@ -1013,6 +1013,15 @@ class Project:
|
||||
raise e
|
||||
return new_node
|
||||
|
||||
def stats(self):
|
||||
|
||||
return {
|
||||
"nodes": len(self._nodes),
|
||||
"links": len(self._links),
|
||||
"drawings": len(self._drawings),
|
||||
"snapshots": len(self._snapshots)
|
||||
}
|
||||
|
||||
def __json__(self):
|
||||
return {
|
||||
"name": self._name,
|
||||
|
||||
Reference in new issue
Block a user