Scrolling Dashboard Pages

#1

I have many dashboard pages in my project. Some pages are for a specific machine, and some are for a specific department. Is there a node or solution on how to scroll through the pages on my dashboard?

Example:
Total number of pages: 25
Number of pages to be scrolled: 5
Page numbers to be scrolled: /ui/#/0, /ui/#/3, /ui/#/7, /ui/#/9, /ui/#/13

Thanks,
Mike

0 Likes

Auto shift tabs
#2

Automatically you mean ? On a timed basis like an info kiosk type display ?

Craig

0 Likes

#3

Yes, automatically scroll after a set time in seconds.

0 Likes

#4

The ui_control node can be used to control which tab is being displayed. That's your starting point for a flow that sends appropriate messages to that node at regular intervals.

0 Likes

#5

Hi Mike,

This flow should work. The function node generates a cyclic output for each of the tab numbers hard coded in the array tabs.

[{"id":"c585b65b.a49048","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"1636eb6b.9aa1c5","type":"ui_ui_control","z":"c585b65b.a49048","name":"","x":500,"y":120,"wires":[[]]},{"id":"cce3d906.6760f8","type":"inject","z":"c585b65b.a49048","name":"","topic":"","payload":"","payloadType":"date","repeat":"3","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":120,"wires":[["523a4a55.4d53a4"]]},{"id":"523a4a55.4d53a4","type":"function","z":"c585b65b.a49048","name":" [0,3,7,9,13]","func":"let tabIndex = context.get(\"tabIndex\") || 0;\nlet tabs = [0,3,7,9,13]; \n \nfunction selectNextTab() \n{\n\n    return tabs[tabIndex++] || (tabIndex=0, tabs[tabIndex++]); \n}\n\nmsg.payload =  {\"tab\" : selectNextTab()};\ncontext.set(\"tabIndex\", tabIndex);\nreturn msg;\n","outputs":1,"noerr":0,"x":310,"y":120,"wires":[["78438012.11729","1636eb6b.9aa1c5"]]},{"id":"78438012.11729","type":"debug","z":"c585b65b.a49048","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","x":510,"y":160,"wires":[]}]

0 Likes

#6

Thank you @knolleary and @Andrei! This worked perfectly.
I found another issue on my end. Like I said earlier, I have 25 tabs that show many other processes in our manufacturing plant. I have a Raspberry Pi and a TV at each process. I have the default home page of each process opening to their respective tab. Can I have each Raspberry Pi/ TV scroll the tabs that are specific for their respective process?

Example:

1.) Main Pi runs Dashboard

2.) Pi from Turning department scrolls through tabs [0,9,10,11,12,13] on Main Pi.

3.) Pi from Grinding department scrolls through tabs [1,7,8]

Thanks,
Mike

0 Likes

#7

If they are separate Pi then they are presumably running their own flows... so just customise the function in each flow to each Pi... ?

There are of course more sophisticated ways to allow the same flow to run on each and pick up and external environment number in order to customise each - but no idea if that level of sophistication is required here yet.

0 Likes

#8

You nailed it on the head @dceejay ! I am currently running a behemoth node red dashboard on one Windows PC and pointing the Raspberry Pis to the Windows PC Site. I noticed that he performance is slow on the Windows NodeRed instance, probably because I have 28 tabs.

I will export the flows that I need to each process' Pi. I will just need to create a few higher level views on the Windows PC Dashboard for mobile and Manager viewing.

Thanks,
Mike

0 Likes