New local front deployment + new args
This commit is contained in:
@@ -76,8 +76,6 @@ class WorkflowExecution extends SerializerDeserializer<WorkflowExecution> {
|
||||
@override deserialize(dynamic json) {
|
||||
try { json = json as Map<String, dynamic>;
|
||||
} catch (e) { return WorkflowExecution(); }
|
||||
print("qsdqdqssd");
|
||||
print(json);
|
||||
return WorkflowExecution(
|
||||
id: json.containsKey("id") ? json["id"] : "",
|
||||
endDate: json.containsKey("end_date") ? json["end_date"] : "",
|
||||
@@ -514,6 +512,15 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
this.workflow,
|
||||
});
|
||||
|
||||
AbstractItem? getElement() {
|
||||
if (data != null) { return data!; }
|
||||
if (processing != null) { return processing!; }
|
||||
if (storage != null) { return storage!; }
|
||||
if (datacenter != null) { return datacenter!; }
|
||||
if (workflow != null) { return workflow!; }
|
||||
return null;
|
||||
}
|
||||
|
||||
void fromDashboard(Map<String, dynamic> j) {
|
||||
id = j["id"];
|
||||
position = Position(x: j["x"], y: j["y"]);
|
||||
@@ -528,15 +535,19 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
} else if (abs.topic == "processing") {
|
||||
processing = ProcessingItem().deserialize(abs.serialize());
|
||||
processing!.model = ResourceModel().deserialize(j["element"]["resource_model"]);
|
||||
if ((j["element"] as Map<String, dynamic>).containsKey("container")) {
|
||||
processing!.container = Containered().deserialize(j["element"]["container"]);
|
||||
processing!.container?.env?.removeWhere((key, value) => key == "" || value == "");
|
||||
processing!.container?.volumes?.removeWhere((key, value) => key == "" || value == "");
|
||||
processing!.expose.removeWhere((element) => element.port == null || element.port == 0 || (element.PAT == 0 && element.path == ""));
|
||||
|
||||
}
|
||||
} else if (abs.topic == "datacenter") {
|
||||
datacenter = DataCenterItem().deserialize(abs.serialize());
|
||||
datacenter!.model = ResourceModel().deserialize(j["element"]["resource_model"]);
|
||||
} else if (abs.topic == "storage") {
|
||||
storage = StorageItem().deserialize(abs.serialize());
|
||||
storage!.model = ResourceModel().deserialize(j["element"]["resource_model"]);
|
||||
} else if (abs.topic == "workflow") {
|
||||
workflow = WorkflowItem().deserialize(abs.serialize());
|
||||
workflow!.model = ResourceModel().deserialize(j["element"]["resource_model"]);
|
||||
} else {
|
||||
datacenter = null;
|
||||
data = null;
|
||||
|
||||
Reference in New Issue
Block a user