@5minds/node-red-dashboard-2-processcube-dynamic-table 1.1.16-feature-4ac9f1-m0l0ggq7 → 1.1.16-feature-0f6153-m0m8txu4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodes/dynamic-table.js +7 -8
- package/package.json +1 -1
package/nodes/dynamic-table.js
CHANGED
|
@@ -29,24 +29,23 @@ module.exports = function (RED) {
|
|
|
29
29
|
timestamp: new Date().getTime(),
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
node.context().
|
|
32
|
+
node.context().set(socketId, currentSession);
|
|
33
33
|
} else {
|
|
34
|
-
const
|
|
35
|
-
const relevantKeys = allKeys.filter((key) => key.startsWith('tabledata'));
|
|
34
|
+
const keys = node.context().keys();
|
|
36
35
|
const modifiedObjects = [];
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
let obj = node.context().
|
|
37
|
+
keys.forEach((key) => {
|
|
38
|
+
let obj = node.context().get(key);
|
|
40
39
|
|
|
41
|
-
if (obj && obj.payload
|
|
40
|
+
if (obj && obj.payload) {
|
|
42
41
|
obj.payload = msg.payload;
|
|
43
42
|
|
|
44
|
-
node.context().
|
|
43
|
+
node.context().set(key, obj);
|
|
45
44
|
modifiedObjects.push(obj);
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
if (ageOf(obj) > timeToLive) {
|
|
49
|
-
node.context().
|
|
48
|
+
node.context().set(key, undefined);
|
|
50
49
|
}
|
|
51
50
|
});
|
|
52
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@5minds/node-red-dashboard-2-processcube-dynamic-table",
|
|
3
|
-
"version": "1.1.16-feature-
|
|
3
|
+
"version": "1.1.16-feature-0f6153-m0m8txu4",
|
|
4
4
|
"description": "A ui component for showing dynamic Data with actions in a table",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"processcube",
|