[Help with this] Node that lists the dashboard menu

I've been looking at how to get the dashboard menu list for a couple of days to get the array that lists the tabs to create the addresses.
Whenever I want to access a tab, I must use the index in which it is placed of the type "http: // localhost: 1880 / ui / #! / 0" or "http: // localhost: 1880 / ui / #! / 1"

I wanted to create an html with several tabs of my dashboard, but the control node did not serve me for the task. I changed all the browser tabs at once

Finally, I found the "menu" variable among the whole code
And I added it to the return
image

I thought that I would literally return the entire menu and just have to filter the object

So based on the node ui control, create my own for the task

So, once created, I did not know how to incorporate it, and it gave me to find all the nodes of my control, copy them and change the name to that of my node. I have already verified that it does not change much...I would appreciate giving you the correct way to install this on the dashboard, since finally it is very useful


After creating the node, the message is compiled and is as follows
image
image
image

Choose to repeat one to do tests.
Then only the first index with that name will be chosen

To test the node's utility, do the following:


And as a result, I can access my dashboard through iframes, open different pages without changing everything directly with the control ui and also create a dynamic url simply putting the name of our tab

All the tips are well received, (especially the publication and correct installation of this function) and I also think that this function would be quite useful in the dashboard

1 Like

So if we added a menu event that fired on dashboard startup (ie when the menu gets created) that reported the index : name of each item - would that make your life easier ?

Yes, that should help me. In this way I can access each Dashboard tab through the name ignoring its position in the array
With the ui Control, this was not possible
Now I could create several screens or iframes with different information

Thanks for answering

Hi @Nxito,
is there a "ui listmenu" node somewhere to download?
Thx

unfortunately I have not published the node and I would not know how to do it correctly
you have above how to create it

OK,I will try.
Thx

Hi @Nxito,
I used your contribution on dynamically constructing a dashboard tab URL and rendering the tab into an iFrame. It works well, thank you!

I was trying to get the list of dashboard tabs by using Node-red's "GET / Flows" admin API. It returns a full array which I can filter by type="ui_tab", and then use the "order" property each tab to determine the tab Id.
However, the "order" property is the enumerator of the tab in the editor, whereas the tab id is the order in the visible runtime menu (which does not include hidden, disabled or empty tabs). Hence the actual tab id can be smaller than the order property.
image

image

image

Do you have any idea how to get the actual tab id? Does node you describe in this discussion return the correct Id, and if so, can you share the JS code?
Thanks,
Omri