# Change color on icon

**URL:** <https://discourse.nodered.org/t/change-color-on-icon/44121>\
**Category:** Dashboard\
**Created:** [13 April 2021 18:48 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121 "2021-04-13T18:48:27Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![lelle](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@lelle](https://discourse.nodered.org/u/lelle)\
**Post date:** [16 April 2021 19:34 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/21 "2021-04-16T19:34:42Z")

</div>

I have cleared the browser cache, restarted chrome: same as before.  
I tryed Edge, same result.  
I don't rememeber how I installed node-red. Followed some suggestion on internet.  
Here is the start and stop of node-red:

```auto
pi@webradio:~ $ node-red-stop

Stop Node-RED

Use node-red-start to start Node-RED again

pi@webradio:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.153.97:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
Started Node-RED graphical event wiring tool.
16 Apr 19:15:06 - [info]
Welcome to Node-RED
===================
16 Apr 19:15:06 - [info] Node-RED version: v1.3.2
16 Apr 19:15:06 - [info] Node.js version: v14.16.1
16 Apr 19:15:06 - [info] Linux 4.19.66-v7+ arm LE
16 Apr 19:15:08 - [info] Loading palette nodes
16 Apr 19:15:10 - [info] Dashboard version 2.28.2 started at /ui
16 Apr 19:15:11 - [info] Settings file : /home/pi/.node-red/settings.js
16 Apr 19:15:11 - [info] Context store : 'default' [module=memory]
16 Apr 19:15:11 - [info] User directory : /home/pi/.node-red
16 Apr 19:15:11 - [warn] Projects disabled : editorTheme.projects.enabled=false
16 Apr 19:15:11 - [info] Flows file : /home/pi/.node-red/flows_webradio.json
16 Apr 19:15:11 - [info] Server now running at http://127.0.0.1:1880/
16 Apr 19:15:11 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
16 Apr 19:15:11 - [info] Starting flows
16 Apr 19:15:11 - [info] Started flows
16 Apr 19:15:11 - [info] serial port /dev/ttyS0 opened at 9600 baud 8N1
16 Apr 19:15:12 - [info] [mpd-server:82f7baca.793ed8] Connected to MPD server localhost:6600
16 Apr 19:15:12 - [info] [mqtt-broker:a7459cab.67a5] Connected to broker: GPort@mqtt://localhost:1883
^C
pi@webradio:~ $

```

Is this not possible? ? Should I go back to backup and the old node-red ??

---

<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:** [16 April 2021 19:58 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/22 "2021-04-16T19:58:46Z")

</div>

Can you try this approach

```auto
var k = msg.payload
if (k===0) msg = {color:"#FFFF00",bgcolor:"black",icon:"fa-4x fa-spinner fa-pulse"};
if (k===1) msg = {color:"#00FF00",bgcolor:"black",icon:"fa-4x fa-download"};
if (k===2) msg = {color:"#FF0000",bgcolor:"black",icon:"fa-4x fa-upload"};
if (k===3) msg = {color:"#FF0000",bgcolor:"black",icon:"fa-4x fa-exclamation-triangle"};

/* 0=moving
    1=closed
    2=opened
    3=error */
msg.payload = k;
return msg;

```

No need to change anything else but the contents of the function node.

It is not about like I know whats wrong but I have such methods running flawlessly years now so worth of try.  
Maybe the `ui_contro`l only in message behaves not so nice for possible socket losses and re-connections.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 April 2021 20:40 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/23 "2021-04-16T20:40:19Z")

</div>

The log looks as it should, no clues as to why the dashboard tab is missing. Can you check in the developer console in your browser to see if it shows any errors?

---

<div class="post-metadata">

**Author:** ![lelle](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@lelle](https://discourse.nodered.org/u/lelle)\
**Post date:** [17 April 2021 08:40 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/24 "2021-04-17T08:40:37Z")

</div>

I will try check in the developer console in the browser!  
**hotNipi** your solution seems to work!! But I leave it till tomorrow and try then. Just to be 100%.  
Now I have increased hope!!  
Thank you for taking your time! ! !

---

<div class="post-metadata">

**Author:** ![lelle](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@lelle](https://discourse.nodered.org/u/lelle)\
**Post date:** [17 April 2021 11:30 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/25 "2021-04-17T11:30:30Z")

</div>

**hotNipi** Sorry! Not better!  
I have taken this out of developer consol in browser:

**WARN:**  
app.min.js:150  
You are using the ngTouch module.  
AngularJS Material already has mobile click, tap, and swipe support...  
ngTouch is not supported with AngularJS Material!

**FAIL:**  
:1880/ui/loading.html:1  
Failed to load resource: the server responded with a status of 404 (Not Found)

**FAIL:**  
app.min.js:150  
SideNav 'left' is not available! Did you use md-component-id='left'?  
(anonymous) @ app.min.js:150

**FAIL:**  
:1880/ui/socket.io/?EIO=3&transport=polling&t=NZUnBot:1  
Failed to load resource: net::ERR\_NETWORK\_CHANGED

**WARN:**  
DevTools failed to load SourceMap: Could not load content for [http://192.168.153.97:1880/ui/js/angular-chart.min.js.map:](http://192.168.153.97:1880/ui/js/angular-chart.min.js.map:) HTTP error: status code 404, net::ERR\_HTTP\_RESPONSE\_CODE\_FAILURE

I don't understand it, but someone perhaps can give me a clue, hopefully!

edit: Now the icon does not change either, but if I change "flow" in the left menu back and forth, then have the icon changed??!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 April 2021 12:30 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/26 "2021-04-17T12:30:10Z")

</div>

> [@lelle](#):
>
> :1880/ui/socket.io/?EIO=3&transport=polling&t=NZUnBot:1  
> Failed to load resource: net::ERR\_NETWORK\_CHANGED

I think that suggests there is something odd about the network connection between the PC and the Pi. How are they connected? Are they on the same local network?

In a terminal on the Pi what does this command show?  
`ip addr`

---

<div class="post-metadata">

**Author:** ![lelle](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@lelle](https://discourse.nodered.org/u/lelle)\
**Post date:** [17 April 2021 13:17 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/27 "2021-04-17T13:17:11Z")

</div>

They are connected in the same local network.Both my PC and Pi are connected with cable. The Pi has static adress.

pi@webradio:~ $ ip addr  
1: lo: \<LOOPBACK,UP,LOWER\_UP\> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000  
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00  
inet 127.0.0.1/8 scope host lo  
valid\_lft forever preferred\_lft forever  
inet6 ::1/128 scope host  
valid\_lft forever preferred\_lft forever  
2: eth0: \<BROADCAST,MULTICAST,UP,LOWER\_UP\> mtu 1500 qdisc pfifo\_fast state UP group default qlen 1000  
link/ether b8:27:eb:38:64:10 brd ff:ff:ff:ff:ff:ff  
inet 192.168.153.97/16 brd 192.168.255.255 scope global eth0  
valid\_lft forever preferred\_lft forever  
inet6 fe80::49a7:3642:3a53:d8b6/64 scope link  
valid\_lft forever preferred\_lft forever  
3: wlan0: \<NO-CARRIER,BROADCAST,MULTICAST,UP\> mtu 1500 qdisc pfifo\_fast state DOWN group default qlen 1000  
link/ether b8:27:eb:6d:31:45 brd ff:ff:ff:ff:ff:ff

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 April 2021 14:33 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/28 "2021-04-17T14:33:18Z")

</div>

Sorry, I am out of ideas on the missing dashboard tab. Hopefully someone else can help.

One more idea actually, have you got another machine on the network you can try to see if that one can see it?

---

<div class="post-metadata">

**Author:** ![lelle](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@lelle](https://discourse.nodered.org/u/lelle)\
**Post date:** [17 April 2021 15:37 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/29 "2021-04-17T15:37:43Z")

</div>

I tryed my mobile PC: same!  
**Colin** : Thank you for spending time with my issue.

---

<div class="post-metadata">

**Author:** ![lelle](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@lelle](https://discourse.nodered.org/u/lelle)\
**Post date:** [17 April 2021 20:27 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/30 "2021-04-17T20:27:15Z")

</div>

Ghosts ? ? ?

 ![jojo](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/58a660ee14a493500b04a09ce5372d20e46ac0f3.jpeg)  
Now I got "dashbord" in the dropdown menu ! ? ! ?  
I chosed "dashboard", "site", "option" sade "click to show side menu". I chosed "Alwayes show side menu". Deploy. and chosed "click to show side menu". And I am back!!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 April 2021 20:47 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/31 "2021-04-17T20:47:54Z")

</div>

What did you do that made it reappear?

---

<div class="post-metadata">

**Author:** ![lelle](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@lelle](https://discourse.nodered.org/u/lelle)\
**Post date:** [17 April 2021 21:08 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/32 "2021-04-17T21:08:38Z")

</div>

I took another Pi and copy the simulator-flow to the "new" Pi. Where it works !! ! (Node-red v1.2.7). This hade the "dashboard" in the dropdown menu. When I go back to the first Pi, there it was, in the dropdown menu.  
Ghosts ? ! ? I don't believe in ghosts! Or?  
Edit: The "new" Pi is running "Buster"

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 April 2021 07:58 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/33 "2021-04-18T07:58:49Z")

</div>

Probably it will remain one of the great unsolved mysteries of life.

---

<div class="post-metadata">

**Author:** ![lelle](https://avatars.discourse-cdn.com/v4/letter/l/e99b99/32.png) [@lelle](https://discourse.nodered.org/u/lelle)\
**Post date:** [18 April 2021 19:01 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/34 "2021-04-18T19:01:36Z")

</div>

Probably !

---

<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:** [18 May 2021 19:02 UTC](https://discourse.nodered.org/t/change-color-on-icon/44121/35 "2021-05-18T19:02:01Z")

</div>

Closed on 18 May 2021 19:02 UTC

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

[Previous page](https://discourse.nodered.org/t/change-color-on-icon/44121.md?page=1)
