# Node-red-contrib-ui-level

**URL:** <https://discourse.nodered.org/t/node-red-contrib-ui-level/22334>\
**Category:** Dashboard\
**Created:** [27 February 2020 16:32 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334 "2020-02-27T16:32:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![olab](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@olab](https://discourse.nodered.org/u/olab)\
**Post date:** [27 February 2020 16:32 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/1 "2020-02-27T16:32:08Z")

</div>

I have been struggerling with the node-red-contrib-ui-level for a while now and I can't se why this is not working properly.

I use the latest release of both Node Red and node-red-contrib-ui-level.

After deploying the project, everything is working fine but after a while or switching dashboard the values for seqments and max/min disappear. I'm using msg.control to control this values.

Can someone please help? ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/0/4081f0a39cb9b7367bbf5b47214e7fb6c3519173.png) ![Capture1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/9/e9f4ee96e73d6fc0bef40c9ed194a63c8f564ba3.png)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [27 February 2020 16:38 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/2 "2020-02-27T16:38:33Z")

</div>

Hi, what browser you are using?  
And what do you mean by "switching dashboard" ?

---

<div class="post-metadata">

**Author:** ![olab](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@olab](https://discourse.nodered.org/u/olab)\
**Post date:** [27 February 2020 16:41 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/3 "2020-02-27T16:41:54Z")

</div>

Hi, Thank you for quick response...

I'm using Chrome Browser.

By switching dashboard I mean switching to another tab and then back to the one containing the level indicators. After doing so teh values is gone...

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [27 February 2020 16:57 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/4 "2020-02-27T16:57:20Z")

</div>

This is expected behavior. If you change widget options on fly, those changes are not permanent.  
To get your last options back after tab change, use `ui_control` node. `ui-control` node fires message on every new dashboard connection as well as at every tab change. This way you can collect last known option data and send it to the ui-level node right after such events happen so the ui-level will be always with up to date options.

Example flow:

```auto
[{"id":"29e44bca.6d2594","type":"inject","z":"5f1bed63.cb2a94","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"onceDelay":"0.62","x":200,"y":170,"wires":[["158f5773.e739c9"]]},{"id":"158f5773.e739c9","type":"random","z":"5f1bed63.cb2a94","name":"","low":"1","high":"10","inte":"true","property":"payload","x":360,"y":170,"wires":[["8e83f123.8bd27"]]},{"id":"8e83f123.8bd27","type":"ui_level","z":"5f1bed63.cb2a94","group":"e6872d71.b8a78","order":2,"width":"3","height":"5","name":"","label":"","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"10","segWarn":"2","segHigh":"8","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"peaktime":3000,"x":600,"y":170,"wires":[]},{"id":"eb0fdb28.9d0af8","type":"change","z":"5f1bed63.cb2a94","name":"change ui-level options","rules":[{"t":"set","p":"control.seg2","pt":"msg","to":"6","tot":"num"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":90,"wires":[["8e83f123.8bd27"]]},{"id":"cd17881c.b82f98","type":"inject","z":"5f1bed63.cb2a94","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":110,"wires":[["eb0fdb28.9d0af8"]]},{"id":"7067bfc4.a1657","type":"ui_ui_control","z":"5f1bed63.cb2a94","name":"","events":"all","x":180,"y":50,"wires":[["eb0fdb28.9d0af8"]]},{"id":"e6872d71.b8a78","type":"ui_group","z":"","name":"Default","tab":"8fcdaa26.bd37d8","disp":true,"width":16,"collapse":false},{"id":"8fcdaa26.bd37d8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [27 February 2020 17:51 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/5 "2020-02-27T17:51:38Z")

</div>

Actually I see there is something wrong. Change with ui\_control does not happen always. At least for me right now, with just updated node-red.. I will investigate tomorrow. If you are seeing similar issues, feel free to report here or at widget github page.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [27 February 2020 18:49 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/6 "2020-02-27T18:49:51Z")

</div>

Actually I was too lazy to wait til tomorrow.  
`v0.1.24` is available and fixes `msg.control` issues

> **[node-red-contrib-ui-level](https://flows.nodered.org/node/node-red-contrib-ui-level)**
>
> A Node Red dashboard ui node. Linear level indicator

---

<div class="post-metadata">

**Author:** ![olab](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@olab](https://discourse.nodered.org/u/olab)\
**Post date:** [27 February 2020 19:49 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/7 "2020-02-27T19:49:32Z")

</div>

This is awsome!!  
Thank you for your support.

BTW. Would it be possible to rotate the value 90 degrees?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [27 February 2020 19:52 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/8 "2020-02-27T19:52:00Z")

</div>

For vertical layout?  
If you adjust widget size 1 unit width , then it should turn value 90 degrees. (called slim layout)  
But not for wider layouts. (at least currently)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [28 March 2020 19:52 UTC](https://discourse.nodered.org/t/node-red-contrib-ui-level/22334/9 "2020-03-28T19:52:07Z")

</div>

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