node-red-contrib-mobius-flow-base 2.5.91 → 3.0.0-beta.12

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.
Files changed (39) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +16 -0
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +16 -0
  3. package/.github/ISSUE_TEMPLATE/general.md +7 -0
  4. package/.github/workflows/build_publish.yml +80 -0
  5. package/README.md +4 -10
  6. package/dist/engine-api-calls.d.ts +18 -0
  7. package/dist/engine-api-calls.js +214 -0
  8. package/dist/engine-api-client.d.ts +7 -0
  9. package/dist/engine-api-client.js +92 -0
  10. package/dist/engine-websocket.d.ts +58 -0
  11. package/dist/engine-websocket.js +226 -0
  12. package/dist/node-red-ui-funcs.js +180 -0
  13. package/dist/nodes/common/mobsearch.js +576 -0
  14. package/dist/nodes/mobius-clear-resource.html +22 -3
  15. package/dist/nodes/mobius-clear-resource.js +17 -12
  16. package/dist/nodes/mobius-connection.html +30 -8
  17. package/dist/nodes/mobius-connection.js +194 -85
  18. package/dist/nodes/mobius-discover-object-list.html +185 -126
  19. package/dist/nodes/mobius-discover-object-list.js +24 -5
  20. package/dist/nodes/mobius-discover.js +7 -7
  21. package/dist/nodes/mobius-filter-by-rid-value.html +57 -41
  22. package/dist/nodes/mobius-filter-by-rid-value.js +38 -31
  23. package/dist/nodes/mobius-flow-inject.html +32 -2
  24. package/dist/nodes/mobius-get-multi-object.html +39 -5
  25. package/dist/nodes/mobius-get-multi-resource.html +36 -4
  26. package/dist/nodes/mobius-get-multi-resource.js +13 -12
  27. package/dist/nodes/mobius-get-object.html +25 -3
  28. package/dist/nodes/mobius-get-object.js +12 -9
  29. package/dist/nodes/mobius-get-resource.html +26 -3
  30. package/dist/nodes/mobius-get-resource.js +17 -12
  31. package/dist/nodes/mobius-object-cov.html +27 -3
  32. package/dist/nodes/mobius-object-cov.js +9 -6
  33. package/dist/nodes/mobius-resource-cov.html +23 -3
  34. package/dist/nodes/mobius-resource-cov.js +5 -5
  35. package/dist/nodes/mobius-set-multi-resource.html +24 -3
  36. package/dist/nodes/mobius-set-multi-resource.js +9 -11
  37. package/dist/nodes/mobius-set-resource.html +24 -3
  38. package/package.json +13 -7
  39. package/dist/nodes/node-red-ui-discover-devices.js +0 -103
@@ -30,7 +30,7 @@
30
30
  const _ = require('lodash');
31
31
 
32
32
  module.exports = function (RED) {
33
- function MobiusGetObjectNode (n) {
33
+ function MobiusGetObjectNode(n) {
34
34
  RED.nodes.createNode(this, n);
35
35
  this.detailedOutput = n.detailedOutput;
36
36
  this.format = n.format;
@@ -42,7 +42,7 @@ module.exports = function (RED) {
42
42
  node.status({
43
43
  fill: 'red',
44
44
  shape: 'ring',
45
- text: 'Disconnected'
45
+ text: 'Disconnected',
46
46
  });
47
47
 
48
48
  node.on('input', function (msg) {
@@ -54,32 +54,35 @@ module.exports = function (RED) {
54
54
  node.status({
55
55
  fill: 'green',
56
56
  shape: 'ring',
57
- text: 'Busy'
57
+ text: 'Busy',
58
58
  });
59
59
  node.serviceConn.readObject(uri, (err, response) => {
60
60
  if (err) {
61
61
  node.status({
62
62
  fill: 'yellow',
63
63
  shape: 'dot',
64
- text: 'Error: ' + JSON.stringify(err.code)
64
+ text: 'Error: ' + JSON.stringify(err.code),
65
65
  });
66
66
  node.error('Mobius error reading object ' + JSON.stringify(err));
67
67
  if (node.detailedOutput === true) {
68
- node.send([null, null, {topic: uri, payload: { error: true, response: err }}]);
68
+ node.send([null, null, { topic: uri, payload: { error: true, response: err } }]);
69
69
  }
70
70
  } else {
71
71
  node.status({
72
72
  fill: 'green',
73
73
  shape: 'dot',
74
- text: JSON.stringify(response.uri)
74
+ text: JSON.stringify(response.uri),
75
75
  });
76
76
 
77
- let allResources = _.keyBy(response.value.resources, node.format === 'name' ? 'name' : 'rid');
77
+ let allResources = _.keyBy(
78
+ response.data.resources,
79
+ node.format === 'name' ? 'name' : 'rid'
80
+ );
78
81
  if (node.detailedOutput === true) {
79
82
  node.send([
80
83
  { topic: uri, payload: allResources },
81
- { topic: uri, payload: response.value },
82
- { topic: uri, payload: { error: false, response: response } }
84
+ { topic: uri, payload: response.data },
85
+ { topic: uri, payload: { error: false, response: response } },
83
86
  ]);
84
87
  } else {
85
88
  node.send({ topic: uri, payload: allResources });
@@ -29,10 +29,19 @@ POSSIBILITY OF SUCH DAMAGE.
29
29
  <label for="node-input-connection"><i class="fa fa-globe"></i> MOBiUS</label>
30
30
  <input type="text" id="node-input-connection">
31
31
  </div>
32
- <div class="form-row">
33
- <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
34
- <input type="text" id="node-input-resource" placeholder="Resource URI (hid/sid/pid/ins/rid)">
32
+
33
+ <hr>
34
+
35
+ <div id="instance-row">
36
+ <div class="form-row" id="input-row">
37
+ <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
38
+ <input type="text" id="node-input-resource" style="width:61%;" placeholder="HID/SID/PID/INS/RID">
39
+ </div>
35
40
  </div>
41
+
42
+ <div id="mobsearch"></div>
43
+
44
+
36
45
  <div class="form-row">
37
46
  <label>&nbsp;</label>
38
47
  <input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
@@ -45,6 +54,8 @@ POSSIBILITY OF SUCH DAMAGE.
45
54
  </div>
46
55
  </script>
47
56
 
57
+ <script src="common/mobsearch.js"></script>
58
+
48
59
  <script type="text/javascript">
49
60
  RED.nodes.registerType('mobius get resource',{
50
61
  category: 'mobius',
@@ -85,6 +96,18 @@ POSSIBILITY OF SUCH DAMAGE.
85
96
  labelStyle: function() {
86
97
  return this.name ? "node_label_italic":"";
87
98
  },
99
+ oneditprepare: function () {
100
+ var node = this;
101
+ let mobiusSrvc = $("#node-input-connection").val();
102
+
103
+ opts = {
104
+ htmlElementId: 'mobsearch',
105
+ uriFieldName: 'node-input-resource',
106
+ inputRowId: 'input-row',
107
+ };
108
+ initMobsearch.toRid(mobiusSrvc, opts);
109
+
110
+ },
88
111
  oneditsave: function() {
89
112
  if($("#node-input-detailedOutput").prop('checked')) {
90
113
  this.outputs = 4;
@@ -28,7 +28,7 @@
28
28
  'use strict';
29
29
 
30
30
  module.exports = function (RED) {
31
- function MobiusGetResourceNode (n) {
31
+ function MobiusGetResourceNode(n) {
32
32
  RED.nodes.createNode(this, n);
33
33
  this.detailedOutput = n.detailedOutput;
34
34
  this.resource = n.resource;
@@ -39,7 +39,7 @@ module.exports = function (RED) {
39
39
  node.status({
40
40
  fill: 'red',
41
41
  shape: 'ring',
42
- text: 'Disconnected'
42
+ text: 'Disconnected',
43
43
  });
44
44
 
45
45
  node.on('input', function (msg) {
@@ -51,36 +51,41 @@ module.exports = function (RED) {
51
51
  node.status({
52
52
  fill: 'green',
53
53
  shape: 'ring',
54
- text: 'Busy'
54
+ text: 'Busy',
55
55
  });
56
56
  node.serviceConn.readResource(uri, (err, response) => {
57
57
  if (err) {
58
58
  node.status({
59
59
  fill: 'yellow',
60
60
  shape: 'dot',
61
- text: 'Error: ' + JSON.stringify(err.code)
61
+ text: 'Error: ' + JSON.stringify(err.code),
62
62
  });
63
63
  node.error('Mobius error reading resource ' + JSON.stringify(err));
64
64
  if (node.detailedOutput === true) {
65
- node.send([null, null, null, {topic: uri, payload: {error: true, response: err}}]);
65
+ node.send([
66
+ null,
67
+ null,
68
+ null,
69
+ { topic: uri, payload: { error: true, response: err } },
70
+ ]);
66
71
  }
67
72
  } else {
68
73
  node.status({
69
74
  fill: 'green',
70
75
  shape: 'dot',
71
- text: JSON.stringify(response.value.pv)
76
+ text: JSON.stringify(response.data.pv),
72
77
  });
73
78
  if (node.detailedOutput === true) {
74
79
  node.send([
75
- { topic: uri, payload: response.value.pv },
76
- { topic: uri, payload: { pv: response.value.pv, name: response.value.name } },
77
- { topic: uri, payload: response.value },
78
- { topic: uri, payload: { error: false, response: response } }
80
+ { topic: uri, payload: response.data.pv },
81
+ { topic: uri, payload: { pv: response.data.pv, name: response.data.name } },
82
+ { topic: uri, payload: response.data },
83
+ { topic: uri, payload: { error: false, response: response } },
79
84
  ]);
80
85
  } else {
81
86
  node.send([
82
- { topic: uri, payload: response.value.pv },
83
- { topic: uri, payload: { pv: response.value.pv, name: response.value.name } }
87
+ { topic: uri, payload: response.data.pv },
88
+ { topic: uri, payload: { pv: response.data.pv, name: response.data.name } },
84
89
  ]);
85
90
  }
86
91
  }
@@ -29,10 +29,18 @@ POSSIBILITY OF SUCH DAMAGE.
29
29
  <label for="node-input-connection"><i class="fa fa-globe"></i> MOBiUS</label>
30
30
  <input type="text" id="node-input-connection">
31
31
  </div>
32
- <div class="form-row">
33
- <label for="node-input-object"><i class="fa fa-tasks"></i> URI</label>
34
- <input type="text" id="node-input-object" placeholder="Object URI (hid/sid/pid/ins)">
32
+
33
+ <hr>
34
+
35
+ <div id="instance-row">
36
+ <div class="form-row" id="input-row">
37
+ <label for="node-input-object"><i class="fa fa-tasks"></i> URI</label>
38
+ <input type="text" id="node-input-object" style="width:61%;" placeholder="Object URI (hid/sid/pid/ins)">
39
+ </div>
35
40
  </div>
41
+
42
+ <div id="mobsearch"></div>
43
+
36
44
  <div class="form-row">
37
45
  <label for="node-input-include"><i class="fa fa-bars"></i> Include</label>
38
46
  <select type="text" id="node-input-include" style="display: inline-block; width: auto; vertical-align: center;">
@@ -40,6 +48,7 @@ POSSIBILITY OF SUCH DAMAGE.
40
48
  <option value="changed">Changed Resources</option>
41
49
  </select>
42
50
  </div>
51
+
43
52
  <div class="form-row">
44
53
  <label for="node-input-format"><i class="fa fa-bars"></i> Format</label>
45
54
  <select type="text" id="node-input-format" style="display: inline-block; width: auto; vertical-align: center;">
@@ -47,6 +56,7 @@ POSSIBILITY OF SUCH DAMAGE.
47
56
  <option value="rid">By RID</option>
48
57
  </select>
49
58
  </div>
59
+
50
60
  <div class="form-row">
51
61
  <label>&nbsp;</label>
52
62
  <input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
@@ -59,6 +69,8 @@ POSSIBILITY OF SUCH DAMAGE.
59
69
  </div>
60
70
  </script>
61
71
 
72
+ <script src="common/mobsearch.js"></script>
73
+
62
74
  <script type="text/javascript">
63
75
  RED.nodes.registerType('mobius object cov', {
64
76
  category: 'mobius',
@@ -100,6 +112,18 @@ POSSIBILITY OF SUCH DAMAGE.
100
112
  labelStyle: function() {
101
113
  return this.name ? "node_label_italic":"";
102
114
  },
115
+ oneditprepare: function () {
116
+
117
+ var node = this;
118
+ let mobiusSrvc = $("#node-input-connection").val();
119
+
120
+ opts = {
121
+ htmlElementId: 'mobsearch',
122
+ uriFieldName: 'node-input-object',
123
+ inputRowId: 'input-row',
124
+ };
125
+ initMobsearch.toIns(mobiusSrvc, opts);
126
+ },
103
127
  oneditsave: function() {
104
128
  if($("#node-input-detailedOutput").prop('checked')) {
105
129
  this.outputs = 3;
@@ -29,7 +29,7 @@
29
29
  var _ = require('lodash');
30
30
 
31
31
  module.exports = function (RED) {
32
- function MobiusObjectCovNode (n) {
32
+ function MobiusObjectCovNode(n) {
33
33
  RED.nodes.createNode(this, n);
34
34
  this.detailedOutput = n.detailedOutput;
35
35
  this.object = n.object;
@@ -42,26 +42,29 @@ module.exports = function (RED) {
42
42
  node.status({
43
43
  fill: 'red',
44
44
  shape: 'ring',
45
- text: 'Disconnected'
45
+ text: 'Disconnected',
46
46
  });
47
47
 
48
48
  node.serviceConn.subscribeToObjectCOV(node.object, this.id, (response) => {
49
49
  node.status({
50
50
  fill: 'green',
51
51
  shape: 'dot',
52
- text: JSON.stringify(response.uri)
52
+ text: JSON.stringify(response.uri),
53
53
  });
54
- let allResources = _.keyBy(response.value.resources, node.format === 'name' ? 'name' : 'rid');
54
+ let allResources = _.keyBy(
55
+ response.value.resources,
56
+ node.format === 'name' ? 'name' : 'rid'
57
+ );
55
58
  if (node.include === 'changed') {
56
59
  allResources = _.pickBy(allResources, (res) => {
57
- return response.changed.includes(res.rid);
60
+ return response.additonalInformation.changed.includes(res.rid);
58
61
  });
59
62
  }
60
63
  if (node.detailedOutput === true) {
61
64
  node.send([
62
65
  { topic: response.uri, payload: allResources },
63
66
  { topic: response.uri, payload: response.value },
64
- { topic: response.uri, payload: { response: response } }
67
+ { topic: response.uri, payload: { response: response } },
65
68
  ]);
66
69
  } else {
67
70
  node.send({ topic: response.uri, payload: allResources });
@@ -29,10 +29,17 @@ POSSIBILITY OF SUCH DAMAGE.
29
29
  <label for="node-input-connection"><i class="fa fa-globe"></i> MOBiUS</label>
30
30
  <input type="text" id="node-input-connection">
31
31
  </div>
32
- <div class="form-row">
33
- <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
34
- <input type="text" id="node-input-resource" placeholder="Resource URI (hid/sid/pid/ins/rid)">
32
+
33
+ <hr>
34
+
35
+ <div id="instance-row">
36
+ <div class="form-row" id="input-row">
37
+ <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
38
+ <input type="text" id="node-input-resource" placeholder="Resource URI (hid/sid/pid/ins/rid)">
39
+ </div>
35
40
  </div>
41
+ <div id="mobsearch"></div>
42
+
36
43
  <div class="form-row">
37
44
  <label>&nbsp;</label>
38
45
  <input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
@@ -45,6 +52,8 @@ POSSIBILITY OF SUCH DAMAGE.
45
52
  </div>
46
53
  </script>
47
54
 
55
+ <script src="common/mobsearch.js"></script>
56
+
48
57
  <script type="text/javascript">
49
58
  RED.nodes.registerType('mobius resource cov', {
50
59
  category: 'mobius',
@@ -84,6 +93,17 @@ POSSIBILITY OF SUCH DAMAGE.
84
93
  labelStyle: function() {
85
94
  return this.name ? "node_label_italic":"";
86
95
  },
96
+ oneditprepare: function () {
97
+ var node = this;
98
+ let mobiusSrvc = $("#node-input-connection").val();
99
+
100
+ opts = {
101
+ htmlElementId: 'mobsearch',
102
+ uriFieldName: 'node-input-resource',
103
+ inputRowId: 'input-row',
104
+ };
105
+ initMobsearch.toRid(mobiusSrvc, opts);
106
+ },
87
107
  oneditsave: function() {
88
108
  if($("#node-input-detailedOutput").prop('checked')) {
89
109
  this.outputs = 4;
@@ -28,7 +28,7 @@
28
28
  'use strict';
29
29
 
30
30
  module.exports = function (RED) {
31
- function MobiusResourceCovNode (n) {
31
+ function MobiusResourceCovNode(n) {
32
32
  RED.nodes.createNode(this, n);
33
33
  this.detailedOutput = n.detailedOutput;
34
34
  this.resource = n.resource;
@@ -39,26 +39,26 @@ module.exports = function (RED) {
39
39
  node.status({
40
40
  fill: 'red',
41
41
  shape: 'ring',
42
- text: 'Disconnected'
42
+ text: 'Disconnected',
43
43
  });
44
44
 
45
45
  node.serviceConn.subscribeToCOV(node.resource, this.id, (response) => {
46
46
  node.status({
47
47
  fill: 'green',
48
48
  shape: 'dot',
49
- text: JSON.stringify(response.value.pv)
49
+ text: JSON.stringify(response.value.pv),
50
50
  });
51
51
  if (node.detailedOutput === true) {
52
52
  node.send([
53
53
  { topic: response.uri, payload: response.value.pv },
54
54
  { topic: response.uri, payload: { pv: response.value.pv, name: response.value.name } },
55
55
  { topic: response.uri, payload: response.value },
56
- { topic: response.uri, payload: { response: response } }
56
+ { topic: response.uri, payload: { response: response } },
57
57
  ]);
58
58
  } else {
59
59
  node.send([
60
60
  { topic: response.uri, payload: response.value.pv },
61
- { topic: response.uri, payload: { pv: response.value.pv, name: response.value.name } }
61
+ { topic: response.uri, payload: { pv: response.value.pv, name: response.value.name } },
62
62
  ]);
63
63
  }
64
64
  });
@@ -29,10 +29,18 @@ POSSIBILITY OF SUCH DAMAGE.
29
29
  <label for="node-input-connection"><i class="fa fa-globe"></i> MOBiUS</label>
30
30
  <input type="text" id="node-input-connection">
31
31
  </div>
32
- <div class="form-row">
33
- <label for="node-input-mobject"><i class="fa fa-tasks"></i> URI</label>
34
- <input type="text" id="node-input-mobject" placeholder="Object URI (hid/sid/pid/ins)">
32
+
33
+ <hr>
34
+
35
+ <div id="instance-row">
36
+ <div class="form-row" id="input-row">
37
+ <label for="node-input-mobject"><i class="fa fa-tasks"></i> URI</label>
38
+ <input type="text" style="width:61%;" id="node-input-mobject" placeholder="Object URI (hid/sid/pid/ins)">
39
+
40
+ </div>
35
41
  </div>
42
+ <div id="mobsearch"></div>
43
+
36
44
  <div class="form-row">
37
45
  <label>&nbsp;</label>
38
46
  <input type="checkbox" id="node-input-detailedOutput" style="display: inline-block; width: auto; vertical-align: top;">
@@ -45,6 +53,8 @@ POSSIBILITY OF SUCH DAMAGE.
45
53
  </div>
46
54
  </script>
47
55
 
56
+ <script src="common/mobsearch.js"></script>
57
+
48
58
  <script type="text/javascript">
49
59
  RED.nodes.registerType('mobius set multi-resource',{
50
60
  category: 'mobius',
@@ -82,6 +92,17 @@ POSSIBILITY OF SUCH DAMAGE.
82
92
  labelStyle: function() {
83
93
  return this.name ? "node_label_italic":"";
84
94
  },
95
+ oneditprepare: function () {
96
+ var node = this;
97
+ let mobiusSrvc = $("#node-input-connection").val();
98
+
99
+ opts = {
100
+ htmlElementId: 'mobsearch',
101
+ uriFieldName: 'node-input-mobject',
102
+ inputRowId: 'input-row',
103
+ };
104
+ initMobsearch.toIns(mobiusSrvc, opts);
105
+ },
85
106
  oneditsave: function() {
86
107
  if($("#node-input-detailedOutput").prop('checked')) {
87
108
  this.outputs = 2;
@@ -28,7 +28,7 @@
28
28
  'use strict';
29
29
 
30
30
  module.exports = function (RED) {
31
- function MobiusSetMultiResourceNode (n) {
31
+ function MobiusSetMultiResourceNode(n) {
32
32
  RED.nodes.createNode(this, n);
33
33
  this.detailedOutput = n.detailedOutput;
34
34
  this.mobject = n.mobject;
@@ -39,7 +39,7 @@ module.exports = function (RED) {
39
39
  node.status({
40
40
  fill: 'red',
41
41
  shape: 'ring',
42
- text: 'Disconnected'
42
+ text: 'Disconnected',
43
43
  });
44
44
 
45
45
  node.on('input', function (msg) {
@@ -55,7 +55,7 @@ module.exports = function (RED) {
55
55
  node.status({
56
56
  fill: 'green',
57
57
  shape: 'ring',
58
- text: 'Busy'
58
+ text: 'Busy',
59
59
  });
60
60
 
61
61
  node.serviceConn.multiWriteResourceValue(uri, value, (err, response) => {
@@ -63,27 +63,25 @@ module.exports = function (RED) {
63
63
  node.status({
64
64
  fill: 'yellow',
65
65
  shape: 'dot',
66
- text: 'Error: ' + JSON.stringify(err.code)
66
+ text: 'Error: ' + JSON.stringify(err.code),
67
67
  });
68
68
  node.error('Mobius error writing multiple resources ' + JSON.stringify(err));
69
69
  if (node.detailedOutput === true) {
70
- node.send([null, {topic: uri, payload: { error: true, response: err }}]);
70
+ node.send([null, { topic: uri, payload: { error: true, response: err } }]);
71
71
  }
72
72
  } else {
73
73
  node.status({
74
74
  fill: 'green',
75
75
  shape: 'dot',
76
- text: 'OK'
76
+ text: 'OK',
77
77
  });
78
78
  if (node.detailedOutput === true) {
79
79
  node.send([
80
- { topic: uri, payload: response.value },
81
- { topic: uri, payload: { error: false, response: response } }
80
+ { topic: uri, payload: response.data },
81
+ { topic: uri, payload: { error: false, response: response } },
82
82
  ]);
83
83
  } else {
84
- node.send([
85
- { topic: uri, payload: response.value }
86
- ]);
84
+ node.send([{ topic: uri, payload: response.data }]);
87
85
  }
88
86
  }
89
87
  });
@@ -29,10 +29,18 @@ POSSIBILITY OF SUCH DAMAGE.
29
29
  <label for="node-input-connection"><i class="fa fa-globe"></i> MOBiUS</label>
30
30
  <input type="text" id="node-input-connection">
31
31
  </div>
32
- <div class="form-row">
33
- <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
34
- <input type="text" id="node-input-resource" placeholder="Resource URI (hid/sid/pid/ins/rid)">
32
+
33
+ <hr>
34
+
35
+ <div id="instance-row">
36
+ <div class="form-row" id="input-row">
37
+ <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
38
+ <input type="text" id="node-input-resource" style="width:61%;" placeholder="Resource URI (hid/sid/pid/ins/rid)">
39
+ </div>
35
40
  </div>
41
+
42
+ <div id="mobsearch"></div>
43
+
36
44
  <div class="form-row">
37
45
  <label for="node-input-priority"><i class="fa fa-exclamation-triangle"></i> Priority</label>
38
46
  <input type="text" id="node-input-priority" placeholder="Priotity to write or clear">
@@ -49,6 +57,8 @@ POSSIBILITY OF SUCH DAMAGE.
49
57
  </div>
50
58
  </script>
51
59
 
60
+ <script src="common/mobsearch.js"></script>
61
+
52
62
  <script type="text/javascript">
53
63
  RED.nodes.registerType('mobius set resource',{
54
64
  category: 'mobius',
@@ -90,6 +100,17 @@ POSSIBILITY OF SUCH DAMAGE.
90
100
  labelStyle: function() {
91
101
  return this.name ? "node_label_italic":"";
92
102
  },
103
+ oneditprepare: function () {
104
+ var node = this;
105
+ let mobiusSrvc = $("#node-input-connection").val();
106
+
107
+ opts = {
108
+ htmlElementId: 'mobsearch',
109
+ uriFieldName: 'node-input-resource',
110
+ inputRowId: 'input-row',
111
+ };
112
+ initMobsearch.toRid(mobiusSrvc, opts);
113
+ },
93
114
  oneditsave: function() {
94
115
  if($("#node-input-detailedOutput").prop('checked')) {
95
116
  this.outputs = 4;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "node-red-contrib-mobius-flow-base",
3
- "version": "2.5.91",
3
+ "version": "3.0.0-beta.12",
4
4
  "description": "Node-RED base nodes for Mobius Flow",
5
5
  "main": "index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
- "build": "mkdir -p dist/nodes && cp src/nodes/*.js dist/nodes/ && cp src/nodes/*.html dist/nodes/ && cp -r src/nodes/icons dist/nodes/"
9
+ "build": "tsc && mkdir -p dist/nodes && cp src/nodes/*.js dist/nodes/ && cp src/nodes/*.html dist/nodes/ && cp -r src/nodes/icons dist/nodes/ && mkdir -p dist/nodes/common && cp src/mobsearch.js dist/nodes/common/ && cp src/node-red-ui-funcs.js dist/"
10
10
  },
11
11
  "repository": "bitbucket:interiorautomation/node-red-contrib-mobius-flow-base",
12
12
  "node-red": {
@@ -39,12 +39,18 @@
39
39
  "license": "Commercial",
40
40
  "homepage": "https://bitbucket.org/interiorautomation/node-red-contrib-mobius-flow-base#readme",
41
41
  "dependencies": {
42
- "@ia/mobius-tcpip-service-api": "^2.0.0",
43
- "lodash": "^4.17.11"
42
+ "axios": "^1.4.0",
43
+ "https": "^1.0.0",
44
+ "lodash": "^4.17.11",
45
+ "ws": "^8.13.0"
44
46
  },
45
47
  "devDependencies": {
46
- "@ia/eslint-config-ia": "^1.0.2",
47
- "@types/node": "^11.12.2",
48
- "typescript": "^3.4.1"
48
+ "@types/node": "^18.11.18",
49
+ "@typescript-eslint/eslint-plugin": "^5.56.0",
50
+ "@typescript-eslint/parser": "^5.56.0",
51
+ "eslint-config-prettier": "^8.8.0",
52
+ "prettier": "^2.8.7",
53
+ "prettier-eslint": "^15.0.1",
54
+ "typescript": "^4.9.4"
49
55
  }
50
56
  }