FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
205 stars 49 forks source link

Page- / Group-List in ui-control #1135

Open buschhardtt opened 3 months ago

buschhardtt commented 3 months ago

Description

Hallo, I would like to be able to retrieve a list of all pages and groups.

msg.payload = "getpagelist" -> ui-control -> msg.payload = "pagelist" msg.pages=[<page_name1>,<page_name2>]
msg.payload = "getgrouplist" -> ui-control -> msg.payload = "grouplist" msg.groups=[<group_name1>,<group_name2>]

Thank You Greets Thomas

Have you provided an initial effort estimate for this issue?

I am no FlowFuse team member

joepavitt commented 3 months ago

Curious to understand the use case here

buschhardtt commented 3 months ago

Ok, I have a connection from a user who is not logged in and want to hide all pages except the login page. In this case, I would need to always know all the names and must not forget (or rename) any page.

knolleary commented 3 months ago

Hi @buschhardtt

The Function node doesn't have access to the runtime apis needed to dynamically retrieve a list of the other nodes in a flow.

joepavitt commented 3 months ago

Thanks Nick, for context @buschhardtt, I asked Nick if this was possible through a function node as a short-term workaround, but it isn't.

Will need to consider if/how we incorporate this into a node for Dashboard.

I'm thinking a ui-info approach, which could also detail connected users, or something. Not sure I want to bundle this into ui-control as its not controlling anything

buschhardtt commented 3 months ago

Hallo, thank you. A ui-info node would help, maybe like the dashboard/_debug (Tab: Pages). The information is already available.

By the way, can the debug page be disabled? Thomas

andrea-tomassi commented 3 months ago

Ok, I have a connection from a user who is not logged in and want to hide all pages except the login page. In this case, I would need to always know all the names and must not forget (or rename) any page.

I had the same thoughts while approaching page authorization for logged-in users. Code maintenance could be tricky here

joepavitt commented 3 months ago

By the way, can the debug page be disabled?

Have opened a feature request for this: https://github.com/FlowFuse/node-red-dashboard/issues/1162