node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

Page- / Group-List in ui-control

Open buschhardtt opened this issue 1 year ago • 7 comments

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

buschhardtt avatar Jul 27 '24 05:07 buschhardtt

Curious to understand the use case here

joepavitt avatar Jul 27 '24 08:07 joepavitt

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.

buschhardtt avatar Jul 27 '24 15:07 buschhardtt

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.

knolleary avatar Jul 29 '24 09:07 knolleary

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

joepavitt avatar Jul 29 '24 09:07 joepavitt

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

buschhardtt avatar Jul 29 '24 10:07 buschhardtt

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

andrea-tomassi avatar Aug 04 '24 07:08 andrea-tomassi

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

joepavitt avatar Aug 06 '24 08:08 joepavitt