Actual flowserver on Senica rvo
This commit is contained in:
parent
67c503d980
commit
86619fbcff
29 changed files with 5833 additions and 9853 deletions
|
|
@ -22,16 +22,12 @@ exports.html = `<div class="padding">
|
|||
|
||||
exports.readme = `# send all data to projects.worksys.io, required to monitor status of controller(unipi)`;
|
||||
|
||||
const { promisifyBuilder, makeMapFromDbResult } = require('./helper/db_helper.js');
|
||||
const fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
exports.install = async function(instance) {
|
||||
|
||||
let id;
|
||||
let allValues = {};
|
||||
let dbSettings;
|
||||
|
||||
let sendAllValuesInterval;
|
||||
|
||||
let now = new Date();
|
||||
|
|
@ -52,23 +48,11 @@ exports.install = async function(instance) {
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
let p = path.join(__dirname + "/../databases/", 'settings.table');
|
||||
if (fs.existsSync(p)) {
|
||||
|
||||
dbSettings = TABLE("settings");
|
||||
let responseSettings = await promisifyBuilder(dbSettings.find());
|
||||
id = responseSettings[0]["projects_id"];
|
||||
|
||||
//console.log(exports.title, responseSettings, id);
|
||||
}
|
||||
} catch(err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
|
||||
function sendValues()
|
||||
{
|
||||
const id = FLOW.OMS_projects_id;
|
||||
|
||||
if(Object.keys(allValues).length > 0)
|
||||
{
|
||||
if(id !== undefined)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue