Hello,
i try to secure a tab on my Dashboard so only the person that knows the password could work on it.
my flow for that:
[
{
"id": "fe447904.ed3c58",
"type": "function",
"z": "923d648e.9f25f8",
"d": true,
"name": "Statuswarnung",
"func": "msg.payload = \" Dieses Dashboard ist zu Aufzeichnungszwecken gesichert.\" +\"<br>Die Benutzung ist nur mit einem Passwort möglich\"+\"<br> Mit freundlichen Grüßen\"+\"<br> Chorum\"\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2200,
"y": 160,
"wires": [
[
"e8316994.2e51c",
"ed95e50b.e73a3"
]
]
},
{
"id": "e8316994.2e51c",
"type": "ui_toast",
"z": "923d648e.9f25f8",
"d": true,
"position": "prompt",
"displayTime": "3",
"highlight": "",
"sendall": true,
"outputs": 1,
"ok": "Zur Kenntnis genommen",
"cancel": "Cancel",
"raw": true,
"topic": "",
"name": "",
"x": 2410,
"y": 160,
"wires": [
[
"6873c934.b29178",
"c9b789c9.04423"
]
]
},
{
"id": "6873c934.b29178",
"type": "debug",
"z": "923d648e.9f25f8",
"d": true,
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2570,
"y": 200,
"wires": []
},
{
"id": "c9b789c9.04423",
"type": "function",
"z": "923d648e.9f25f8",
"d": true,
"name": "Rückleitung",
"func": "if(msg.payload == \"Daniela\"){\n \n}else{\n msg.Label = '<a href=\"http://http://url:1880/ui/#!/2\" >Consulter</a>'\n msg.name = \"\"\n return msg;\n}\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2590,
"y": 160,
"wires": [
[
"db68598e.236ce8",
"4dc4b335.639a54"
]
]
},
{
"id": "db68598e.236ce8",
"type": "debug",
"z": "923d648e.9f25f8",
"d": true,
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2790,
"y": 160,
"wires": []
},
{
"id": "ac13efd9.0ad9e",
"type": "ui_ui_control",
"z": "923d648e.9f25f8",
"d": true,
"name": "",
"events": "all",
"x": 1680,
"y": 160,
"wires": [
[
"aa19f118.d96f",
"ea5e681e.273a28"
]
]
},
{
"id": "aa19f118.d96f",
"type": "debug",
"z": "923d648e.9f25f8",
"d": true,
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1850,
"y": 200,
"wires": []
},
{
"id": "ea5e681e.273a28",
"type": "function",
"z": "923d648e.9f25f8",
"d": true,
"name": "Gesperrte Dashboards detecktieren",
"func": "var name = msg.name\n\n\nif(name == \"Multiscreensetup\" || name == \"W17Kamera\"){\n return msg;\n}else{\n \n}\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1940,
"y": 160,
"wires": [
[
"fe447904.ed3c58",
"c9295c6a.c19e08"
]
]
},
{
"id": "c9295c6a.c19e08",
"type": "debug",
"z": "923d648e.9f25f8",
"d": true,
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2170,
"y": 200,
"wires": []
},
{
"id": "ed95e50b.e73a3",
"type": "debug",
"z": "923d648e.9f25f8",
"d": true,
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2390,
"y": 200,
"wires": []
},
{
"id": "4dc4b335.639a54",
"type": "function",
"z": "923d648e.9f25f8",
"d": true,
"name": "Leer",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 2190,
"y": 40,
"wires": [
[
"ac13efd9.0ad9e",
"d8fe7823.b16228"
]
]
},
{
"id": "d8fe7823.b16228",
"type": "debug",
"z": "923d648e.9f25f8",
"d": true,
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2450,
"y": 40,
"wires": []
}
]
my problem is the cancel option. it should reload the page or link to another tab.
but both variants are not working.
maybe someone else can see what i am doing wrong ?
Dearly
Chorum
PS: i tested show/hide with ui_control with that payload:
that test is on an other tab for testing.
but nothing is hided