Hi everyone... I'm finding that if I constrain a dashboard group to only one flow, any spacing I build into the layout of dashboard elements gets lost every time flows are restarted. Well, the spacing isn't lost exactly-- while the dashboard elements will no longer be arranged as I configured them when viewing the dashboard, visiting the layout tool for the tab still shows my configured layout. And, in fact, just visiting the layout tool and then redeploying the flows is enough to restore that designed layout... at least until flows are restarted.
Is this behavior a bug, or is it actually what one should expect? If it is working as designed, a brief explanation of what is going on and why this is what one should expect would be very much appreciated! Thank you.
Detailed steps to reproduce:
- Create a dashboard tab and name it "Example"
- Create a group in that tab and name it "Demo"
- Create a new flow and name it "Test Flow"
- Add three dashboard button nodes to Test Flow. Configure their dimensions to be 1x1 to be in the dashboard group "Demo", on the tab "Example".
- On the Layout tab of the dashboard manager, click the button "layout" that appears when hovering the mouse over the entry for the tab "Example"
- Arrange the buttons on the dashboard-- the exact arrangement matters little, just be sure to leave empty space between the buttons.
- Press Done to close the dashboard layout tool and then deploy the flows
- Visit the Example tab of the dashboard. You'll see the Demo group contains three buttons, spaced as you configured in the layout tool
- Return to the flows editor and click the "edit" button that appears when hovering over the Demo group entry
- In the bottom right corner of the properties editor for the dashboard group node, change the flow restriction from "On all flows" to just "Test Flow"
- Press update to close the properties editor and then deploy the flows.
- Visit the Example tab in the dashboard again. Now you'll see that all the dashboard elements have lost the spacing with which they'd been configured in the layout tool.
- Back in the flows editor, open the layout editing tool for the Example tab. You'll see the layout you previous designed is still shown there.
- Without changing anything press Done to close the layout tool and then deploy the flows again.
- Visit the Example tab in the dashboard and you'll see that your layout spacing has been restored.
- Restart the deployed flows (choose the "Restart Flows" option of the Deploy button)
- If you once again visit the Example tab in the dashboard, you'll see that the designed layout has again been lost.
- The layout tool for the Example tab will show that the dashboard group's configuration still includes the spaced-out layout you designed in step 6. In fact, visiting the layout tool and closing it without making any changes is enough to restore the correct layout to the dashboard the next time you deploy flows.
- If you go back into the properties of the group Demo and change the flow constraint back to "On all flows" and redeploy, it will restore the configured layout of the dashboard once again and this layout will be preserved across flow and Node-Red restarts.