Skip to content

Commit 254635c

Browse files
committed
feat: refactor test factory and add unit tests for constructor initialization
feat: refactor debug mode system to support multiple visualization layers feat: streamline example initialization and introduce controller extension system
1 parent bb52661 commit 254635c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4107
-2684
lines changed

packages/demo/assets/data/database_schema.json

Lines changed: 68 additions & 136 deletions
Large diffs are not rendered by default.

packages/demo/assets/data/iot_data_pipeline.json

Lines changed: 49 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
{
44
"id": "temp-sensor-1",
55
"type": "Sensor",
6-
"size": {
7-
"width": 120,
8-
"height": 170
9-
},
6+
"width": 120,
7+
"height": 170,
108
"inputPorts": [],
119
"outputPorts": [
1210
{
@@ -26,19 +24,15 @@
2624
"frequency": "1Hz",
2725
"range": "-40\u00b0C to 125\u00b0C"
2826
},
29-
"position": {
30-
"x": 100,
31-
"y": 50
32-
},
27+
"x": 100,
28+
"y": 50,
3329
"zIndex": 1
3430
},
3531
{
3632
"id": "humidity-sensor-1",
3733
"type": "Sensor",
38-
"size": {
39-
"width": 120,
40-
"height": 170
41-
},
34+
"width": 120,
35+
"height": 170,
4236
"inputPorts": [],
4337
"outputPorts": [
4438
{
@@ -58,19 +52,15 @@
5852
"frequency": "1Hz",
5953
"range": "0-100% RH"
6054
},
61-
"position": {
62-
"x": 100,
63-
"y": 150
64-
},
55+
"x": 100,
56+
"y": 150,
6557
"zIndex": 1
6658
},
6759
{
6860
"id": "motion-sensor-1",
6961
"type": "Sensor",
70-
"size": {
71-
"width": 120,
72-
"height": 170
73-
},
62+
"width": 120,
63+
"height": 170,
7464
"inputPorts": [],
7565
"outputPorts": [
7666
{
@@ -90,19 +80,15 @@
9080
"detection_range": "10m",
9181
"angle": "120\u00b0"
9282
},
93-
"position": {
94-
"x": 100,
95-
"y": 250
96-
},
83+
"x": 100,
84+
"y": 250,
9785
"zIndex": 1
9886
},
9987
{
10088
"id": "energy-meter-1",
10189
"type": "Sensor",
102-
"size": {
103-
"width": 120,
104-
"height": 170
105-
},
90+
"width": 120,
91+
"height": 170,
10692
"inputPorts": [],
10793
"outputPorts": [
10894
{
@@ -122,19 +108,15 @@
122108
"phases": 3,
123109
"accuracy": "\u00b10.5%"
124110
},
125-
"position": {
126-
"x": 100,
127-
"y": 350
128-
},
111+
"x": 100,
112+
"y": 350,
129113
"zIndex": 1
130114
},
131115
{
132116
"id": "edge-gateway",
133117
"type": "Gateway",
134-
"size": {
135-
"width": 140,
136-
"height": 170
137-
},
118+
"width": 140,
119+
"height": 170,
138120
"inputPorts": [
139121
{
140122
"id": "temp-in",
@@ -206,19 +188,15 @@
206188
"edge_compute": true,
207189
"compression": "gzip"
208190
},
209-
"position": {
210-
"x": 300,
211-
"y": 200
212-
},
191+
"x": 300,
192+
"y": 200,
213193
"zIndex": 2
214194
},
215195
{
216196
"id": "mqtt-broker",
217197
"type": "MessageBroker",
218-
"size": {
219-
"width": 140,
220-
"height": 170
221-
},
198+
"width": 140,
199+
"height": 170,
222200
"inputPorts": [
223201
{
224202
"id": "messages-in",
@@ -274,19 +252,15 @@
274252
"connections": 10000,
275253
"throughput": "100k msg/sec"
276254
},
277-
"position": {
278-
"x": 550,
279-
"y": 200
280-
},
255+
"x": 550,
256+
"y": 200,
281257
"zIndex": 3
282258
},
283259
{
284260
"id": "stream-processor",
285261
"type": "StreamProcessing",
286-
"size": {
287-
"width": 160,
288-
"height": 170
289-
},
262+
"width": 160,
263+
"height": 170,
290264
"inputPorts": [
291265
{
292266
"id": "temp-stream",
@@ -353,19 +327,15 @@
353327
"Window"
354328
]
355329
},
356-
"position": {
357-
"x": 800,
358-
"y": 100
359-
},
330+
"x": 800,
331+
"y": 100,
360332
"zIndex": 4
361333
},
362334
{
363335
"id": "time-series-db",
364336
"type": "Database",
365-
"size": {
366-
"width": 140,
367-
"height": 170
368-
},
337+
"width": 140,
338+
"height": 170,
369339
"inputPorts": [
370340
{
371341
"id": "data-in",
@@ -417,19 +387,15 @@
417387
"precision": "nanosecond",
418388
"compression": "TSM"
419389
},
420-
"position": {
421-
"x": 1050,
422-
"y": 200
423-
},
390+
"x": 1050,
391+
"y": 200,
424392
"zIndex": 5
425393
},
426394
{
427395
"id": "ml-engine",
428396
"type": "MLProcessing",
429-
"size": {
430-
"width": 140,
431-
"height": 170
432-
},
397+
"width": 140,
398+
"height": 170,
433399
"inputPorts": [
434400
{
435401
"id": "training-data",
@@ -494,19 +460,15 @@
494460
"accuracy": "94%",
495461
"inference_time": "<50ms"
496462
},
497-
"position": {
498-
"x": 800,
499-
"y": 350
500-
},
463+
"x": 800,
464+
"y": 350,
501465
"zIndex": 4
502466
},
503467
{
504468
"id": "dashboard",
505469
"type": "Visualization",
506-
"size": {
507-
"width": 140,
508-
"height": 170
509-
},
470+
"width": 140,
471+
"height": 170,
510472
"inputPorts": [
511473
{
512474
"id": "metrics-in",
@@ -558,19 +520,15 @@
558520
"alerts": 15,
559521
"users": 50
560522
},
561-
"position": {
562-
"x": 1300,
563-
"y": 100
564-
},
523+
"x": 1300,
524+
"y": 100,
565525
"zIndex": 6
566526
},
567527
{
568528
"id": "alert-manager",
569529
"type": "AlertSystem",
570-
"size": {
571-
"width": 140,
572-
"height": 170
573-
},
530+
"width": 140,
531+
"height": 170,
574532
"inputPorts": [
575533
{
576534
"id": "anomalies-in",
@@ -647,19 +605,15 @@
647605
],
648606
"deduplication": true
649607
},
650-
"position": {
651-
"x": 1050,
652-
"y": 450
653-
},
608+
"x": 1050,
609+
"y": 450,
654610
"zIndex": 5
655611
},
656612
{
657613
"id": "automation-engine",
658614
"type": "Automation",
659-
"size": {
660-
"width": 140,
661-
"height": 170
662-
},
615+
"width": 140,
616+
"height": 170,
663617
"inputPorts": [
664618
{
665619
"id": "triggers-in",
@@ -705,10 +659,8 @@
705659
],
706660
"response_time": "<100ms"
707661
},
708-
"position": {
709-
"x": 1300,
710-
"y": 350
711-
},
662+
"x": 1300,
663+
"y": 350,
712664
"zIndex": 6
713665
}
714666
],
@@ -831,4 +783,4 @@
831783
"y": -50,
832784
"zoom": 0.8
833785
}
834-
}
786+
}

0 commit comments

Comments
 (0)