# Dashboard List of files displayed

**URL:** https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278
**Category:** Dashboard
**Created:** [18 May 2019 17:37 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278 "2019-05-18T17:37:13Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![MrDmx1024](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@MrDmx1024](https://discourse.nodered.org/u/MrDmx1024)
#### Post date: [18 May 2019 17:37 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/1 "2019-05-18T17:37:13Z")

</div>

Does anybody know a good way to represent a list of files on the dashboard? I am getting `["fireworks.h264","heat.h264","maint.h264","test.h264"]` from a file list node and would like to show this list on the UI. I have installed the list the ui\_list package but formatting the input is getting past me.

The example for the input for the ui\_list looks like  
`[{"title":"<b>Apple</b>","description":"This is description of <font color=\"red\"><b>Apple</b></b>.","icon":"https://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Red_Apple.jpg/500px-Red_Apple.jpg"},{"title":"<b>Banana</b>","description":"This is description of <font color=\"yellow\"><b>Banana</b></font>(no picture).","icon":null},{"title":"<b>Orange</b>","description":"This is description of <font color=\"orange\"><b>Orange</b></font>.","icon":"https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Ambersweet_oranges.jpg/440px-Ambersweet_oranges.jpg"},{"title":"<b>Watermelon</b>","description":"This is description of <font color=\"green\"><b>Watermelon</b></font>.","icon":"https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Vampire_watermelon.jpg/440px-Vampire_watermelon.jpg"}]`

I just need the files listed out on the UI I dont need titles or descriptions... thoughts?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [18 May 2019 21:34 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/2 "2019-05-18T21:34:29Z")

</div>

There is a contributed list node now for Dashboard, that might help.

Otherwise, use a template and `ngRepeat` in a list or table.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [18 May 2019 22:05 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/3 "2019-05-18T22:05:30Z")

</div>

> [@TotallyInformation](#):
>
> There is a contributed list node now for Dashboard, that might help.

You mean the `ui_list` node the OP talks about trying in the question 😉

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [18 May 2019 22:07 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/4 "2019-05-18T22:07:15Z")

</div>

Oops! Missed that. Serves me right for replying while watching a favourite YouTube channel. 😊

---

<div class="post-metadata">

### Author: ![MrDmx1024](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@MrDmx1024](https://discourse.nodered.org/u/MrDmx1024)
#### Post date: [19 May 2019 03:40 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/5 "2019-05-19T03:40:48Z")

</div>

Yes I can use that list node but I am unsure how to format it from what I am getting to go into the list. So far have been unsuccessful at dumping the array. I somehow need to tag each one with a title as it comes in and output that to the list node.

---

<div class="post-metadata">

### Author: ![MrDmx1024](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@MrDmx1024](https://discourse.nodered.org/u/MrDmx1024)
#### Post date: [19 May 2019 03:42 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/6 "2019-05-19T03:42:34Z")

</div>

How would I separate all the items and add in the "description": between them before going into the list node?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [19 May 2019 09:19 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/7 "2019-05-19T09:19:49Z")

</div>

Have you looked up how to use ngRepeat? That will let you do whatever you want with the data, you can use it in a Dashboard template node.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [19 May 2019 10:46 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/8 "2019-05-19T10:46:18Z")

</div>

> [@MrDmx1024](#):
>
> ["fireworks.h264","heat.h264","maint.h264","test.h264"]

To use ui\_list you need to convert your array of strings into an array of objects as per the info box... for a simple list you just need to set the title property. so a simple function like this should do it

```
msg.payload = msg.payload.map(function(i) {
    return {title:i};
});
return msg;

```

worth reading up on the javascript array.map function - [Array.prototype.map() - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [19 May 2019 16:50 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/9 "2019-05-19T16:50:35Z")

</div>

following this... I have since updated the ui-list example node to version 0.1.5 and included that capability so now it will detect if it gets a simple array of strings and will convert them as required, so your original example should now work with the latest ui-list.

---

<div class="post-metadata">

### Author: ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)
#### Post date: [20 May 2019 22:49 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/10 "2019-05-20T22:49:05Z")

</div>

> [@dceejay](#):
>
> updated the ui-list example node to version 0.1.5

Confusion: searching in the Manage Palette dialog for "ui\_list" produces both `node-red-contrib-ui_list` and `node-red-node-ui_list`. Digging a bit deeper on GitHub, they look almost identical but have different version numbers. What's up?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [20 May 2019 22:52 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/11 "2019-05-20T22:52:59Z")

</div>

We moved it from contributed to the project directory so renamed it node. Must do housekeeping and remove contrib

---

<div class="post-metadata">

### Author: ![MrDmx1024](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@MrDmx1024](https://discourse.nodered.org/u/MrDmx1024)
#### Post date: [21 May 2019 01:38 UTC](https://discourse.nodered.org/t/dashboard-list-of-files-displayed/11278/12 "2019-05-21T01:38:32Z")

</div>

Awesome. Thank you!
