Compare commits
2 Commits
0b857ef444
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dac8576cab | ||
|
|
e04c4a1132 |
@@ -36,13 +36,6 @@ Every per-node file MUST use the folder name (`dashboardAPI`) **exactly**, case-
|
|||||||
| Tests | `test/{basic,integration,edge}/*.test.js` |
|
| Tests | `test/{basic,integration,edge}/*.test.js` |
|
||||||
| Example flows | `examples/*.flow.json` |
|
| Example flows | `examples/*.flow.json` |
|
||||||
|
|
||||||
> ⚠️ **Legacy naming drift in this repo** — to be renamed when the file is next touched:
|
> ℹ️ **Note on the Node-RED type id.** The files are now `dashboardAPI.{js,html}` (folder-name convention satisfied 2026-05-19), but the registered type id stays lowercase: `RED.nodes.registerType('dashboardapi', …)`. Every deployed flow references the type id, not the file name, so this preserves backward compatibility. Admin endpoints (`/dashboardapi/menu.js`, `/dashboardapi/configData.js`) follow the type id and are also unchanged.
|
||||||
>
|
|
||||||
> | Path | Currently | Should be |
|
|
||||||
> |---|---|---|
|
|
||||||
> | Entry file | `dashboardapi.js` | `dashboardAPI.js` |
|
|
||||||
> | Editor HTML | `dashboardapi.html` | `dashboardAPI.html` |
|
|
||||||
>
|
|
||||||
> Renames require updating: the file itself, `package.json#node-red.nodes`, any `require()` / `import` paths, and superproject submodule references in one commit.
|
|
||||||
|
|
||||||
When adding new files, read the rule above first to avoid drift.
|
When adding new files, read the rule above first to avoid drift.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<script>
|
<script>
|
||||||
RED.nodes.registerType('dashboardapi', {
|
RED.nodes.registerType('dashboardapi', {
|
||||||
category: 'EVOLV',
|
category: 'EVOLV',
|
||||||
color: '#4f8582',
|
color: '#7A8BA3',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: { value: '' },
|
name: { value: '' },
|
||||||
enableLog: { value: true },
|
enableLog: { value: true },
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "dashboardAPI",
|
"name": "dashboardAPI",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "EVOLV Grafana dashboard generator (Node-RED node).",
|
"description": "EVOLV Grafana dashboard generator (Node-RED node).",
|
||||||
"main": "dashboardapi.js",
|
"main": "dashboardAPI.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node --test test/basic/*.test.js test/integration/*.test.js test/edge/*.test.js",
|
"test": "node --test test/basic/*.test.js test/integration/*.test.js test/edge/*.test.js",
|
||||||
"wiki:contract": "node ../generalFunctions/scripts/wikiGen.js contract ./src/commands/index.js --write ./wiki/Home.md",
|
"wiki:contract": "node ../generalFunctions/scripts/wikiGen.js contract ./src/commands/index.js --write ./wiki/Home.md",
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"node-red": {
|
"node-red": {
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"dashboardapi": "dashboardapi.js"
|
"dashboardapi": "dashboardAPI.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ const assert = require('node:assert/strict');
|
|||||||
|
|
||||||
test('dashboardAPI module load smoke', () => {
|
test('dashboardAPI module load smoke', () => {
|
||||||
assert.doesNotThrow(() => {
|
assert.doesNotThrow(() => {
|
||||||
require('../../dashboardapi.js');
|
require('../../dashboardAPI.js');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user