Fixed darkmode load and save

This commit is contained in:
2025-11-23 22:28:56 +01:00
parent b1be747101
commit dd9aefa143
8 changed files with 73 additions and 48 deletions

View File

@@ -9,11 +9,12 @@ class InstancesDebugger(SingleInstance):
def render(self):
instances = self._get_instances()
nodes, edges = from_parent_child_list(instances,
id_getter=lambda x: x.get_id(),
label_getter=lambda x: x.get_prefix(),
parent_getter=lambda x: x.get_parent().get_id() if x.get_parent() else None
)
nodes, edges = from_parent_child_list(
instances,
id_getter=lambda x: f"{InstancesManager.get_session_id(x.get_session())}-{x.get_id()}",
label_getter=lambda x: x.get_prefix(),
parent_getter=lambda x: x.get_parent().get_id() if x.get_parent() else None
)
for edge in edges:
edge["color"] = "green"
edge["arrows"] = {"to": {"enabled": False, "type": "circle"}}
@@ -22,7 +23,7 @@ class InstancesDebugger(SingleInstance):
node["shape"] = "box"
vis_network = VisNetwork(self, nodes=nodes, edges=edges)
#vis_network.add_to_options(physics={"wind": {"x": 0, "y": 1}})
# vis_network.add_to_options(physics={"wind": {"x": 0, "y": 1}})
return vis_network
def _get_instances(self):