Skip to content

fairscope/dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dashboard

This is the Node-RED project for the PlanktoScope.

URLs

/ps/node-red-v2/dashboard/ to access the dashboard /admin/ps/node-red-v2/ to access the Node-RED editor

Development

Follow Development Environment

You should then be able to commit and push to the dashboard repository.

⚠️ Make sure to use Node-RED to review your changes see doc

You can commit via CLI or Node-RED. You can only push via CLI.

cd PlanktoScope/node-red/projects/dashboard
git push

Read and Write Data in global.json

Data is stored in a file located at: /home/pi/PlanktoScope/node-red/context/global/global.json.

Read Data

To retrieve a value stored in this file, use the following script in a Function Node:

// Retrieve the global variable
msg.variable = global.get("variable")
return msg

Template Node to Display and Modify Data

<template>
  <v-text-field
    label="My variable"
    variant="outlined"
    v-model="msg.variable"
    @update:model-value="send({ variable: msg.variable })"
  ></v-text-field>
</template>

Write Data

To set a value in the file, use the following script in a Function Node:

// Set a value in the global context
global.set("variable", msg.variable)
return msg

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors