From 1341d9523bbc478313bfa9904c4bd7429f9632ff Mon Sep 17 00:00:00 2001 From: pb Date: Tue, 10 Jun 2025 12:03:40 +0200 Subject: [PATCH] commented some part of the code propagating ENV accross the workflow to store StorageProcessingGraphLink properly --- lib/models/workflow.dart | 22 +++++++++---------- .../forms/storage_processing_link_forms.dart | 5 +++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/models/workflow.dart b/lib/models/workflow.dart index 3d6b047..761c71f 100644 --- a/lib/models/workflow.dart +++ b/lib/models/workflow.dart @@ -336,22 +336,21 @@ class Graph extends SerializerDeserializer { List extParams = []; var arrows = links.where( (e) => (e.source?.id?.contains(item.id ?? "") ?? false) || (e.destination?.id?.contains(item.id ?? "") ?? false)); for (var arrow in arrows) { - for (var info in arrow.infos) { - var i = info as Map; - for (var entry in i.entries) { - if (entry.value == null) { continue; } - var varName = "LINK_${el.getName().toUpperCase().replaceAll(" ", "_")}_${entry.key.toUpperCase()}"; + /*var count = 0; + for (var info in arrow.infos) { + var i = info as StorageProcessingGraphLink; + var varName = "LINK_${el.getName().toUpperCase().replaceAll(" ", "_")}_${count}"; + count++; /*alreadySeen[varName] = (alreadySeen[varName] ?? -1) + 1; if ((alreadySeen[varName] ?? 0) > 1) { varName = "${varName}_${alreadySeen[varName]}"; - }*/ - if ((entry.value is String) && !isEnvAttr(entry.value, what2)) { - extParams.add(Param( name: varName, - attr: entry.key, value: entry.value, origin: item.id, readOnly: true)); } - } - } + if ((entry.value is String) && !isEnvAttr(entry.value, what2)) { + extParams.add(Param( name: varName, + attr: entry.key, value: entry.value, origin: item.id, readOnly: true)); + }*/ + }*/ } for ( var param in what) { if (param.attr == null) { continue; } @@ -525,6 +524,7 @@ class GraphLink extends SerializerDeserializer { destination = Position(id: j["to"]["id"], x: j["to"]["x"], y: j["to"]["y"]); style = GraphLinkStyle(); style!.fromDashboard(j["params"]); + print(j["infos"]); infos = fromListJson(j["infos"], StorageProcessingGraphLink()); env = fromListJson(j["env"], Param()); } diff --git a/lib/widgets/forms/storage_processing_link_forms.dart b/lib/widgets/forms/storage_processing_link_forms.dart index 34c9bcf..c752037 100644 --- a/lib/widgets/forms/storage_processing_link_forms.dart +++ b/lib/widgets/forms/storage_processing_link_forms.dart @@ -98,8 +98,9 @@ class StorageProcessingLinkFormsWidgetState extends State { "write": false, "source": null, "destination": null,