Skip to content

Commit

Permalink
Show additional data nodes in DAG (#1771)
Browse files Browse the repository at this point in the history
* Show additional data nodes in DAG
resolves #787

* E501

* E501

---------

Co-authored-by: Fred Lefévère-Laoide <[email protected]>
  • Loading branch information
FredLL-Avaiga and Fred Lefévère-Laoide authored Sep 10, 2024
1 parent 042d04e commit aae5778
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions taipy/gui_core/_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,28 @@ def get(self):
if scenario := core_get(data.id):
dag = scenario._get_dag()
nodes = {}
for id, node in dag.nodes.items():
entityType = _GuiCoreScenarioDagAdapter.get_entity_type(node)
for id, dag_node in dag.nodes.items():
entityType = _GuiCoreScenarioDagAdapter.get_entity_type(dag_node)
cat = nodes.get(entityType)
if cat is None:
cat = {}
nodes[entityType] = cat
cat[id] = {
"name": node.entity.get_simple_label(),
"type": node.entity.storage_type() if hasattr(node.entity, "storage_type") else None,
"name": dag_node.entity.get_simple_label(),
"type": dag_node.entity.storage_type()
if hasattr(dag_node.entity, "storage_type")
else None,
}
cat = nodes.get(DataNode.__name__)
if cat is None:
cat = {}
nodes[DataNode.__name__] = cat
for id, data_node in scenario.additional_data_nodes.items():
cat[id] = {
"name": data_node.get_simple_label(),
"type": data_node.storage_type(),
}

return [
data.id,
nodes,
Expand Down

0 comments on commit aae5778

Please sign in to comment.