# Dashboard 2 ui-template refresh problem Android

**URL:** <https://discourse.nodered.org/t/dashboard-2-ui-template-refresh-problem-android/87975>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [15 May 2024 10:45 UTC](https://discourse.nodered.org/t/dashboard-2-ui-template-refresh-problem-android/87975 "2024-05-15T10:45:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedTom](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/redtom/32/88014_2.png) [@RedTom](https://discourse.nodered.org/u/RedTom)\
**Post date:** [15 May 2024 10:45 UTC](https://discourse.nodered.org/t/dashboard-2-ui-template-refresh-problem-android/87975/1 "2024-05-15T10:45:28Z")

</div>

some update to my first post

> [@Ui-template fully kiosk browser update problem dashboard 2](https://discourse.nodered.org/t/ui-template-fully-kiosk-browser-update-problem-dashboard-2/87003):
>
> Hi, I have some problem with a UI-template (with v-progress-linear). I have an old Samsung Galaxy Tab A with fully kiosk browser. It does update normally all controls except this UI-template. I must say, that loading the page in Chrome on the tablet does update this control also. So it's possible a problem of fully kiosk browser ?, but why all other controls work as expected? Maybe i made something wrong in this control? (I am new to html,css and javascript programming) thanks Thomas …

I updated dashboard 2 to 1.9.1  
In Activity Tracker "WebSocket Connection Issues" are under Review, does this means that it should be fixed ?  
Just want to give the information that my ui-templates still do not refresh after client connect.  
They keep freeze until I do a manual page refresh, after this they start updating again.

 ![20240515_104817001](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/1/51ba11383eb3993ed157bc8ce2df7b6a5215abe0.jpeg)

ui-template

```auto
<template>
    <div>
    <v-progress-linear class="my-progress-class" 
        label="Batterie"
        min="0" 
        max="100" 
        height="25"
        bg-color="grey"
        bg-opacity="0.5"
        :color="getColor(value)"
        v-model=calcvalue>
         <template v-slot:default="{ value }">
          <strong>{{ this.value }} W</strong>
        </template>
    </v-progress-linear>
    </div>
</template>

<script>

    /*
        <strong>{{ Math.abs(Math.floor(value)) }} W</strong>
*/

    export default {
        data() {
            // define variables available component-wide
            // (in <template> and component functions)
            return {
                count: 0
            }
        },
        watch: {
            // watch for any changes of "count"
            count: function () {
                if (this.count % 5 === 0) {
                    this.send({payload: 'Multiple of 5'})
                }
            }
        },
        computed: {
            // automatically compute this variable
            // whenever VueJS deems appropriate
            calcvalue: function () {
                //return this.value*100/10000
                return Math.round(this.msg.payload*100/10000)
            }
        },
/*        
        methods: {
            // expose a method to our <template> and Vue Application
            increase: function () {
                this.count++
            }
        },
*/        
        methods: {
        // add a function to determine the color of the progress bar given the row's item
            getColor: function (value) {
                if (value<30) {
                     return 'red'
                } else if (value<1000) {
                    return 'yellow'
                } else{
                    return 'green'
                }
            },
            getValue: function (value) {
                return value*100/2500
            }
        },
       
        mounted() {
            // code here when the component is first loaded
        },
        unmounted() {
            // code here when the component is removed from the Dashboard
            // i.e. when the user navigates away from the page
        }
    }
     
</script>
<style>
    /* define any styles here - supports raw CSS */
    /* color: red;*/
    /* background-color: blue-grey-lighten-3;*/
    .my-progress-class {

    }
</style>

```

---

<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:** [15 May 2024 15:12 UTC](https://discourse.nodered.org/t/dashboard-2-ui-template-refresh-problem-android/87975/2 "2024-05-15T15:12:22Z")

</div>

This is [ui-template nodes not receiving messages after network disconnection/recovery. · Issue #747 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/747) which was marked as In Progress but seems to have gone back to Under Review.

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [16 May 2024 09:12 UTC](https://discourse.nodered.org/t/dashboard-2-ui-template-refresh-problem-android/87975/3 "2024-05-16T09:12:17Z")

</div>

With `ui-template` we do still have problems. Thanks @Colin for flagging that, I'd accidentally moved into "In Review" yesterday, I'm still investigating the challenges with `ui-template` that doesn't persist in any other node type.

---

<div class="post-metadata">

**Author:** ![RedTom](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/redtom/32/88014_2.png) [@RedTom](https://discourse.nodered.org/u/RedTom)\
**Post date:** [16 May 2024 10:56 UTC](https://discourse.nodered.org/t/dashboard-2-ui-template-refresh-problem-android/87975/4 "2024-05-16T10:56:22Z")

</div>

thanks for the information,  
Until a solution is found, i will reactivate colins workaround (refresh page on connect), but this flashes sometimes the page mulitple times.

---

<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:** [15 June 2024 10:57 UTC](https://discourse.nodered.org/t/dashboard-2-ui-template-refresh-problem-android/87975/5 "2024-06-15T10:57:16Z")

</div>

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