aboutsummaryrefslogtreecommitdiffhomepage
path: root/dummy-data
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2022-11-27 18:41:12 +0100
committerGitHub <noreply@github.com>2022-11-27 09:41:12 -0800
commit70f583c3e1d7c4bc1cca6b9c1cec6ca2e1f9e7b3 (patch)
tree4a81ec8383a9d6ee6b58138d2a5fd429c9161799 /dummy-data
parent98fe0a393970070fa04b5f37dbbb7a4c3ef82beb (diff)
downloadhomer-70f583c3e1d7c4bc1cca6b9c1cec6ca2e1f9e7b3.tar.gz
homer-70f583c3e1d7c4bc1cca6b9c1cec6ca2e1f9e7b3.tar.zst
homer-70f583c3e1d7c4bc1cca6b9c1cec6ca2e1f9e7b3.zip
Octoprint service (#324) (#560)v22.11.2
Add Octoprint service.
Diffstat (limited to 'dummy-data')
-rw-r--r--dummy-data/README.md6
-rw-r--r--dummy-data/octoprint/api/job30
-rw-r--r--dummy-data/octoprint/api/status_printer_offline-error.json26
-rw-r--r--dummy-data/octoprint/api/status_printer_offline.json26
-rw-r--r--dummy-data/octoprint/api/status_printer_operational.json26
-rw-r--r--dummy-data/octoprint/api/status_printer_printing.json30
-rw-r--r--dummy-data/octoprint/api/status_printer_printing_1of2.json30
-rw-r--r--dummy-data/octoprint/api/status_printer_printing_2of2.json30
-rw-r--r--dummy-data/octoprint/api/status_printing_completion.json30
-rw-r--r--dummy-data/speedtesttracker/api/speedtest/latest7
10 files changed, 241 insertions, 0 deletions
diff --git a/dummy-data/README.md b/dummy-data/README.md
index 6db4712..78b2243 100644
--- a/dummy-data/README.md
+++ b/dummy-data/README.md
@@ -3,6 +3,12 @@
3This directory content makes possible to test custom services cards or create a demo without actually running the service. 3This directory content makes possible to test custom services cards or create a demo without actually running the service.
4The principle is simple: save a sample output of the API used in the service in a static file in this directory. The path must be identical as the service endpoint to be used seamlessly. 4The principle is simple: save a sample output of the API used in the service in a static file in this directory. The path must be identical as the service endpoint to be used seamlessly.
5 5
6## Start the mock server to expose dummy data
7
8```sh
9yarn mock
10```
11
6## How to add a new services sample 12## How to add a new services sample
7 13
8- create a directory for your service, and any sub-folder existing in the service api path. 14- create a directory for your service, and any sub-folder existing in the service api path.
diff --git a/dummy-data/octoprint/api/job b/dummy-data/octoprint/api/job
new file mode 100644
index 0000000..c1ec6ed
--- /dev/null
+++ b/dummy-data/octoprint/api/job
@@ -0,0 +1,30 @@
1{
2 "job": {
3 "averagePrintTime": 669.3131185749999,
4 "estimatedPrintTime": 314.87566979223726,
5 "filament": {
6 "tool0": {
7 "length": 134.81171000000032,
8 "volume": 0.0
9 }
10 },
11 "file": {
12 "date": 1665547748,
13 "display": "CE3PRO_3mmX3mm Brass insert V2.gcode",
14 "name": "CE3PRO_3mmX3mm Brass insert V2.gcode",
15 "origin": "local",
16 "path": "MISC/CE3PRO_3mmX3mm Brass insert V2.gcode",
17 "size": 129581
18 },
19 "lastPrintTime": 669.3131185749999,
20 "user": "friendlyngeeks"
21 },
22 "progress": {
23 "completion": 27.456185706237797,
24 "filepos": 35578,
25 "printTime": 460,
26 "printTimeLeft": 4612,
27 "printTimeLeftOrigin": "linear"
28 },
29 "state": "Printing"
30} \ No newline at end of file
diff --git a/dummy-data/octoprint/api/status_printer_offline-error.json b/dummy-data/octoprint/api/status_printer_offline-error.json
new file mode 100644
index 0000000..10fa163
--- /dev/null
+++ b/dummy-data/octoprint/api/status_printer_offline-error.json
@@ -0,0 +1,26 @@
1{
2 "error": "SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)",
3 "job": {
4 "averagePrintTime": null,
5 "estimatedPrintTime": null,
6 "filament": null,
7 "file": {
8 "date": null,
9 "display": null,
10 "name": null,
11 "origin": null,
12 "path": null,
13 "size": null
14 },
15 "lastPrintTime": null,
16 "user": null
17 },
18 "progress": {
19 "completion": null,
20 "filepos": null,
21 "printTime": null,
22 "printTimeLeft": null,
23 "printTimeLeftOrigin": null
24 },
25 "state": "Offline after error"
26} \ No newline at end of file
diff --git a/dummy-data/octoprint/api/status_printer_offline.json b/dummy-data/octoprint/api/status_printer_offline.json
new file mode 100644
index 0000000..c733409
--- /dev/null
+++ b/dummy-data/octoprint/api/status_printer_offline.json
@@ -0,0 +1,26 @@
1{
2 "job": {
3 "estimatedPrintTime": null,
4 "filament": {
5 "length": null,
6 "volume": null
7 },
8 "file": {
9 "date": null,
10 "name": null,
11 "origin": null,
12 "path": null,
13 "size": null
14 },
15 "lastPrintTime": null,
16 "user": null
17 },
18 "progress": {
19 "completion": null,
20 "filepos": null,
21 "printTime": null,
22 "printTimeLeft": null,
23 "printTimeOrigin": null
24 },
25 "state": "Offline"
26} \ No newline at end of file
diff --git a/dummy-data/octoprint/api/status_printer_operational.json b/dummy-data/octoprint/api/status_printer_operational.json
new file mode 100644
index 0000000..993d798
--- /dev/null
+++ b/dummy-data/octoprint/api/status_printer_operational.json
@@ -0,0 +1,26 @@
1{
2 "job": {
3 "estimatedPrintTime": null,
4 "filament": {
5 "length": null,
6 "volume": null
7 },
8 "file": {
9 "date": null,
10 "name": null,
11 "origin": null,
12 "path": null,
13 "size": null
14 },
15 "lastPrintTime": null,
16 "user": null
17 },
18 "progress": {
19 "completion": null,
20 "filepos": null,
21 "printTime": null,
22 "printTimeLeft": null,
23 "printTimeOrigin": null
24 },
25 "state": "Operational"
26} \ No newline at end of file
diff --git a/dummy-data/octoprint/api/status_printer_printing.json b/dummy-data/octoprint/api/status_printer_printing.json
new file mode 100644
index 0000000..09cf3cf
--- /dev/null
+++ b/dummy-data/octoprint/api/status_printer_printing.json
@@ -0,0 +1,30 @@
1{
2 "job": {
3 "averagePrintTime": 669.3131185749999,
4 "estimatedPrintTime": 314.87566979223726,
5 "filament": {
6 "tool0": {
7 "length": 134.81171000000032,
8 "volume": 0.0
9 }
10 },
11 "file": {
12 "date": 1665547748,
13 "display": "CE3PRO_3mmX3mm Brass insert V2.gcode",
14 "name": "CE3PRO_3mmX3mm Brass insert V2.gcode",
15 "origin": "local",
16 "path": "MISC/CE3PRO_3mmX3mm Brass insert V2.gcode",
17 "size": 129581
18 },
19 "lastPrintTime": 669.3131185749999,
20 "user": "friendlyngeeks"
21 },
22 "progress": {
23 "completion": 0.1551153332664511,
24 "filepos": 201,
25 "printTime": 0,
26 "printTimeLeft": 668,
27 "printTimeLeftOrigin": "average"
28 },
29 "state": "Printing"
30} \ No newline at end of file
diff --git a/dummy-data/octoprint/api/status_printer_printing_1of2.json b/dummy-data/octoprint/api/status_printer_printing_1of2.json
new file mode 100644
index 0000000..09cf3cf
--- /dev/null
+++ b/dummy-data/octoprint/api/status_printer_printing_1of2.json
@@ -0,0 +1,30 @@
1{
2 "job": {
3 "averagePrintTime": 669.3131185749999,
4 "estimatedPrintTime": 314.87566979223726,
5 "filament": {
6 "tool0": {
7 "length": 134.81171000000032,
8 "volume": 0.0
9 }
10 },
11 "file": {
12 "date": 1665547748,
13 "display": "CE3PRO_3mmX3mm Brass insert V2.gcode",
14 "name": "CE3PRO_3mmX3mm Brass insert V2.gcode",
15 "origin": "local",
16 "path": "MISC/CE3PRO_3mmX3mm Brass insert V2.gcode",
17 "size": 129581
18 },
19 "lastPrintTime": 669.3131185749999,
20 "user": "friendlyngeeks"
21 },
22 "progress": {
23 "completion": 0.1551153332664511,
24 "filepos": 201,
25 "printTime": 0,
26 "printTimeLeft": 668,
27 "printTimeLeftOrigin": "average"
28 },
29 "state": "Printing"
30} \ No newline at end of file
diff --git a/dummy-data/octoprint/api/status_printer_printing_2of2.json b/dummy-data/octoprint/api/status_printer_printing_2of2.json
new file mode 100644
index 0000000..2acf861
--- /dev/null
+++ b/dummy-data/octoprint/api/status_printer_printing_2of2.json
@@ -0,0 +1,30 @@
1{
2 "job": {
3 "averagePrintTime": 669.3131185749999,
4 "estimatedPrintTime": 314.87566979223726,
5 "filament": {
6 "tool0": {
7 "length": 134.81171000000032,
8 "volume": 0.0
9 }
10 },
11 "file": {
12 "date": 1665547748,
13 "display": "CE3PRO_3mmX3mm Brass insert V2.gcode",
14 "name": "CE3PRO_3mmX3mm Brass insert V2.gcode",
15 "origin": "local",
16 "path": "MISC/CE3PRO_3mmX3mm Brass insert V2.gcode",
17 "size": 129581
18 },
19 "lastPrintTime": 669.3131185749999,
20 "user": "friendlyngeeks"
21 },
22 "progress": {
23 "completion": 27.456185706237797,
24 "filepos": 35578,
25 "printTime": 476,
26 "printTimeLeft": 1612,
27 "printTimeLeftOrigin": "linear"
28 },
29 "state": "Printing"
30} \ No newline at end of file
diff --git a/dummy-data/octoprint/api/status_printing_completion.json b/dummy-data/octoprint/api/status_printing_completion.json
new file mode 100644
index 0000000..55728ba
--- /dev/null
+++ b/dummy-data/octoprint/api/status_printing_completion.json
@@ -0,0 +1,30 @@
1{
2 "job": {
3 "averagePrintTime": 698.814525153,
4 "estimatedPrintTime": 314.87566979223726,
5 "filament": {
6 "tool0": {
7 "length": 134.81171000000032,
8 "volume": 0.0
9 }
10 },
11 "file": {
12 "date": 1665547748,
13 "display": "CE3PRO_3mmX3mm Brass insert V2.gcode",
14 "name": "CE3PRO_3mmX3mm Brass insert V2.gcode",
15 "origin": "local",
16 "path": "MISC/CE3PRO_3mmX3mm Brass insert V2.gcode",
17 "size": 129581
18 },
19 "lastPrintTime": 728.315931731,
20 "user": "friendlyngeeks"
21 },
22 "progress": {
23 "completion": 100.0,
24 "filepos": 129581,
25 "printTime": 728,
26 "printTimeLeft": 0,
27 "printTimeLeftOrigin": null
28 },
29 "state": "Operational"
30} \ No newline at end of file
diff --git a/dummy-data/speedtesttracker/api/speedtest/latest b/dummy-data/speedtesttracker/api/speedtest/latest
new file mode 100644
index 0000000..c8e3c1e
--- /dev/null
+++ b/dummy-data/speedtesttracker/api/speedtest/latest
@@ -0,0 +1,7 @@
1{
2 "data": {
3 "download": 42.452234,
4 "upload": 34.3948,
5 "ping": 12.9873
6 }
7} \ No newline at end of file