node-red-contrib-mobius-flow-base 3.0.0-beta.12 → 3.0.0-beta.14
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/engine-api-calls.d.ts +1 -0
- package/dist/engine-api-calls.js +23 -2
- package/dist/engine-api-client.d.ts +2 -1
- package/dist/engine-api-client.js +23 -7
- package/dist/engine-websocket.d.ts +3 -1
- package/dist/engine-websocket.js +56 -18
- package/dist/nodes/common/mobsearch.js +52 -26
- package/dist/nodes/mobius-change-admin-password.d.ts +26 -0
- package/dist/nodes/mobius-change-admin-password.html +98 -0
- package/dist/nodes/mobius-change-admin-password.js +87 -0
- package/dist/nodes/mobius-clear-resource.html +15 -9
- package/dist/nodes/mobius-clear-resource.js +0 -1
- package/dist/nodes/mobius-connection-interface.d.ts +45 -0
- package/dist/nodes/mobius-connection-interface.js +2 -0
- package/dist/nodes/mobius-connection.js +29 -7
- package/dist/nodes/mobius-discover-object-list.html +1 -1
- package/dist/nodes/mobius-filter-by-rid-value.html +10 -6
- package/dist/nodes/mobius-flow-inject.html +1 -1
- package/dist/nodes/mobius-get-multi-object.html +1 -1
- package/dist/nodes/mobius-get-multi-object.js +1 -1
- package/dist/nodes/mobius-get-multi-resource.html +2 -1
- package/dist/nodes/mobius-get-object.html +14 -8
- package/dist/nodes/mobius-get-resource.html +16 -10
- package/dist/nodes/mobius-object-cov.html +14 -9
- package/dist/nodes/mobius-resource-cov.html +14 -8
- package/dist/nodes/mobius-set-multi-resource.html +15 -9
- package/dist/nodes/mobius-set-resource.html +14 -8
- package/dist/nodes/mobius-set-resource.js +12 -12
- package/package.json +4 -3
|
@@ -47,6 +47,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
47
47
|
<label> </label>
|
|
48
48
|
<input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
|
|
49
49
|
<label for="node-input-detailedOutput" style="width: 70%;"> Use detailed outputs</label>
|
|
50
|
+
<input type="hidden" id="node-input-outputs"/>
|
|
50
51
|
</div>
|
|
51
52
|
<hr>
|
|
52
53
|
<div class="form-row">
|
|
@@ -74,11 +75,12 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
74
75
|
return false;
|
|
75
76
|
}},
|
|
76
77
|
priority: {value:15, type: 'Number', validate:function(v) { return (v > 0 && v < 16) }},
|
|
77
|
-
connection: {type:"mobius connection", required:true}
|
|
78
|
+
connection: {type:"mobius connection", required:true},
|
|
79
|
+
outputs: {value:2},
|
|
78
80
|
},
|
|
79
81
|
color:"#8abff5",
|
|
80
82
|
inputs:1,
|
|
81
|
-
outputs:2,
|
|
83
|
+
outputs: 2,
|
|
82
84
|
outputLabels: function (index) {
|
|
83
85
|
if(index === 0) return ("Resource's PV");
|
|
84
86
|
if(index === 1) return ("Resource's PV and name");
|
|
@@ -99,6 +101,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
99
101
|
return this.name ? "node_label_italic":"";
|
|
100
102
|
},
|
|
101
103
|
oneditprepare: function () {
|
|
104
|
+
$("#node-input-outputs").val(this.detailedOutput ? 4 : 2);
|
|
105
|
+
$("#node-input-detailedOutput").change(function() {
|
|
106
|
+
$("#node-input-outputs").val(this.checked ? 4 : 2);
|
|
107
|
+
});
|
|
102
108
|
var node = this;
|
|
103
109
|
let mobiusSrvc = $("#node-input-connection").val();
|
|
104
110
|
|
|
@@ -109,13 +115,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
109
115
|
};
|
|
110
116
|
initMobsearch.toRid(mobiusSrvc, opts);
|
|
111
117
|
},
|
|
112
|
-
oneditsave: function() {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
118
|
+
// oneditsave: function() {
|
|
119
|
+
// if($("#node-input-detailedOutput").prop('checked')) {
|
|
120
|
+
// this.outputs = 4;
|
|
121
|
+
// } else {
|
|
122
|
+
// this.outputs = 2;
|
|
123
|
+
// }
|
|
124
|
+
// }
|
|
119
125
|
});
|
|
120
126
|
</script>
|
|
121
127
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface NodeInterface {
|
|
2
|
+
on(type: 'input', callback: (msg: any, done?: any) => void): any;
|
|
3
|
+
on(type: 'close', callback: (done?: any) => void): any;
|
|
4
|
+
send(msg: any): any;
|
|
5
|
+
status(status: any): void;
|
|
6
|
+
log(msg: string): any;
|
|
7
|
+
warn(msg: string): any;
|
|
8
|
+
error(msg: string): any;
|
|
9
|
+
}
|
|
10
|
+
export interface MobiusConnectionInterface {
|
|
11
|
+
host: string;
|
|
12
|
+
port: number;
|
|
13
|
+
username: string;
|
|
14
|
+
password: string;
|
|
15
|
+
secure: boolean;
|
|
16
|
+
connected: boolean;
|
|
17
|
+
register(node: any): void;
|
|
18
|
+
deregister(node: any, done: () => void): void;
|
|
19
|
+
discover(uri: string, callback: (err: any, response: any) => void): void;
|
|
20
|
+
writeResourceValue(uri: string, value: string, callback: (err: any, response: any) => void): void;
|
|
21
|
+
writeMultiResourceValue(uri: string, updates: {
|
|
22
|
+
r: string;
|
|
23
|
+
p: number;
|
|
24
|
+
v: string | number | boolean;
|
|
25
|
+
}[], callback: (err: any, response: any) => void): void;
|
|
26
|
+
clearResourcePriority(uri: string, priority: number, callback: (err: any, response: any) => void): void;
|
|
27
|
+
readResource(uri: string, callback: (err: any, response: any) => void): void;
|
|
28
|
+
readObject(uri: string, callback: (err: any, response: any) => void): void;
|
|
29
|
+
filterObjectsByRidValue(uri: string, pids: string[], linit: number, func: Function, callback: (err: any, response: any) => void): void;
|
|
30
|
+
changeAdminPassword(password: string, callback: (err: any, response: string) => void): void;
|
|
31
|
+
subscribeToCov(uri: string, ref: string, callback: (err: any, response: any) => void): void;
|
|
32
|
+
unsubscribeToCov(uri: string, ref: string, callback: (err: any, response: any) => void): void;
|
|
33
|
+
subscribeToObjectCOV(uri: string, ref: string, callback: (err: any, response: any) => void): void;
|
|
34
|
+
unsubscribeToObjectCOV(uri: string, ref: string, callback: (err: any, response: any) => void): void;
|
|
35
|
+
subscribeToBCMD(uri: string, ref: string, callback: (err: any, response: any) => void): void;
|
|
36
|
+
unsubscribeToBCMD(uri: string, ref: string, callback: (err: any, response: any) => void): void;
|
|
37
|
+
sendBroadcastCommand(cid: string, commandData: any): void;
|
|
38
|
+
sendDirectCommand(uri: string, cid: string, timeout: number, callback: (err: any, response: any) => void): void;
|
|
39
|
+
getServiceConfig(hid: string, sid: string, callback: (err: any, response: any) => void): void;
|
|
40
|
+
updateObjectInServiceConfig(hid: string, sid: string, pid: string, ins: string, config: any, callback: (err: any, response: any) => void): void;
|
|
41
|
+
getNodeConfig(uri: string, callback: (err: any, response: any) => void): void;
|
|
42
|
+
}
|
|
43
|
+
export interface ServiceConn {
|
|
44
|
+
serviceConn: MobiusConnectionInterface;
|
|
45
|
+
}
|
|
@@ -32,7 +32,7 @@ var uiFuncs = require('../node-red-ui-funcs');
|
|
|
32
32
|
const webSocket = require('../engine-websocket');
|
|
33
33
|
const apiCalls = require('../engine-api-calls');
|
|
34
34
|
const webSocketCalls = require('../engine-websocket');
|
|
35
|
-
const { getApiClient, setLoggedIn } = require('../engine-api-client');
|
|
35
|
+
const { getApiClient, setLoggedIn, closeApiClient } = require('../engine-api-client');
|
|
36
36
|
|
|
37
37
|
module.exports = function (RED) {
|
|
38
38
|
/**
|
|
@@ -232,6 +232,11 @@ module.exports = function (RED) {
|
|
|
232
232
|
* @param {Function} done - A callback to be run by the node after it has been deregistered
|
|
233
233
|
*/
|
|
234
234
|
node.deregister = function (mobiusNode, done) {
|
|
235
|
+
node.users[mobiusNode.id].status({
|
|
236
|
+
fill: 'red',
|
|
237
|
+
shape: 'ring',
|
|
238
|
+
text: 'Disconnected',
|
|
239
|
+
});
|
|
235
240
|
delete node.users[mobiusNode.id];
|
|
236
241
|
try {
|
|
237
242
|
node.resourceSubscriptions.forEach((subs, key) => {
|
|
@@ -277,6 +282,19 @@ module.exports = function (RED) {
|
|
|
277
282
|
* Register the close connection handler
|
|
278
283
|
*/
|
|
279
284
|
node.on('close', (done) => {
|
|
285
|
+
webSocket.killWebSocket();
|
|
286
|
+
closeApiClient();
|
|
287
|
+
setLoggedIn(false);
|
|
288
|
+
this.log(`Connection to MOBiUS closed.`);
|
|
289
|
+
for (var id in node.users) {
|
|
290
|
+
if (node.users.hasOwnProperty(id)) {
|
|
291
|
+
node.users[id].status({
|
|
292
|
+
fill: 'red',
|
|
293
|
+
shape: 'ring',
|
|
294
|
+
text: 'Disconnected',
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
280
298
|
if (node.connected) {
|
|
281
299
|
// Wait for all nodes to unsubscribe before terminating the connection
|
|
282
300
|
node.unsubscribeTimeout = 0;
|
|
@@ -288,15 +306,11 @@ module.exports = function (RED) {
|
|
|
288
306
|
node.unsubscribeTimeout > 50
|
|
289
307
|
) {
|
|
290
308
|
clearInterval(waitForCleanup);
|
|
291
|
-
webSocket.disconnectFromWebSocket();
|
|
292
|
-
setLoggedIn(false);
|
|
293
309
|
done();
|
|
294
310
|
}
|
|
295
311
|
node.unsubscribeTimeout++;
|
|
296
312
|
}, 100);
|
|
297
313
|
} else {
|
|
298
|
-
setLoggedIn(false);
|
|
299
|
-
webSocket.disconnectFromWebSocket();
|
|
300
314
|
done();
|
|
301
315
|
}
|
|
302
316
|
});
|
|
@@ -378,6 +392,15 @@ module.exports = function (RED) {
|
|
|
378
392
|
apiCalls.filterObjectsByRIDValue(this.apiClient, uri, pids, rid, limit, func, callback);
|
|
379
393
|
};
|
|
380
394
|
|
|
395
|
+
/**
|
|
396
|
+
* Change the password of the admin user
|
|
397
|
+
* @param {*} password - The new password
|
|
398
|
+
* @param {*} callback - Callback when complete, function(err, [object]) {}
|
|
399
|
+
*/
|
|
400
|
+
node.changeAdminPassword = function(password, callback) {
|
|
401
|
+
apiCalls.changeAdminPassword(this.apiClient, password, callback);
|
|
402
|
+
}
|
|
403
|
+
|
|
381
404
|
/**
|
|
382
405
|
* Subscribe to a resource COV
|
|
383
406
|
* @param {string} uri - The full URI of the resource
|
|
@@ -674,8 +697,7 @@ module.exports = function (RED) {
|
|
|
674
697
|
RED.httpAdmin.get('/mgetconnected', RED.auth.needsPermission('serial.read'), function (req, res) {
|
|
675
698
|
let conn = RED.nodes.getNode(req.query.mobius);
|
|
676
699
|
if (conn === null) {
|
|
677
|
-
|
|
678
|
-
throw new Error('Get hid failed - could not to connect to MOBiUS hub.');
|
|
700
|
+
res.json(false);
|
|
679
701
|
} else {
|
|
680
702
|
res.json(conn.connected);
|
|
681
703
|
}
|
|
@@ -187,7 +187,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
187
187
|
node.subscriptions[i] = {uri: '', type: 'include'}
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
addMobsearchListButton(searchField, i, mobsearchOpts)
|
|
190
|
+
addMobsearchListButton(mobiusSrvc, searchField, i, mobsearchOpts)
|
|
191
191
|
// *** END MOBSEARCH *** //
|
|
192
192
|
},
|
|
193
193
|
});
|
|
@@ -67,7 +67,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
67
67
|
category: 'mobius',
|
|
68
68
|
color: '#8abff5',
|
|
69
69
|
defaults: {
|
|
70
|
-
outputs: { value: 1 },
|
|
71
70
|
name: { value: '' },
|
|
72
71
|
pids: { value: '[]' },
|
|
73
72
|
func: { value: '' },
|
|
@@ -93,6 +92,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
93
92
|
},
|
|
94
93
|
},
|
|
95
94
|
connection: { type: 'mobius connection', required: true },
|
|
95
|
+
outputs: {value:1},
|
|
96
96
|
},
|
|
97
97
|
inputs: 1,
|
|
98
98
|
outputs: 1,
|
|
@@ -114,6 +114,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
114
114
|
return this.name ? 'node_label_italic' : '';
|
|
115
115
|
},
|
|
116
116
|
oneditprepare: function () {
|
|
117
|
+
$("#node-input-outputs").val(this.detailedOutput ? 2 : 1);
|
|
118
|
+
$("#node-input-detailedOutput").change(function() {
|
|
119
|
+
$("#node-input-outputs").val(this.checked ? 2 : 1);
|
|
120
|
+
});
|
|
117
121
|
$('#node-input-pids').typedInput({
|
|
118
122
|
type: 'json',
|
|
119
123
|
types: ['json'],
|
|
@@ -125,11 +129,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
125
129
|
});
|
|
126
130
|
},
|
|
127
131
|
oneditsave: function () {
|
|
128
|
-
if ($('#node-input-detailedOutput').prop('checked')) {
|
|
129
|
-
|
|
130
|
-
} else {
|
|
131
|
-
|
|
132
|
-
}
|
|
132
|
+
// if ($('#node-input-detailedOutput').prop('checked')) {
|
|
133
|
+
// $('#node-input-outputs').val(2);
|
|
134
|
+
// } else {
|
|
135
|
+
// $('#node-input-outputs').val(1);
|
|
136
|
+
// }
|
|
133
137
|
this.func = this.editor.getValue();
|
|
134
138
|
this.editor.destroy();
|
|
135
139
|
delete this.editor;
|
|
@@ -107,7 +107,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
107
107
|
node.subscriptions[i] = {uri: '', type: 'include'}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
addMobsearchListButton(searchField, i, mobsearchOpts)
|
|
110
|
+
addMobsearchListButton(mobiusSrvc, searchField, i, mobsearchOpts)
|
|
111
111
|
// *** END MOBSEARCH *** //
|
|
112
112
|
}
|
|
113
113
|
});
|
|
@@ -116,7 +116,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
116
116
|
node.mobjects[i] = {uri: '', comment: ''}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
addMobsearchListButton(searchField, i, mobsearchOpts)
|
|
119
|
+
addMobsearchListButton(mobiusSrvc, searchField, i, mobsearchOpts)
|
|
120
120
|
// *** END MOBSEARCH *** //
|
|
121
121
|
|
|
122
122
|
},
|
|
@@ -108,6 +108,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
108
108
|
|
|
109
109
|
// *** MOBSEARCH *** //
|
|
110
110
|
var searchField = $('<a class="searchbutton" style="margin-left: 5px; vertical-align: middle"><i id="node-lookup-instance-icon" class="fa fa-search"></i></a>').appendTo(row);
|
|
111
|
+
|
|
111
112
|
// *** END MOBSEARCH *** //
|
|
112
113
|
|
|
113
114
|
row.append(' - ');
|
|
@@ -122,7 +123,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
122
123
|
if (!node.resources[i]) {
|
|
123
124
|
node.resources[i] = {uri: '', comment: ''}
|
|
124
125
|
}
|
|
125
|
-
addMobsearchListButton(searchField, i, mobsearchOpts)
|
|
126
|
+
addMobsearchListButton(mobiusSrvc, searchField, i, mobsearchOpts)
|
|
126
127
|
// *** END MOBSEARCH *** //
|
|
127
128
|
|
|
128
129
|
},
|
|
@@ -53,6 +53,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
53
53
|
<label> </label>
|
|
54
54
|
<input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
|
|
55
55
|
<label for="node-input-detailedOutput" style="width: 70%;"> Use detailed outputs</label>
|
|
56
|
+
<input type="hidden" id="node-input-outputs"/>
|
|
56
57
|
</div>
|
|
57
58
|
<hr>
|
|
58
59
|
<div class="form-row">
|
|
@@ -81,7 +82,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
81
82
|
if(parts.length < 4 && parts[parts.length - 1] === '#') { return true; }
|
|
82
83
|
return false;
|
|
83
84
|
}},
|
|
84
|
-
connection: {type: "mobius connection", required: true}
|
|
85
|
+
connection: {type: "mobius connection", required: true},
|
|
86
|
+
outputs: {value:1},
|
|
85
87
|
},
|
|
86
88
|
inputs:1,
|
|
87
89
|
outputs:1,
|
|
@@ -104,6 +106,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
104
106
|
return this.name ? "node_label_italic":"";
|
|
105
107
|
},
|
|
106
108
|
oneditprepare: function () {
|
|
109
|
+
$("#node-input-outputs").val(this.detailedOutput ? 3 : 1);
|
|
110
|
+
$("#node-input-detailedOutput").change(function() {
|
|
111
|
+
$("#node-input-outputs").val(this.checked ? 3 : 1);
|
|
112
|
+
});
|
|
107
113
|
var node = this;
|
|
108
114
|
let mobiusSrvc = $("#node-input-connection").val();
|
|
109
115
|
|
|
@@ -114,13 +120,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
114
120
|
};
|
|
115
121
|
initMobsearch.toIns(mobiusSrvc, opts);
|
|
116
122
|
},
|
|
117
|
-
oneditsave: function() {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
123
|
+
// oneditsave: function() {
|
|
124
|
+
// if($("#node-input-detailedOutput").prop('checked')) {
|
|
125
|
+
// this.outputs = 3;
|
|
126
|
+
// } else {
|
|
127
|
+
// this.outputs = 1;
|
|
128
|
+
// }
|
|
129
|
+
// }
|
|
124
130
|
});
|
|
125
131
|
</script>
|
|
126
132
|
|
|
@@ -46,12 +46,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
46
46
|
<label> </label>
|
|
47
47
|
<input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
|
|
48
48
|
<label for="node-input-detailedOutput" style="width: 70%;"> Use detailed outputs</label>
|
|
49
|
+
<input type="hidden" id="node-input-outputs"/>
|
|
49
50
|
</div>
|
|
50
51
|
<hr>
|
|
51
52
|
<div class="form-row">
|
|
52
53
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
53
54
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
54
55
|
</div>
|
|
56
|
+
|
|
55
57
|
</script>
|
|
56
58
|
|
|
57
59
|
<script src="common/mobsearch.js"></script>
|
|
@@ -73,10 +75,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
73
75
|
if(parts.length < 5 && parts[parts.length - 1] === '#') { return true; }
|
|
74
76
|
return false;
|
|
75
77
|
}},
|
|
76
|
-
connection: {type:"mobius connection", required:true}
|
|
78
|
+
connection: {type:"mobius connection", required: true},
|
|
79
|
+
outputs: {value:2},
|
|
77
80
|
},
|
|
78
81
|
inputs:1,
|
|
79
|
-
outputs:2,
|
|
82
|
+
outputs: 2,
|
|
80
83
|
outputLabels: function (index) {
|
|
81
84
|
if(index === 0) return ("Resource's PV");
|
|
82
85
|
if(index === 1) return ("Resource's PV and name");
|
|
@@ -97,9 +100,12 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
97
100
|
return this.name ? "node_label_italic":"";
|
|
98
101
|
},
|
|
99
102
|
oneditprepare: function () {
|
|
103
|
+
$("#node-input-outputs").val(this.detailedOutput ? 4 : 2);
|
|
104
|
+
$("#node-input-detailedOutput").change(function() {
|
|
105
|
+
$("#node-input-outputs").val(this.checked ? 4 : 2);
|
|
106
|
+
});
|
|
100
107
|
var node = this;
|
|
101
108
|
let mobiusSrvc = $("#node-input-connection").val();
|
|
102
|
-
|
|
103
109
|
opts = {
|
|
104
110
|
htmlElementId: 'mobsearch',
|
|
105
111
|
uriFieldName: 'node-input-resource',
|
|
@@ -108,13 +114,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
108
114
|
initMobsearch.toRid(mobiusSrvc, opts);
|
|
109
115
|
|
|
110
116
|
},
|
|
111
|
-
oneditsave: function() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
117
|
+
// oneditsave: function() {
|
|
118
|
+
// if($("#node-input-detailedOutput").prop('checked')) {
|
|
119
|
+
// this.outputs = 4;
|
|
120
|
+
// } else {
|
|
121
|
+
// this.outputs = 2;
|
|
122
|
+
// }
|
|
123
|
+
// }
|
|
118
124
|
});
|
|
119
125
|
</script>
|
|
120
126
|
|
|
@@ -61,6 +61,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
61
61
|
<label> </label>
|
|
62
62
|
<input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
|
|
63
63
|
<label for="node-input-detailedOutput" style="width: 70%;"> Use detailed outputs</label>
|
|
64
|
+
<input type="hidden" id="node-input-outputs"/>
|
|
64
65
|
</div>
|
|
65
66
|
<hr>
|
|
66
67
|
<div class="form-row">
|
|
@@ -89,7 +90,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
89
90
|
if(parts.length < 4 && parts[parts.length - 1] === '#') { return true; }
|
|
90
91
|
return false;
|
|
91
92
|
}},
|
|
92
|
-
connection: {type:"mobius connection", required:true}
|
|
93
|
+
connection: {type:"mobius connection", required:true},
|
|
94
|
+
outputs: {value:1},
|
|
93
95
|
},
|
|
94
96
|
color:"#8abff5",
|
|
95
97
|
inputs:0,
|
|
@@ -113,7 +115,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
113
115
|
return this.name ? "node_label_italic":"";
|
|
114
116
|
},
|
|
115
117
|
oneditprepare: function () {
|
|
116
|
-
|
|
118
|
+
$("#node-input-outputs").val(this.detailedOutput ? 3 : 1);
|
|
119
|
+
$("#node-input-detailedOutput").change(function() {
|
|
120
|
+
$("#node-input-outputs").val(this.checked ? 3 : 1);
|
|
121
|
+
});
|
|
117
122
|
var node = this;
|
|
118
123
|
let mobiusSrvc = $("#node-input-connection").val();
|
|
119
124
|
|
|
@@ -124,13 +129,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
124
129
|
};
|
|
125
130
|
initMobsearch.toIns(mobiusSrvc, opts);
|
|
126
131
|
},
|
|
127
|
-
oneditsave: function() {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
132
|
+
// oneditsave: function() {
|
|
133
|
+
// if($("#node-input-detailedOutput").prop('checked')) {
|
|
134
|
+
// this.outputs = 3;
|
|
135
|
+
// } else {
|
|
136
|
+
// this.outputs = 1;
|
|
137
|
+
// }
|
|
138
|
+
// }
|
|
134
139
|
});
|
|
135
140
|
</script>
|
|
136
141
|
|
|
@@ -44,6 +44,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
44
44
|
<label> </label>
|
|
45
45
|
<input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
|
|
46
46
|
<label for="node-input-detailedOutput" style="width: 70%;"> Use detailed outputs</label>
|
|
47
|
+
<input type="hidden" id="node-input-outputs"/>
|
|
47
48
|
</div>
|
|
48
49
|
<hr>
|
|
49
50
|
<div class="form-row">
|
|
@@ -69,7 +70,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
69
70
|
if(parts.length < 5 && parts[parts.length - 1] === '#') { return true; }
|
|
70
71
|
return false;
|
|
71
72
|
}},
|
|
72
|
-
connection: {type:"mobius connection", required:true}
|
|
73
|
+
connection: {type:"mobius connection", required:true},
|
|
74
|
+
outputs: {value:2},
|
|
73
75
|
},
|
|
74
76
|
color:"#8abff5",
|
|
75
77
|
inputs:0,
|
|
@@ -94,6 +96,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
94
96
|
return this.name ? "node_label_italic":"";
|
|
95
97
|
},
|
|
96
98
|
oneditprepare: function () {
|
|
99
|
+
$("#node-input-outputs").val(this.detailedOutput ? 4 : 2);
|
|
100
|
+
$("#node-input-detailedOutput").change(function() {
|
|
101
|
+
$("#node-input-outputs").val(this.checked ? 4 : 2);
|
|
102
|
+
});
|
|
97
103
|
var node = this;
|
|
98
104
|
let mobiusSrvc = $("#node-input-connection").val();
|
|
99
105
|
|
|
@@ -104,13 +110,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
104
110
|
};
|
|
105
111
|
initMobsearch.toRid(mobiusSrvc, opts);
|
|
106
112
|
},
|
|
107
|
-
oneditsave: function() {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
113
|
+
// oneditsave: function() {
|
|
114
|
+
// if($("#node-input-detailedOutput").prop('checked')) {
|
|
115
|
+
// this.outputs = 4;
|
|
116
|
+
// } else {
|
|
117
|
+
// this.outputs = 2;
|
|
118
|
+
// }
|
|
119
|
+
// }
|
|
114
120
|
});
|
|
115
121
|
</script>
|
|
116
122
|
|
|
@@ -45,6 +45,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
45
45
|
<label> </label>
|
|
46
46
|
<input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
|
|
47
47
|
<label for="node-input-detailedOutput" style="width: 70%;"> Use detailed outputs</label>
|
|
48
|
+
<input type="hidden" id="node-input-outputs"/>
|
|
48
49
|
</div>
|
|
49
50
|
<hr>
|
|
50
51
|
<div class="form-row">
|
|
@@ -70,11 +71,12 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
70
71
|
if(parts.length === 4) { return true; }
|
|
71
72
|
return false;
|
|
72
73
|
}},
|
|
73
|
-
connection: {type:"mobius connection", required:true}
|
|
74
|
+
connection: {type:"mobius connection", required:true},
|
|
75
|
+
outputs: {value:2},
|
|
74
76
|
},
|
|
75
77
|
color:"#8abff5",
|
|
76
78
|
inputs:1,
|
|
77
|
-
outputs:
|
|
79
|
+
outputs:2,
|
|
78
80
|
outputLabels: function (index) {
|
|
79
81
|
if(index === 0) return ("MOBiUS object");
|
|
80
82
|
if(index === 1) return ("Full MOBiUS response");
|
|
@@ -93,6 +95,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
93
95
|
return this.name ? "node_label_italic":"";
|
|
94
96
|
},
|
|
95
97
|
oneditprepare: function () {
|
|
98
|
+
$("#node-input-outputs").val(this.detailedOutput ? 4 : 2);
|
|
99
|
+
$("#node-input-detailedOutput").change(function() {
|
|
100
|
+
$("#node-input-outputs").val(this.checked ? 4 : 2);
|
|
101
|
+
});
|
|
96
102
|
var node = this;
|
|
97
103
|
let mobiusSrvc = $("#node-input-connection").val();
|
|
98
104
|
|
|
@@ -103,13 +109,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
103
109
|
};
|
|
104
110
|
initMobsearch.toIns(mobiusSrvc, opts);
|
|
105
111
|
},
|
|
106
|
-
oneditsave: function() {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
112
|
+
// oneditsave: function() {
|
|
113
|
+
// if($("#node-input-detailedOutput").prop('checked')) {
|
|
114
|
+
// this.outputs = 2;
|
|
115
|
+
// } else {
|
|
116
|
+
// this.outputs = 1;
|
|
117
|
+
// }
|
|
118
|
+
// }
|
|
113
119
|
});
|
|
114
120
|
</script>
|
|
115
121
|
|
|
@@ -49,6 +49,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
49
49
|
<label> </label>
|
|
50
50
|
<input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
|
|
51
51
|
<label for="node-input-detailedOutput" style="width: 70%;"> Use detailed outputs</label>
|
|
52
|
+
<input type="hidden" id="node-input-outputs"/>
|
|
52
53
|
</div>
|
|
53
54
|
<hr>
|
|
54
55
|
<div class="form-row">
|
|
@@ -76,7 +77,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
76
77
|
return false;
|
|
77
78
|
}},
|
|
78
79
|
priority: {value:15, type: 'Number', validate:function(v) { return (v > 0 && v < 16) }},
|
|
79
|
-
connection: {type:"mobius connection", required:true}
|
|
80
|
+
connection: {type:"mobius connection", required:true},
|
|
81
|
+
outputs: {value:2},
|
|
80
82
|
},
|
|
81
83
|
color:"#8abff5",
|
|
82
84
|
inputs:1,
|
|
@@ -101,6 +103,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
101
103
|
return this.name ? "node_label_italic":"";
|
|
102
104
|
},
|
|
103
105
|
oneditprepare: function () {
|
|
106
|
+
$("#node-input-outputs").val(this.detailedOutput ? 4 : 2);
|
|
107
|
+
$("#node-input-detailedOutput").change(function() {
|
|
108
|
+
$("#node-input-outputs").val(this.checked ? 4 : 2);
|
|
109
|
+
});
|
|
104
110
|
var node = this;
|
|
105
111
|
let mobiusSrvc = $("#node-input-connection").val();
|
|
106
112
|
|
|
@@ -111,13 +117,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
111
117
|
};
|
|
112
118
|
initMobsearch.toRid(mobiusSrvc, opts);
|
|
113
119
|
},
|
|
114
|
-
oneditsave: function() {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
120
|
+
// oneditsave: function() {
|
|
121
|
+
// if($("#node-input-detailedOutput").prop('checked')) {
|
|
122
|
+
// this.outputs = 4;
|
|
123
|
+
// } else {
|
|
124
|
+
// this.outputs = 2;
|
|
125
|
+
// }
|
|
126
|
+
// }
|
|
121
127
|
});
|
|
122
128
|
</script>
|
|
123
129
|
|