# Template with dashboard2 Refresh

**URL:** <https://discourse.nodered.org/t/template-with-dashboard2-refresh/89534>\
**Category:** Dashboard\
**Tags:** node-red-dashboard, dashboard-2\
**Created:** [16 July 2024 04:51 UTC](https://discourse.nodered.org/t/template-with-dashboard2-refresh/89534 "2024-07-16T04:51:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![2shlee](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2shlee/32/89413_2.png) [@2shlee](https://discourse.nodered.org/u/2shlee)\
**Post date:** [16 July 2024 04:51 UTC](https://discourse.nodered.org/t/template-with-dashboard2-refresh/89534/1 "2024-07-16T04:51:24Z")

</div>

Template node with vue.js. Data was sent from the previous node, but it does not appear on the dashboard. If you do not go back to another group page, the template does not appear. How do I solve this problem?

This is Template Code & An example of the data type being transferred.

```auto
<template>
  <v-card title="Device Information" flat>
    <template v-slot:text>
      <v-text-field v-model="search" label="Enter the Keyword" prepend-inner-icon="mdi-magnify" variant="outlined"
        hide-details single-line></v-text-field>
    </template>

    <v-data-table fixed-header :headers="headers" :items="processedPayload" :search="search">
      <template v-slot:item.value="{ item }">
        {{ item.value }}
      </template>

      <template v-slot:item.Unit="{ item }">
        <v-chip :color="getValueColor(item.Contents, item.Value)">
          {{ getLevel(item.Contents, item.Value) }}
        </v-chip>
      </template>

      <template v-slot:header="{ props }">
        <tr>
          <th v-for="header in props.headers" :key="header.text" class="center" style="font-weight:bold;">
            {{ header.text }}
          </th>
        </tr>
      </template>
    </v-data-table>
  </v-card>
</template>
<script>
  export default {
  data: () => ({
    search: '',
    headers: [
      { title: 'Contents', key: 'Contents' },
      { title: 'Value', key: 'Value' },
      { title: 'Unit', key: 'Unit' },
      { title: 'Device Name', key: 'Devicename' },
    ],
  }),
  computed: {
    processedPayload() {
      // msg?.payload 데이터를 처리하여 새로운 구조로 반환
      return this.msg?.payload.map(item => {
        return {
          Contents: item.Contents,
          Value: item.Value,
          Unit: item.Unit,
          Devicename: item.Devicename,
        };
      });
    }
  },
  methods:{
/*
        getValueColor(Contents, Value) {
        const level = this.getLevel(Contents, Value);
        if (!level) {
        return 'white'; // default color when level is undefined or null
        }
        
        if (Contents === "Lora RSSI") {
        if (Unit === "Very Strong") return '#C3423F';
        else if (Unit === "Strong") return '#4f772d';
        else if (Unit === "Normal") return '#0077b6';
        else if (Unit == "Weak") return '#0077b6';
        else return '#4f772d';
        } 
        
        },
*/
    
  }
};
</script>

```

[  
{"Contents":"Device EUI","Value":"ac1f09ffff0bab10","Unit":" ","Devicename":"RAK\_03"},{"Contents":"Gateway ID","Value":"ac1f09fffe0622ea","Unit":" ","Devicename":"RAK\_03"},{"Contents":"Lora RSSI","Value":-49,"Unit":"Strong","Devicename":"RAK\_03"},  
{"Contents":"Lora SNR","Value":10.5,"Unit":"Very Good","Devicename":"RAK\_03"},{"Contents":"Latitude","Value":37.6371,"Unit":" ","Devicename":"RAK\_03"},{"Contents":"Longitude","Value":126.6786,"Unit":" ","Devicename":"RAK\_03"},{"Contents":"Altitude","Value":0,"Unit":" ","Devicename":"RAK\_03"},{"Contents":"Frequengy","Value":922.7,"Unit":"MHz","Devicename":"RAK\_03"},{"Contents":"DR","Value":1,"Unit":" ","Devicename":"RAK\_03"}  
]

---

<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 July 2024 08:08 UTC](https://discourse.nodered.org/t/template-with-dashboard2-refresh/89534/2 "2024-07-16T08:08:34Z")

</div>

Do you have the rest of the `template` you're using please? It seems to be cut off a little early?

---

<div class="post-metadata">

**Author:** ![iiLaw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iilaw/32/14782_2.png) [@iiLaw](https://discourse.nodered.org/u/iiLaw)\
**Post date:** [17 July 2024 08:00 UTC](https://discourse.nodered.org/t/template-with-dashboard2-refresh/89534/3 "2024-07-17T08:00:40Z")

</div>

@2shlee I would recommend you comment out your devEUI and maybe your Gateway EUI when posting on public forums.

---

<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:** [16 August 2024 08:01 UTC](https://discourse.nodered.org/t/template-with-dashboard2-refresh/89534/4 "2024-08-16T08:01:18Z")

</div>

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