Problem using ui-control

image

image

function in use

if (msg.payload === '780705') {
    node.send({ payload: { 'page': 'Neway Automações' }});

    setTimeout(function () {
        node.send({
            payload: {
                groups: {
                    show: [
                        'Neway Automações:Fitas',
                        'Neway Automações:Luzes',
                        'Neway Automações:Movimentos',
                        'Neway Automações:Servidor',
                        'Neway Automações:Entretenimento',
                        'Neway Automações:Funcionalidades',
                        'Neway Automações:Ativação Individual',
                        'Neway Automações:Alexa'
                    ]
                }
            }
        });
    }, 25);

    setTimeout(function () {
        node.send({ payload: { pages: { hide: ['Neway Automações'] } } });
    }, 50);

    setTimeout(function () {
        node.send({ payload: { pages: { show: ['Login'] } } });
    }, 75);
}

I think you need a page name for each group

msg.payload = {
    pages: {
        show: ['<Page Name>', '<Page Name>'],
        hide: ['<Page Name>']
    }
    groups: {
        show: ['<Page Name>:<Group Name>', '<Page Name>:<Group Name>'],
        hide: ['<Page Name>:<Group Name>']
    }
}

I have a PR I can get in this afternoon to help with the error reporting here: UI Control: Ensure better error reporting for ui-control when group/pages not found & update tests by joepavitt · Pull Request #633 · FlowFuse/node-red-dashboard · GitHub

I'll try and get a 1.3.1 out with it in.

A post was split to a new topic: Only pages contains a group are displayed in the sort order

Yes, I'm already adding it, but it still doesn't work when you try to run it for multiple groups.

This is not related to the "Problem using ui-control" topic, please post this either in a new GitHub issue, or in a new topic on the forum.

Apologies, I completely missed the colon :

I tried it and it works, I got the error message when the page / group did not exist. Just a thought but are all the spellings correct?

I also found that if I wanted the last page mentioned to be onscreen I had to switch to it. This may be outside of the code shown

@joepavitt

Problems resolved for creating multiple users. I still encounter some obstacles, but I'm learning to work around them until they are resolved. I still can't offer this to customers after I don't feel confident in 2.0, but I know I will be able to in a short time.

a1

Confidence in Dashboard 2.0 itself, or just where you're not as familiar with it?

I use it daily and develop components daily according to the needs of clients, hotels, hospitals here in Brazil. I'm still not able to deal with the problems enough to be able to switch from 1.0 to 2.0. These are simple things that can be confused by me as problems and just a lack of knowledge on how to use them. I try to throw everything here so that the developers mainly see it. We still have a panel dedicated to printing data when my work is 90% limited to activations. I rarely make a graph because in automation, in the line I work in, graphs are useless for almost anything other than monitoring energy consumption. I understand that this must be the main use of node-red, but I would like to make this observation. This may help to expand the use of the panel in node-red, thinking in the same proportion in terms of weighting in graphs. Here's a basic example of an interview I have... I'm not managing to align things properly in 2.0 to the point where it handles responsiveness in a memorable way like 1.0 does.

Curious - what layout type are you using on the left-side there?

I have experimented with various approaches, but currently, I am using GRID. However, I still do not fully understand how to position the elements; I feel that this skill is no longer under my control as it was in version 1.0. I believe this gap in my understanding to be the cause of my difficulties. The combination of writing the code for the element along with configuring the groups and pages is not clear to me. Nevertheless, this was never an issue before.

I published two major documentation updates on Wednesday which may help in this space:

It's worth noting though that the layout I'm seeing on that left-side doesn't look right. There is little consistency in the alignment which is surprising

All my elements follow a 1x1 or 2x1 grid, rarely deviating from this pattern, just as it was in version 1.0. Your work, when applied within its operational guidelines, fulfills its intended purpose. It is I who attempt to flexibilize things in order to implement updates without alarming clients with abrupt changes. In the examples below, we see the same 6x1 concept in 1x1 elements, yet they appear drastically different both on desktop and mobile. This is another challenge I am grappling with.

Back to roots. DB1 didn't provide option to design the page. You can only design card content. What you did is just adopted your things to have something . This is same for DB2 with exception, you can make page as you wish if you don't use ready made (grid, fixed) layout. Make it then as you wish and you are on control. Don't fight with options if they don't bring any goodies for you.

Do you point out the possibility of creating elements within widget (page-scoped) and thus positioning and making them responsive as I desire?

Something like that yes.

And if you ask if to create your own layout is easy or complicated task then there is no straight answer.

The thing starts with pen and paper and only after seeing sketches the one can say anything about the complexity. The strategy of layout depends entirely on input of designer and product owner.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.