test
This commit is contained in:
@@ -103,7 +103,7 @@ class Workflow extends SerializerDeserializer<Workflow> implements ShallowData
|
||||
String? id;
|
||||
String? name;
|
||||
List<dynamic> data;
|
||||
List<dynamic> datacenter;
|
||||
List<dynamic> compute;
|
||||
List<dynamic> storage;
|
||||
List<dynamic> processing;
|
||||
List<dynamic> workflows;
|
||||
@@ -116,7 +116,7 @@ class Workflow extends SerializerDeserializer<Workflow> implements ShallowData
|
||||
this.id,
|
||||
this.name = "",
|
||||
this.data = const [],
|
||||
this.datacenter = const [],
|
||||
this.compute = const [],
|
||||
this.storage = const [],
|
||||
this.processing = const [],
|
||||
this.workflows = const [],
|
||||
@@ -138,7 +138,7 @@ class Workflow extends SerializerDeserializer<Workflow> implements ShallowData
|
||||
name: json.containsKey("name") ? json["name"] : "",
|
||||
workflows: json.containsKey("workflows") ? json["workflows"] : [],
|
||||
processing: json.containsKey("processings") ? json["processings"] : [],
|
||||
datacenter: json.containsKey("datacenters") ? json["datacenters"] : [],
|
||||
compute: json.containsKey("computes") ? json["computes"] : [],
|
||||
data: json.containsKey("datas") ? json["datas"] : [],
|
||||
scheduleActive: json.containsKey("schedule_active") ? json["schedule_active"] : false,
|
||||
storage: json.containsKey("storages") ? json["storages"] : [],
|
||||
@@ -152,7 +152,7 @@ class Workflow extends SerializerDeserializer<Workflow> implements ShallowData
|
||||
"id": id,
|
||||
"name": name,
|
||||
"datas": data,
|
||||
"datacenters" : datacenter,
|
||||
"computes" : compute,
|
||||
"storages": storage,
|
||||
"processings": processing,
|
||||
"workflows": workflows,
|
||||
@@ -497,7 +497,7 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
DataItem? data;
|
||||
ProcessingItem? processing;
|
||||
StorageItem? storage;
|
||||
DataCenterItem? datacenter;
|
||||
ComputeItem? compute;
|
||||
WorkflowItem? workflow;
|
||||
|
||||
GraphItem({
|
||||
@@ -508,7 +508,7 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
this.data,
|
||||
this.processing,
|
||||
this.storage,
|
||||
this.datacenter,
|
||||
this.compute,
|
||||
this.workflow,
|
||||
});
|
||||
|
||||
@@ -516,7 +516,7 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
if (data != null) { return data!; }
|
||||
if (processing != null) { return processing!; }
|
||||
if (storage != null) { return storage!; }
|
||||
if (datacenter != null) { return datacenter!; }
|
||||
if (compute != null) { return compute!; }
|
||||
if (workflow != null) { return workflow!; }
|
||||
return null;
|
||||
}
|
||||
@@ -542,21 +542,21 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
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());
|
||||
} else if (abs.topic == "compute") {
|
||||
compute = ComputeItem().deserialize(abs.serialize());
|
||||
} else if (abs.topic == "storage") {
|
||||
storage = StorageItem().deserialize(abs.serialize());
|
||||
} else if (abs.topic == "workflow") {
|
||||
workflow = WorkflowItem().deserialize(abs.serialize());
|
||||
} else {
|
||||
datacenter = null;
|
||||
compute = null;
|
||||
data = null;
|
||||
processing = null;
|
||||
storage = null;
|
||||
workflow = null;
|
||||
}
|
||||
} else {
|
||||
datacenter = null;
|
||||
compute = null;
|
||||
data = null;
|
||||
processing = null;
|
||||
storage = null;
|
||||
@@ -566,7 +566,7 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
|
||||
Map<String, dynamic> toDashboard() {
|
||||
Map<String, dynamic> element = {};
|
||||
for(var el in [data, processing, storage, datacenter, workflow]) {
|
||||
for(var el in [data, processing, storage, compute, workflow]) {
|
||||
if (el != null && el.getID() != "") {
|
||||
element = el.serialize();
|
||||
break;
|
||||
@@ -593,7 +593,7 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
data: json.containsKey("data") ? DataItem().deserialize(json["data"]) : null,
|
||||
processing: json.containsKey("processing") ? ProcessingItem().deserialize(json["processing"]) : null,
|
||||
storage: json.containsKey("storage") ? StorageItem().deserialize(json["storage"]) : null,
|
||||
datacenter: json.containsKey("datacenter") ? DataCenterItem().deserialize(json["datacenter"]) : null,
|
||||
compute: json.containsKey("compute") ? ComputeItem().deserialize(json["compute"]) : null,
|
||||
workflow: json.containsKey("workflow") ? WorkflowItem().deserialize(json["workflow"]) : null,
|
||||
);
|
||||
}
|
||||
@@ -605,7 +605,7 @@ class GraphItem extends SerializerDeserializer<GraphItem> {
|
||||
"data": data?.serialize(),
|
||||
"processing": processing?.serialize(),
|
||||
"storage": storage?.serialize(),
|
||||
"datacenter": datacenter?.serialize(),
|
||||
"compute": compute?.serialize(),
|
||||
"workflow": workflow?.serialize(),
|
||||
"position": position?.serialize(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user