UI: fix purge bug

This commit is contained in:
Romain Bazile 2020-12-15 21:53:06 +01:00
parent 977c134e06
commit 44464a35cf

View file

@ -7279,7 +7279,7 @@
"id": "4a8cb5d4.52e4bc", "id": "4a8cb5d4.52e4bc",
"type": "exec", "type": "exec",
"z": "1371dec5.76e671", "z": "1371dec5.76e671",
"command": "rm -r /home/pi/data/img /home/pi/data/objects /home/pi/data/export", "command": "rm -rf /home/pi/data/img /home/pi/data/objects /home/pi/data/export",
"addpay": false, "addpay": false,
"append": "", "append": "",
"useSpawn": "false", "useSpawn": "false",
@ -7289,11 +7289,11 @@
"x": 680, "x": 680,
"y": 980, "y": 980,
"wires": [ "wires": [
[],
[],
[ [
"c5b1e763.d1bba8" "c5b1e763.d1bba8"
] ],
[],
[]
] ]
}, },
{ {
@ -8419,7 +8419,7 @@
"z": "f21ba04.c26266", "z": "f21ba04.c26266",
"name": "", "name": "",
"group": "9e409235.73cd7", "group": "9e409235.73cd7",
"order": 6, "order": 8,
"width": 0, "width": 0,
"height": 0, "height": 0,
"passthru": false, "passthru": false,
@ -8444,7 +8444,7 @@
"type": "function", "type": "function",
"z": "1371dec5.76e671", "z": "1371dec5.76e671",
"name": "error message", "name": "error message",
"func": "switch (msg.payload.code){\ncase 0:\n msg.payload = \"/home/pi/data was purged successfully!\";\n break;\ndefault:\n msg.payload = \"There was an error! The error code is \" + msg.payload.code;\n break;\n}\nreturn msg;", "func": "// TODO revoir cette partie\n\nswitch (msg.rc.code){\ncase 0:\n msg.payload = \"/home/pi/data was purged successfully!\";\n break;\ndefault:\n msg.payload = \"There was an error! The error is \" + msg.rc.message;\n break;\n}\nreturn msg;",
"outputs": 1, "outputs": 1,
"noerr": 0, "noerr": 0,
"initialize": "", "initialize": "",