small adjusts

This commit is contained in:
znetsixe
2025-06-25 17:25:13 +02:00
parent b3f1fad74e
commit b4803e5e9b
5 changed files with 18 additions and 19 deletions

View File

@@ -14,14 +14,14 @@ module.exports = function(RED) {
RED.nodes.createNode(this, config);
// Then create your custom class and attach it
this.nodeClass = new nodeClass(config, RED, this);
this.nodeClass = new nodeClass(config, RED, this, nameOfNode);
});
// Setup admin UIs
const menuMgr = new MenuManager(); //this will handle the menu endpoints so we can load them dynamically
const cfgMgr = new configManager(); // this will handle the config endpoints so we can load them dynamically
console.log(`Loading endpoint for ${nameOfNode} menu...`);
//console.log(`Loading endpoint for ${nameOfNode} menu...`);
// Register the different menu's for the measurement node (in the future we could automate this further by refering to the config)
RED.httpAdmin.get('/measurement/menu.js', (req, res) => {
@@ -33,7 +33,7 @@ module.exports = function(RED) {
}
});
console.log(`Loading endpoint for ${nameOfNode} config...`);
//console.log(`Loading endpoint for ${nameOfNode} config...`);
// Endpoint to get the configuration data for the specific node
RED.httpAdmin.get(`/measurement/configData.js`, (req, res) => {
@@ -46,5 +46,5 @@ module.exports = function(RED) {
}
});
console.log(`Measurement node '${nameOfNode}' registered.`);
//console.log(`Measurement node '${nameOfNode}' registered.`);
};