mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
API endpoint to get the locked status of a project
This commit is contained in:
1 parent
3014bd0216
commit
27debfff8d
3 files changed
+29
-1
No files matched your search
@@ -1144,6 +1144,21 @@ class Project:
|
||||
self.emit_notification("node.updated", node.asdict())
|
||||
self.dump()
|
||||
|
||||
@property
|
||||
@open_required
|
||||
def locked(self):
|
||||
"""
|
||||
Check if all items in a project are locked and not
|
||||
"""
|
||||
|
||||
for drawing in self._drawings.values():
|
||||
if not drawing.locked:
|
||||
return False
|
||||
for node in self.nodes.values():
|
||||
if not node.locked:
|
||||
return False
|
||||
return True
|
||||
|
||||
def dump(self):
|
||||
"""
|
||||
Dump topology to disk
|
||||
|
||||
Reference in new issue
Block a user