Configuring a dashboard tab in response to a URL

I've been working on something that could help you,

Each tab of the dashboard differs from an id that depends on its position. This variable is not published in the dashboard node, so I had to publish it manually. I leave link: [Help with this] Node that lists the dashboard menu

But all this requires creating a node etc ...
basically: you can point to a dashboard url (with its id) and with the http in and out nodes
With this you can use a custom address and insert parameters.
the move is to insert the data of this node (with some variable type flow for example) and insert the address of the dashboard into an iframe within a template node (I say template, not ui-template, use the orange one)

It is a bit complicated, but this play is also serving me for multi-user panels

in short: as you see in the picture:
on line 1
you create an http url and an iframe that points to your board. the rest of the code I pass it to you

[{"id":"76a75be0.81c524","type":"ui_template","z":"dfd21047.842e8","group":"f3ffcc7c.93ed7","name":"","order":2,"width":"11","height":"6","format":"<!--div data-ng-init=\"send({payload:action()})\"></div-->\n\n<div > mi mensaje</div>   \n<div ng-bind-html=\"msg.Date\"></div>\n<div ng-bind-html=\"msg.payload\"></div>\n<div ng-bind-html=\"msg.parameter\"></div>\n<div class=\"mydiv\" ng-bind-html=\"msg.Url\" style=\"{{((msg.parameter || 0) == 123) ? 'background-color:green' : 'background-color:red'}}\"></div>\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":600,"y":540,"wires":[[]]},{"id":"6a631048.8c47f","type":"ui_template","z":"dfd21047.842e8","group":"f3ffcc7c.93ed7","name":"idpicker","order":1,"width":"0","height":"0","format":"\n\n<div id=\"idpickertable\" ng-init=\"send(action())\"><!-- it work at start-->\n\n</div>\n<script>\n\n    var url= parent.document.location.href\n    \n    \n    var obj = {\"Url\":url};\n\n    this.scope.action = function() { return obj; }\n</script>\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":140,"y":540,"wires":[["9331803c.f6a49"]]},{"id":"9331803c.f6a49","type":"function","z":"dfd21047.842e8","name":"","func":"var url= msg.Url\n\nmsg.parameter=url.split(\"/\").slice(-1)\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":540,"wires":[["76a75be0.81c524"]]},{"id":"f3ffcc7c.93ed7","type":"ui_group","z":"","name":"Tablero Resumen Produccion","tab":"f190fbe5.75de68","order":1,"disp":false,"width":"38","collapse":false},{"id":"f190fbe5.75de68","type":"ui_tab","z":"","name":"test00","icon":"dashboard","disabled":false,"hidden":false}]
1 Like