# Change node: change icon based of context storage

**URL:** <https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410>\
**Category:** Feature Requests\
**Created:** [16 June 2020 13:56 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410 "2020-06-16T13:56:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 June 2020 13:56 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/1 "2020-06-16T13:56:07Z")

</div>

If you have multiple context types setup in your settings.js like this:

```auto
     	contextStorage: {
 			memory : { module: "memory" },
			default : { module: "localfilesystem" }

```

when you go to a change node you will see this  
 ![Screen Shot 2020-06-16 at 9.43.04 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/8/28a893d5d63cd9feb4ea2402f16891af3d709e7e.png)

It would nice if the icon was not displayed for those stored in memory only.

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [16 June 2020 14:12 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/2 "2020-06-16T14:12:58Z")

</div>

I'm curious to know what is the reasoning for this request? Memory is a context storage as well even if it's not persistent.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 June 2020 15:25 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/3 "2020-06-16T15:25:44Z")

</div>

I's possible (granted not a good idea) to have two storage types with the same name. In that case you coudn't tell them apart. But more than that say you called them storage1 and storage2, it wouldn't be easy to tell which went to which storage. I just think it would be easier at a quick glance to tell the diffrence.

---

<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:** [16 June 2020 15:30 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/4 "2020-06-16T15:30:58Z")

</div>

It always was the plan to have different icons for the stores... just never quite happened. So yes, we should make sure it isn't forgotten again.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 June 2020 15:49 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/5 "2020-06-16T15:49:19Z")

</div>

I did look thru the Font Awesome (4.7) icons and didn't find one that jumped out at me to represent 'memory' or I would have mentoned it. That's why I suggest leaving it blank when it is 'memory'

---

<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:** [16 June 2020 15:51 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/6 "2020-06-16T15:51:42Z")

</div>

There is always fa-microchip ?

---

<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:** [16 June 2020 16:07 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/7 "2020-06-16T16:07:09Z")

</div>

The more general point is that anyone could write a context storage plugin. So in theory each may want to provide its own icon. That's where it becomes a bit more involved then just hardcoding a pair of icons for the context stores we happen to provide.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [16 June 2020 19:02 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/8 "2020-06-16T19:02:40Z")

</div>

> [@knolleary](#):
>
> So in theory each may want to provide its own icon

would it be practical to set the icon by the user as a module config setting, which would overwrite the default icon?

```auto
 contextStorage: {
      default: "memoryOnly",
    memoryOnly: { module: 'memory',
          config: {
                  icon: fa-microchip
                  }, 
         },
          file: { module: 'localfilesystem',
          config: {
                  icon: fa-hdd-o
                  flushInterval: '300'
                  },
          },
    },
```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 August 2020 19:02 UTC](https://discourse.nodered.org/t/change-node-change-icon-based-of-context-storage/28410/9 "2020-08-15T19:02:56Z")

</div>

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