node-red-contrib-mobius-flow-base 2.5.86-beta.68 → 2.5.86-beta.71
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/dist/nodes/common/mobsearch.js +115 -27
- package/dist/nodes/mobius-clear-resource.html +8 -273
- package/dist/nodes/mobius-clear-resource.js +21 -8
- package/dist/nodes/mobius-discover-object-list.html +12 -248
- package/dist/nodes/mobius-discover-object-list.js +71 -53
- package/dist/nodes/mobius-flow-inject.html +12 -248
- package/dist/nodes/mobius-flow-inject.js +23 -9
- package/dist/nodes/mobius-get-multi-object.html +12 -248
- package/dist/nodes/mobius-get-multi-object.js +17 -9
- package/dist/nodes/mobius-object-cov.html +8 -238
- package/dist/nodes/mobius-object-cov.js +8 -0
- package/dist/nodes/mobius-resource-cov.html +8 -273
- package/dist/nodes/mobius-resource-cov.js +13 -5
- package/dist/nodes/mobius-set-multi-resource.html +8 -238
- package/dist/nodes/mobius-set-multi-resource.js +8 -0
- package/dist/nodes/mobius-set-resource.html +9 -273
- package/dist/nodes/mobius-set-resource.js +31 -13
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
'use strict';
|
|
29
29
|
|
|
30
30
|
module.exports = function (RED) {
|
|
31
|
-
function MobiusSetResourceNode
|
|
31
|
+
function MobiusSetResourceNode(n) {
|
|
32
32
|
RED.nodes.createNode(this, n);
|
|
33
33
|
this.detailedOutput = n.detailedOutput;
|
|
34
34
|
this.resource = n.resource;
|
|
@@ -40,7 +40,7 @@ module.exports = function (RED) {
|
|
|
40
40
|
node.status({
|
|
41
41
|
fill: 'red',
|
|
42
42
|
shape: 'ring',
|
|
43
|
-
text: 'Disconnected'
|
|
43
|
+
text: 'Disconnected',
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
node.on('input', function (msg) {
|
|
@@ -60,7 +60,7 @@ module.exports = function (RED) {
|
|
|
60
60
|
node.status({
|
|
61
61
|
fill: 'green',
|
|
62
62
|
shape: 'ring',
|
|
63
|
-
text: 'Busy'
|
|
63
|
+
text: 'Busy',
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
if (value === null) {
|
|
@@ -69,29 +69,34 @@ module.exports = function (RED) {
|
|
|
69
69
|
node.status({
|
|
70
70
|
fill: 'yellow',
|
|
71
71
|
shape: 'dot',
|
|
72
|
-
text: 'Error: ' + JSON.stringify(err.code)
|
|
72
|
+
text: 'Error: ' + JSON.stringify(err.code),
|
|
73
73
|
});
|
|
74
74
|
node.error('Mobius error clearing resource priority ' + JSON.stringify(err));
|
|
75
75
|
if (node.detailedOutput === true) {
|
|
76
|
-
node.send([
|
|
76
|
+
node.send([
|
|
77
|
+
null,
|
|
78
|
+
null,
|
|
79
|
+
null,
|
|
80
|
+
{ topic: uri, payload: { error: true, response: err } },
|
|
81
|
+
]);
|
|
77
82
|
}
|
|
78
83
|
} else {
|
|
79
84
|
node.status({
|
|
80
85
|
fill: 'green',
|
|
81
86
|
shape: 'dot',
|
|
82
|
-
text: JSON.stringify(response.value.pv)
|
|
87
|
+
text: JSON.stringify(response.value.pv),
|
|
83
88
|
});
|
|
84
89
|
if (node.detailedOutput === true) {
|
|
85
90
|
node.send([
|
|
86
91
|
{ topic: uri, payload: response.value.pv },
|
|
87
92
|
{ topic: uri, payload: { pv: response.value.pv, name: response.value.name } },
|
|
88
93
|
{ topic: uri, payload: response.value },
|
|
89
|
-
{ topic: uri, payload: { error: false, response: response } }
|
|
94
|
+
{ topic: uri, payload: { error: false, response: response } },
|
|
90
95
|
]);
|
|
91
96
|
} else {
|
|
92
97
|
node.send([
|
|
93
98
|
{ topic: uri, payload: response.value.pv },
|
|
94
|
-
{ topic: uri, payload: { pv: response.value.pv, name: response.value.name } }
|
|
99
|
+
{ topic: uri, payload: { pv: response.value.pv, name: response.value.name } },
|
|
95
100
|
]);
|
|
96
101
|
}
|
|
97
102
|
}
|
|
@@ -102,27 +107,32 @@ module.exports = function (RED) {
|
|
|
102
107
|
node.status({
|
|
103
108
|
fill: 'yellow',
|
|
104
109
|
shape: 'dot',
|
|
105
|
-
text: 'Error: ' + JSON.stringify(err.code)
|
|
110
|
+
text: 'Error: ' + JSON.stringify(err.code),
|
|
106
111
|
});
|
|
107
112
|
node.error('Mobius error writing resource ' + JSON.stringify(err));
|
|
108
|
-
node.send([
|
|
113
|
+
node.send([
|
|
114
|
+
null,
|
|
115
|
+
null,
|
|
116
|
+
null,
|
|
117
|
+
{ topic: uri, payload: { error: true, response: err } },
|
|
118
|
+
]);
|
|
109
119
|
} else {
|
|
110
120
|
node.status({
|
|
111
121
|
fill: 'green',
|
|
112
122
|
shape: 'dot',
|
|
113
|
-
text: JSON.stringify(response.value.pv)
|
|
123
|
+
text: JSON.stringify(response.value.pv),
|
|
114
124
|
});
|
|
115
125
|
if (node.detailedOutput === true) {
|
|
116
126
|
node.send([
|
|
117
127
|
{ topic: uri, payload: response.value.pv },
|
|
118
128
|
{ topic: uri, payload: { pv: response.value.pv, name: response.value.name } },
|
|
119
129
|
{ topic: uri, payload: response.value },
|
|
120
|
-
{ topic: uri, payload: { error: false, response: response } }
|
|
130
|
+
{ topic: uri, payload: { error: false, response: response } },
|
|
121
131
|
]);
|
|
122
132
|
} else {
|
|
123
133
|
node.send([
|
|
124
134
|
{ topic: uri, payload: response.value.pv },
|
|
125
|
-
{ topic: uri, payload: { pv: response.value.pv, name: response.value.name } }
|
|
135
|
+
{ topic: uri, payload: { pv: response.value.pv, name: response.value.name } },
|
|
126
136
|
]);
|
|
127
137
|
}
|
|
128
138
|
}
|
|
@@ -142,4 +152,12 @@ module.exports = function (RED) {
|
|
|
142
152
|
}
|
|
143
153
|
|
|
144
154
|
RED.nodes.registerType('mobius set resource', MobiusSetResourceNode);
|
|
155
|
+
|
|
156
|
+
RED.httpAdmin.get('/common/*', function (req, res) {
|
|
157
|
+
var options = {
|
|
158
|
+
root: __dirname + '/common/',
|
|
159
|
+
dotfiles: 'deny',
|
|
160
|
+
};
|
|
161
|
+
res.sendFile(req.params[0], options);
|
|
162
|
+
});
|
|
145
163
|
};
|