# Deploy multiple widgets

**URL:** <https://discourse.nodered.org/t/deploy-multiple-widgets/85211>\
**Category:** Dashboard\
**Created:** [5 February 2024 10:26 UTC](https://discourse.nodered.org/t/deploy-multiple-widgets/85211 "2024-02-05T10:26:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheSaltydog](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@TheSaltydog](https://discourse.nodered.org/u/TheSaltydog)\
**Post date:** [5 February 2024 10:26 UTC](https://discourse.nodered.org/t/deploy-multiple-widgets/85211/1 "2024-02-05T10:26:10Z")

</div>

I am using a `node-red-contrib-ui-led` to show status of 20 different devices.

![Screenshot 2024-02-05 alle 11.21.36](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/1/21001de383d11863959c0de9bbc86632966afa47.png)

With this function I can get all devices' name and status:

```auto
const devices = global.get("devices","myStore")
for (var x in devices){
    msg.label = devices[x].name
    msg.payload = devices[x].status == 'Online' ? true : false
    node.send(msg)
}
node.done()

```

How can I deploy all the ui-led gadgets in a loop, without having to put them one-by-one on the flow?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 February 2024 11:02 UTC](https://discourse.nodered.org/t/deploy-multiple-widgets/85211/2 "2024-02-05T11:02:59Z")

</div>

> [@TheSaltydog](#):
>
> How can I deploy all the ui-led gadgets in a loop, without having to put them one-by-one on the flow?

You can't.

You can though use a template node and generate 20 elements that look like LEDs

[here](https://discourse.nodered.org/t/what-is-the-best-way-to-flash-a-dashboard-led/67588/6) is an example of 1 LED in a template. You can use the angularjs `ng-repeat` directive to create as many as you like (or just copy + paste)

---

<div class="post-metadata">

**Author:** ![TheSaltydog](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@TheSaltydog](https://discourse.nodered.org/u/TheSaltydog)\
**Post date:** [5 February 2024 11:04 UTC](https://discourse.nodered.org/t/deploy-multiple-widgets/85211/3 "2024-02-05T11:04:29Z")

</div>

> [@Steve-Mcl](#):
>
> here is an example of 1 LED

Where is it?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 February 2024 11:05 UTC](https://discourse.nodered.org/t/deploy-multiple-widgets/85211/4 "2024-02-05T11:05:21Z")

</div>

forgot to add the link - updated 👆

---

<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:** [19 February 2024 11:05 UTC](https://discourse.nodered.org/t/deploy-multiple-widgets/85211/5 "2024-02-19T11:05:58Z")

</div>

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