@theotherwillembotha/node-red-plugincore 0.0.50 → 0.0.51

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 (83) hide show
  1. package/README.md +60 -21
  2. package/build/GenerateNodes.js +2 -0
  3. package/build/Nodes.html +174 -250
  4. package/build/Nodes.js +2 -0
  5. package/build/core/NodeConstructor.d.ts +4 -2
  6. package/build/core/NodeConstructor.d.ts.map +1 -1
  7. package/build/core/NodeConstructor.js +5 -3
  8. package/build/core/NodeGenerator.js +8 -8
  9. package/build/core/logger/node/ConsoleLoggerConfigNode.html +20 -61
  10. package/build/core/logger/node/LokiLoggerConfigNode.d.ts +1 -1
  11. package/build/core/logger/node/LokiLoggerConfigNode.html +37 -73
  12. package/build/core/logger/node/LokiLoggerConfigNode.js +1 -1
  13. package/build/core/logger/node/RestLoggerConfigNode.html +51 -77
  14. package/build/core/logger/node/RestLoggerConfigNode.js +1 -1
  15. package/build/core/logger/service/LoggerService.d.ts +1 -1
  16. package/build/core/logger/service/LoggerService.d.ts.map +1 -1
  17. package/build/core/logger/service/LoggerService.js +2 -3
  18. package/build/core/logger/template/LoggerTemplate.d.ts.map +1 -1
  19. package/build/core/logger/template/LoggerTemplate.html +15 -12
  20. package/build/core/logger/template/LoggerTemplate.js +1 -2
  21. package/build/core/metrics/MetricsDecorator.js +2 -2
  22. package/build/core/metrics/node/CounterMetricConfigNode.html +2 -2
  23. package/build/core/metrics/node/GaugeMetricConfigNode.html +2 -2
  24. package/build/core/metrics/node/GaugeMetricConfigNode.js +2 -2
  25. package/build/core/metrics/node/MetricsConfigNode.html +1 -1
  26. package/build/core/metrics/node/TimerMetricConfigNode.html +13 -13
  27. package/build/core/metrics/service/MetricsService.d.ts +1 -1
  28. package/build/core/metrics/service/MetricsService.js +6 -6
  29. package/build/core/metrics/template/CounterMetricTemplate.html +1 -1
  30. package/build/core/metrics/template/GaugeMetricTemplate.html +1 -1
  31. package/build/core/metrics/template/TimerMetricTemplate.html +1 -1
  32. package/build/core/other/node/DelegatedConfigReferenceNode.d.ts +57 -0
  33. package/build/core/other/node/DelegatedConfigReferenceNode.d.ts.map +1 -0
  34. package/build/core/other/node/DelegatedConfigReferenceNode.html +1 -0
  35. package/build/core/other/node/DelegatedConfigReferenceNode.js +79 -0
  36. package/build/core/tagging/NodeDescriptionDecorator.js +1 -1
  37. package/build/core/tagging/service/NodeTypeService.js +1 -1
  38. package/build/core/webhook/node/WebhookServerConfigNode.html +5 -5
  39. package/build/core/webhook/template/WebhookTemplate.html +18 -10
  40. package/build/index.d.ts +1 -1
  41. package/build/index.d.ts.map +1 -1
  42. package/build/index.js +1 -1
  43. package/documentation/CounterMetricConfigNode.png +0 -0
  44. package/documentation/GaugeMetricConfigNode.png +0 -0
  45. package/documentation/MetricsConfigNode.png +0 -0
  46. package/documentation/TimerMetricConfigNode.png +0 -0
  47. package/documentation/WebhookNode.png +0 -0
  48. package/package.json +4 -3
  49. package/src/GenerateNodes.ts +3 -1
  50. package/src/core/NodeConstructor.ts +7 -4
  51. package/src/core/NodeGenerator.ts +8 -8
  52. package/src/core/logger/node/ConsoleLoggerConfigNode.html +20 -61
  53. package/src/core/logger/node/LokiLoggerConfigNode.html +37 -73
  54. package/src/core/logger/node/LokiLoggerConfigNode.ts +2 -2
  55. package/src/core/logger/node/RestLoggerConfigNode.html +51 -77
  56. package/src/core/logger/node/RestLoggerConfigNode.ts +1 -1
  57. package/src/core/logger/service/LoggerService.ts +3 -4
  58. package/src/core/logger/template/LoggerTemplate.html +15 -12
  59. package/src/core/logger/template/LoggerTemplate.ts +1 -2
  60. package/src/core/metrics/MetricsDecorator.ts +2 -2
  61. package/src/core/metrics/node/CounterMetricConfigNode.html +2 -2
  62. package/src/core/metrics/node/GaugeMetricConfigNode.html +2 -2
  63. package/src/core/metrics/node/GaugeMetricConfigNode.ts +2 -2
  64. package/src/core/metrics/node/MetricsConfigNode.html +1 -1
  65. package/src/core/metrics/node/MetricsConfigNode.ts +1 -1
  66. package/src/core/metrics/node/TimerMetricConfigNode.html +13 -13
  67. package/src/core/metrics/service/MetricsService.ts +6 -6
  68. package/src/core/metrics/template/CounterMetricTemplate.html +1 -1
  69. package/src/core/metrics/template/GaugeMetricTemplate.html +1 -1
  70. package/src/core/metrics/template/TimerMetricTemplate.html +1 -1
  71. package/src/core/other/node/DelegatedConfigReferenceNode.html +1 -0
  72. package/src/core/other/node/DelegatedConfigReferenceNode.ts +70 -0
  73. package/src/core/tagging/NodeDescriptionDecorator.ts +1 -1
  74. package/src/core/tagging/service/NodeTypeService.ts +1 -1
  75. package/src/core/webhook/node/WebhookServerConfigNode.html +5 -5
  76. package/src/core/webhook/template/WebhookTemplate.html +18 -10
  77. package/src/index.ts +1 -2
  78. package/build/core/logger/node/LoggerConfigNode.d.ts +0 -30
  79. package/build/core/logger/node/LoggerConfigNode.d.ts.map +0 -1
  80. package/build/core/logger/node/LoggerConfigNode.html +0 -307
  81. package/build/core/logger/node/LoggerConfigNode.js +0 -60
  82. package/src/core/logger/node/LoggerConfigNode.html +0 -307
  83. package/src/core/logger/node/LoggerConfigNode.ts +0 -95
package/build/Nodes.html CHANGED
@@ -8,6 +8,26 @@
8
8
 
9
9
  -->
10
10
 
11
+ <script type="text/javascript">
12
+ RED.nodes.registerType('DelegatedConfigReferenceNode', {
13
+ category: 'config',
14
+ defaults: {},
15
+ oneditprepare: function() {},
16
+ oneditsave: function() {},
17
+ oneditcancel: function() {},
18
+ oneditdelete: function() {},
19
+ });
20
+
21
+ </script>
22
+
23
+
24
+ <script type="text/html" data-template-name='DelegatedConfigReferenceNode'>
25
+
26
+ </script>
27
+
28
+ <script type="text/markdown" data-help-name='DelegatedConfigReferenceNode'>
29
+
30
+ </script>
11
31
  <script type="text/javascript">
12
32
  RED.nodes.registerType('ConsoleLoggerConfigNode', {
13
33
  category: 'config',
@@ -84,17 +104,17 @@
84
104
  <div id='section_ConsoleLoggerConfigNode'>
85
105
  <div id="LoggerConfig">
86
106
  <div class="form-row">
87
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
107
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
88
108
  <input type="text" id="node-config-input-name" />
89
109
  </div>
90
110
 
91
111
  <div class="form-row">
92
- <label for="node-config-input-level"><i class="fa fa-tag"></i> Level</label>
112
+ <label class="towb_editorlabel" for="node-config-input-level"><i class="fa fa-signal"></i> Level</label>
93
113
  <input type="text" id="node-config-input-level" />
94
114
  </div>
95
115
 
96
116
  <div class="form-row">
97
- <label for="node-config-input-templateEditor"><i class="fa fa-tag"></i> Template</label>
117
+ <label class="towb_editorlabel" for="node-config-input-templateEditor"><i class="fa fa-code"></i> Template</label>
98
118
  <div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-config-input-templateEditor"></div>
99
119
  </div>
100
120
  </div>
@@ -103,70 +123,29 @@
103
123
  </script>
104
124
 
105
125
  <script type="text/markdown" data-help-name='ConsoleLoggerConfigNode'>
106
- Configuration node for the Logger Integration
107
-
108
- ## Inputs
109
- : *name* (string) : The common name for the logger Configuration
110
- : *level* (level) : The logging level - debug, info, warning, error
111
- : *platform*(string) : The common name for the logger Configuration
112
- : *template*(mustache) : A template for the log messages.
113
-
114
- ## Logger platform
115
- Currently supported logging platforms
126
+ Writes log output to the Node-RED runtime console (stdout). Suitable for local development and containerised environments where stdout is captured.
116
127
 
117
- ### Console
118
- The log message will be printed out to stdio
128
+ ### Properties
129
+ : *name* (string) : A descriptive name for this logger configuration.
130
+ : *level* (level) : The minimum log level. Messages below this threshold are suppressed. Options: DEBUG, INFO, WARNING, ERROR.
131
+ : *template* (mustache) : A Mustache/Handlebars template that formats the log message body.
119
132
 
120
- ### Http / Https
121
- Publish the message to an http endpoint using a http / https POST command.
133
+ ### Mustache Templating
134
+ Mustache/Handlebars templates build the message string written to the console.
122
135
 
123
- : *url* (url) : The endpoint for the url where requests are to be posted to.
124
- : *ignore ssl errors* (boolean) : If enabled, the invalid ssl certificates will be ignored.
125
- : *authentication* (auth method) : what auth method should be used for the http request. (none, basic, api key)
136
+ #### Provided Properties
137
+ : *msg* (object) : The Node-RED message object passed through the node.
138
+ : *currentTime* (string) : The current time in ISO 8601 format.
126
139
 
127
- #### Authentication
128
- ##### Basic
129
- Provides basic authentication using the Authorization header
140
+ #### Helpers
141
+ : *json* (helper) : Serialises an object to a JSON string using `JSON.stringify`.
130
142
 
131
- : *username* (string) : the username used for basic authentication
132
- : *password* (string) : the password used for basic authentication
143
+ #### Examples
144
+ - `{{{json msg}}}` — serialises the full message object as JSON.
133
145
 
134
- ##### APIKey
135
- Provides authentication using a matrix parameter, header or query parameter and an apikey
136
-
137
- : *mechanism* (mechanism) : the mechanism that will be used for transmitting the key (header, queryparam, matrixparam)
138
- : *apikey name* (string) : the name of the key used for api authentication. (path variable or query param name)
139
- : *apikey value*(string) : the value of the api key that will be transmitted. (beware of special characters)
140
-
141
- ### Loki
142
- Publish the message to a loki endpoint.
143
-
144
- : *host* (string) : the host and port\ of the loki instance that it being logged to
145
- : *tenant* (string) : the tenant id that will be used to log to
146
- : *username* (string) : the username for the loki instance.
147
- : *authtoken* (string) : the authtoken for the loki instance.
148
-
149
- # Mustache Templating
150
- Mustache / Handlebars are used for building up the logged message payloads that are sent to the logging backend.
151
- The resultant message will be interpreted as a string, meaning care should be taken in the event that a string representation of a json object is built.
152
-
153
- ### Provided Properties
154
- A couple of values are provided to the logging context by default.
155
-
156
- : *msg* (object) : an object containing the payload or message that should be parsed through the template.
157
- : *currentTime* (object) : a string containing the current time in ISO8601 format
158
-
159
- ### Mustache Helpers
160
- In addition to the provided properties, some "helpers" have also been provided to assist in serialization.
161
-
162
- : *json* (helper) : converts a json object to a string using the JSON.stringify method.
163
-
164
- ## Examples
165
- - {{{json msg}}} - serializes the the msg object to json format.
166
-
167
- # References
168
- - [Mustache - Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
169
- - [Mustache - Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
146
+ #### References
147
+ - [Mustache — Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
148
+ - [Mustache — Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
170
149
  </script>
171
150
  <script type="text/javascript">
172
151
  RED.nodes.registerType('RestLoggerConfigNode', {
@@ -188,8 +167,8 @@ In addition to the provided properties, some "helpers" have also been provided t
188
167
  value: 'info',
189
168
  required: true
190
169
  },
191
- est_url: {},
192
- est_ignoresslerror: {},
170
+ rest_url: {},
171
+ rest_ignoresslerror: {},
193
172
  rest_auth_type: {},
194
173
  rest_auth_basic_username: {},
195
174
  rest_auth_basic_password: {},
@@ -293,53 +272,53 @@ In addition to the provided properties, some "helpers" have also been provided t
293
272
  <div id='section_RestLoggerConfigNode'>
294
273
  <div id="LoggerConfig">
295
274
  <div class="form-row">
296
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
275
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
297
276
  <input type="text" id="node-config-input-name" />
298
277
  </div>
299
278
 
300
279
  <div class="form-row">
301
- <label for="node-config-input-level"><i class="fa fa-tag"></i> Level</label>
280
+ <label class="towb_editorlabel" for="node-config-input-level"><i class="fa fa-signal"></i> Level</label>
302
281
  <input type="text" id="node-config-input-level" />
303
282
  </div>
304
283
 
305
284
  <div class="platform platform-rest">
306
285
  <div class="form-row">
307
- <label for="node-config-input-rest_url"><i class="fa fa-tag"></i> URL</label>
286
+ <label class="towb_editorlabel" for="node-config-input-rest_url"><i class="fa fa-link"></i> URL</label>
308
287
  <input class="platform-rest-input required" type="text" id="node-config-input-rest_url" />
309
288
  </div>
310
289
  <div class="form-row">
311
- <label></label>
290
+ <label class="towb_editorlabel"></label>
312
291
  <input type="checkbox" id="node-config-input-rest_ignoresslerror" style="width:20px; margin-right:5px;" />
313
292
  <label style="width:auto" for="node-config-input-rest_ignoresslerror"><span>Ignore Invalid SSL certificates</span></label>
314
293
  </div>
315
294
  <div class="form-row">
316
- <label for="node-config-input-rest_auth_type"><i class="fa fa-tag"></i> Authentication</label>
295
+ <label class="towb_editorlabel" for="node-config-input-rest_auth_type"><i class="fa fa-lock"></i> Authentication</label>
317
296
  <input class="platform-rest-input required" type="text" id="node-config-input-rest_auth_type" />
318
297
  </div>
319
298
  <div class="form-row platform-rest-auth auth-basic">
320
- <label for="node-config-input-rest_auth_basic_username"><i class="fa fa-tag"></i> Username</label>
299
+ <label class="towb_editorlabel" for="node-config-input-rest_auth_basic_username"><i class="fa fa-user"></i> Username</label>
321
300
  <input class="platform-rest-input" type="text" id="node-config-input-rest_auth_basic_username" />
322
301
  </div>
323
302
  <div class="form-row platform-rest-auth auth-basic">
324
- <label for="node-config-input-rest_auth_basic_password"><i class="fa fa-tag"></i> Password</label>
303
+ <label class="towb_editorlabel" for="node-config-input-rest_auth_basic_password"><i class="fa fa-key"></i> Password</label>
325
304
  <input class="platform-rest-input" type="password" id="node-config-input-rest_auth_basic_password" />
326
305
  </div>
327
306
  <div class="form-row platform-rest-auth auth-apikey">
328
- <label for="node-config-input-rest_auth_apikey_mechanism"><i class="fa fa-tag"></i> Mechanism</label>
307
+ <label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_mechanism"><i class="fa fa-exchange"></i> Mechanism</label>
329
308
  <input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_mechanism" />
330
309
  </div>
331
310
  <div class="form-row platform-rest-auth auth-apikey">
332
- <label for="node-config-input-rest_auth_apikey_name"><i class="fa fa-tag"></i> APIKey name</label>
311
+ <label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_name"><i class="fa fa-id-badge"></i> APIKey name</label>
333
312
  <input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_name" />
334
313
  </div>
335
314
  <div class="form-row platform-rest-auth auth-apikey">
336
- <label for="node-config-input-rest_auth_apikey_value"><i class="fa fa-tag"></i> APIKey value</label>
315
+ <label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_value"><i class="fa fa-lock"></i> APIKey value</label>
337
316
  <input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_value" />
338
317
  </div>
339
318
  </div>
340
319
 
341
320
  <div class="form-row">
342
- <label for="node-config-input-templateEditor"><i class="fa fa-tag"></i> Template</label>
321
+ <label class="towb_editorlabel" for="node-config-input-templateEditor"><i class="fa fa-code"></i> Template</label>
343
322
  <div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-config-input-templateEditor"></div>
344
323
  </div>
345
324
  </div>
@@ -348,70 +327,44 @@ In addition to the provided properties, some "helpers" have also been provided t
348
327
  </script>
349
328
 
350
329
  <script type="text/markdown" data-help-name='RestLoggerConfigNode'>
351
- Configuration node for the Logger Integration
352
-
353
- ## Inputs
354
- : *name* (string) : The common name for the logger Configuration
355
- : *level* (level) : The logging level - debug, info, warning, error
356
- : *platform*(string) : The common name for the logger Configuration
357
- : *template*(mustache) : A template for the log messages.
358
-
359
- ## Logger platform
360
- Currently supported logging platforms
361
-
362
- ### Console
363
- The log message will be printed out to stdio
364
-
365
- ### Http / Https
366
- Publish the message to an http endpoint using a http / https POST command.
367
-
368
- : *url* (url) : The endpoint for the url where requests are to be posted to.
369
- : *ignore ssl errors* (boolean) : If enabled, the invalid ssl certificates will be ignored.
370
- : *authentication* (auth method) : what auth method should be used for the http request. (none, basic, api key)
371
-
372
- #### Authentication
373
- ##### Basic
374
- Provides basic authentication using the Authorization header
375
-
376
- : *username* (string) : the username used for basic authentication
377
- : *password* (string) : the password used for basic authentication
378
-
379
- ##### APIKey
380
- Provides authentication using a matrix parameter, header or query parameter and an apikey
381
-
382
- : *mechanism* (mechanism) : the mechanism that will be used for transmitting the key (header, queryparam, matrixparam)
383
- : *apikey name* (string) : the name of the key used for api authentication. (path variable or query param name)
384
- : *apikey value*(string) : the value of the api key that will be transmitted. (beware of special characters)
385
-
386
- ### Loki
387
- Publish the message to a loki endpoint.
388
-
389
- : *host* (string) : the host and port\ of the loki instance that it being logged to
390
- : *tenant* (string) : the tenant id that will be used to log to
391
- : *username* (string) : the username for the loki instance.
392
- : *authtoken* (string) : the authtoken for the loki instance.
393
-
394
- # Mustache Templating
395
- Mustache / Handlebars are used for building up the logged message payloads that are sent to the logging backend.
396
- The resultant message will be interpreted as a string, meaning care should be taken in the event that a string representation of a json object is built.
397
-
398
- ### Provided Properties
399
- A couple of values are provided to the logging context by default.
400
-
401
- : *msg* (object) : an object containing the payload or message that should be parsed through the template.
402
- : *currentTime* (object) : a string containing the current time in ISO8601 format
403
-
404
- ### Mustache Helpers
405
- In addition to the provided properties, some "helpers" have also been provided to assist in serialization.
406
-
407
- : *json* (helper) : converts a json object to a string using the JSON.stringify method.
408
-
409
- ## Examples
410
- - {{{json msg}}} - serializes the the msg object to json format.
411
-
412
- # References
413
- - [Mustache - Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
414
- - [Mustache - Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
330
+ Posts log messages to an HTTP or HTTPS endpoint as a JSON payload.
331
+
332
+ ### Properties
333
+ : *name* (string) : A descriptive name for this logger configuration.
334
+ : *level* (level) : The minimum log level. Messages below this threshold are suppressed. Options: DEBUG, INFO, WARNING, ERROR.
335
+ : *url* (url) : The endpoint that log messages will be POSTed to.
336
+ : *ignore SSL errors* (boolean) : When enabled, invalid SSL certificates are accepted.
337
+ : *authentication* (select) : The authentication strategy applied to each request. Options: None, Basic, ApiKey.
338
+ : *template* (mustache) : A Mustache/Handlebars template that formats the log message body.
339
+
340
+ ### Authentication
341
+ #### Basic
342
+ Authenticates using the HTTP `Authorization` header (RFC 7617).
343
+ : *username* (string) : The username credential.
344
+ : *password* (string) : The password credential.
345
+
346
+ #### ApiKey
347
+ Authenticates by injecting a key/value pair into the request.
348
+ : *mechanism* (select) : Where the key is injected — Header, Query Param, or Matrix Param.
349
+ : *APIKey name* (string) : The name of the key (e.g. `x-api-key`).
350
+ : *APIKey value* (string) : The value of the key.
351
+
352
+ ### Mustache Templating
353
+ Mustache/Handlebars templates build the message string POSTed to the endpoint.
354
+
355
+ #### Provided Properties
356
+ : *msg* (object) : The Node-RED message object passed through the node.
357
+ : *currentTime* (string) : The current time in ISO 8601 format.
358
+
359
+ #### Helpers
360
+ : *json* (helper) : Serialises an object to a JSON string using `JSON.stringify`.
361
+
362
+ #### Examples
363
+ - `{{{json msg}}}` — serialises the full message object as JSON.
364
+
365
+ #### References
366
+ - [Mustache — Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
367
+ - [Mustache — Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
415
368
  </script>
416
369
  <script type="text/javascript">
417
370
  RED.nodes.registerType('LokiLoggerConfigNode', {
@@ -434,7 +387,7 @@ In addition to the provided properties, some "helpers" have also been provided t
434
387
  required: true
435
388
  },
436
389
  loki_host: {},
437
- loki_tenantID: {},
390
+ loki_tenantid: {},
438
391
  loki_userid: {},
439
392
  loki_authtoken: {},
440
393
  },
@@ -489,34 +442,34 @@ In addition to the provided properties, some "helpers" have also been provided t
489
442
  <div id='section_LokiLoggerConfigNode'>
490
443
  <div id="LoggerConfig">
491
444
  <div class="form-row">
492
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
445
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
493
446
  <input type="text" id="node-config-input-name" />
494
447
  </div>
495
448
 
496
449
  <div class="form-row">
497
- <label for="node-config-input-level"><i class="fa fa-tag"></i> Level</label>
450
+ <label class="towb_editorlabel" for="node-config-input-level"><i class="fa fa-signal"></i> Level</label>
498
451
  <input type="text" id="node-config-input-level" />
499
452
  </div>
500
453
 
501
454
  <div class="form-row">
502
- <label for="node-config-input-loki_host"><i class="fa fa-tag"></i> Host</label>
455
+ <label class="towb_editorlabel" for="node-config-input-loki_host"><i class="fa fa-server"></i> Host</label>
503
456
  <input class="required" type="text" id="node-config-input-loki_host" />
504
457
  </div>
505
458
  <div class="form-row">
506
- <label for="node-config-input-loki_tenantID"><i class="fa fa-tag"></i> TenantID</label>
507
- <input class="" type="text" id="node-config-input-loki_tenantID" />
459
+ <label class="towb_editorlabel" for="node-config-input-loki_tenantid"><i class="fa fa-building-o"></i> Tenant ID</label>
460
+ <input class="" type="text" id="node-config-input-loki_tenantid" />
508
461
  </div>
509
462
  <div class="form-row">
510
- <label for="node-config-input-loki_userid"><i class="fa fa-tag"></i> Username</label>
463
+ <label class="towb_editorlabel" for="node-config-input-loki_userid"><i class="fa fa-user"></i> Username</label>
511
464
  <input class="" type="text" id="node-config-input-loki_userid" />
512
465
  </div>
513
466
  <div class="form-row">
514
- <label for="node-config-input-loki_authtoken"><i class="fa fa-tag"></i> AuthToken</label>
467
+ <label class="towb_editorlabel" for="node-config-input-loki_authtoken"><i class="fa fa-key"></i> Auth Token</label>
515
468
  <input class="" type="password" id="node-config-input-loki_authtoken" />
516
469
  </div>
517
470
 
518
471
  <div class="form-row">
519
- <label for="node-config-input-templateEditor"><i class="fa fa-tag"></i> Template</label>
472
+ <label class="towb_editorlabel" for="node-config-input-templateEditor"><i class="fa fa-code"></i> Template</label>
520
473
  <div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-config-input-templateEditor"></div>
521
474
  </div>
522
475
  </div>
@@ -525,70 +478,34 @@ In addition to the provided properties, some "helpers" have also been provided t
525
478
  </script>
526
479
 
527
480
  <script type="text/markdown" data-help-name='LokiLoggerConfigNode'>
528
- Configuration node for the Logger Integration
529
-
530
- ## Inputs
531
- : *name* (string) : The common name for the logger Configuration
532
- : *level* (level) : The logging level - debug, info, warning, error
533
- : *platform*(string) : The common name for the logger Configuration
534
- : *template*(mustache) : A template for the log messages.
535
-
536
- ## Logger platform
537
- Currently supported logging platforms
538
-
539
- ### Console
540
- The log message will be printed out to stdio
541
-
542
- ### Http / Https
543
- Publish the message to an http endpoint using a http / https POST command.
544
-
545
- : *url* (url) : The endpoint for the url where requests are to be posted to.
546
- : *ignore ssl errors* (boolean) : If enabled, the invalid ssl certificates will be ignored.
547
- : *authentication* (auth method) : what auth method should be used for the http request. (none, basic, api key)
548
-
549
- #### Authentication
550
- ##### Basic
551
- Provides basic authentication using the Authorization header
552
-
553
- : *username* (string) : the username used for basic authentication
554
- : *password* (string) : the password used for basic authentication
555
-
556
- ##### APIKey
557
- Provides authentication using a matrix parameter, header or query parameter and an apikey
558
-
559
- : *mechanism* (mechanism) : the mechanism that will be used for transmitting the key (header, queryparam, matrixparam)
560
- : *apikey name* (string) : the name of the key used for api authentication. (path variable or query param name)
561
- : *apikey value*(string) : the value of the api key that will be transmitted. (beware of special characters)
562
-
563
- ### Loki
564
- Publish the message to a loki endpoint.
565
-
566
- : *host* (string) : the host and port\ of the loki instance that it being logged to
567
- : *tenant* (string) : the tenant id that will be used to log to
568
- : *username* (string) : the username for the loki instance.
569
- : *authtoken* (string) : the authtoken for the loki instance.
570
-
571
- # Mustache Templating
572
- Mustache / Handlebars are used for building up the logged message payloads that are sent to the logging backend.
573
- The resultant message will be interpreted as a string, meaning care should be taken in the event that a string representation of a json object is built.
574
-
575
- ### Provided Properties
576
- A couple of values are provided to the logging context by default.
577
-
578
- : *msg* (object) : an object containing the payload or message that should be parsed through the template.
579
- : *currentTime* (object) : a string containing the current time in ISO8601 format
580
-
581
- ### Mustache Helpers
582
- In addition to the provided properties, some "helpers" have also been provided to assist in serialization.
583
-
584
- : *json* (helper) : converts a json object to a string using the JSON.stringify method.
585
-
586
- ## Examples
587
- - {{{json msg}}} - serializes the the msg object to json format.
588
-
589
- # References
590
- - [Mustache - Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
591
- - [Mustache - Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
481
+ Pushes log messages to a Grafana Loki instance using the Loki HTTP API.
482
+
483
+ ### Properties
484
+ : *name* (string) : A descriptive name for this logger configuration.
485
+ : *level* (level) : The minimum log level. Messages below this threshold are suppressed. Options: DEBUG, INFO, WARNING, ERROR.
486
+ : *host* (string) : The base URL of the Loki instance, including port (e.g. `http://localhost:3100`).
487
+ : *tenant ID* (string) : The tenant identifier for multi-tenant Loki deployments (`X-Scope-OrgID` header). Leave blank for single-tenant deployments.
488
+ : *username* (string) : Username for Loki authentication.
489
+ : *auth token* (string) : Authentication token or password for Loki.
490
+ : *template* (mustache) : A Mustache/Handlebars template that formats the log message body.
491
+
492
+ ### Mustache Templating
493
+ Mustache/Handlebars templates build the message string pushed to Loki.
494
+
495
+ #### Provided Properties
496
+ : *msg* (object) : The Node-RED message object passed through the node.
497
+ : *currentTime* (string) : The current time in ISO 8601 format.
498
+
499
+ #### Helpers
500
+ : *json* (helper) : Serialises an object to a JSON string using `JSON.stringify`.
501
+
502
+ #### Examples
503
+ - `{{{json msg}}}` — serialises the full message object as JSON.
504
+
505
+ #### References
506
+ - [Grafana Loki — HTTP API](https://grafana.com/docs/loki/latest/reference/loki-http-api/)
507
+ - [Mustache — Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
508
+ - [Mustache — Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
592
509
  </script>
593
510
  <!-- webhook -->
594
511
  <script type="text/javascript">
@@ -806,6 +723,11 @@ In addition to the provided properties, some "helpers" have also been provided t
806
723
  });
807
724
  return types;
808
725
  }
726
+ getProxyTypes().then(types => {
727
+ if (types.length === 0) {
728
+ $("#section_reverseproxy_feature").hide();
729
+ }
730
+ });
809
731
  let getProxies = async () => {
810
732
  let proxies = [];
811
733
  // get the list of types again.
@@ -981,7 +903,7 @@ In addition to the provided properties, some "helpers" have also been provided t
981
903
  <div id='section_MetricsConfigNode'>
982
904
  <div id="MetricsConfig">
983
905
  <div class="form-row">
984
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
906
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
985
907
  <input type="text" id="node-config-input-name" />
986
908
  </div>
987
909
  </div>
@@ -996,17 +918,17 @@ In addition to the provided properties, some "helpers" have also been provided t
996
918
 
997
919
  <div class="editorgroupborder">
998
920
  <div class="form-row nomargin">
999
- <label for="node-config-input-webhook">Server</label>
921
+ <label class="towb_editorlabel" for="node-config-input-webhook"><i class="fa fa-server"></i> Server</label>
1000
922
  <input id="node-config-input-webhook" placeholder="webhook" />
1001
923
  </div>
1002
924
 
1003
925
  <div class="form-row">
1004
- <label for="node-config-input-webhookPath">Path</label>
926
+ <label class="towb_editorlabel" for="node-config-input-webhookPath"><i class="fa fa-link"></i> Path</label>
1005
927
  <input type="text" id="node-config-input-webhookPath" placeholder="/example" />
1006
928
  </div>
1007
929
 
1008
930
  <div class="form-row">
1009
- <label for="node-config-input-webhookAuth">Authentication</label>
931
+ <label class="towb_editorlabel" for="node-config-input-webhookAuth"><i class="fa fa-lock"></i> Authentication</label>
1010
932
  <input type="text" id="node-config-input-webhookAuth" placeholder="none" />
1011
933
  </div>
1012
934
 
@@ -1015,42 +937,44 @@ In addition to the provided properties, some "helpers" have also been provided t
1015
937
 
1016
938
  <div class="webhookauth webhookauth-basic">
1017
939
  <div class="form-row">
1018
- <label for="node-config-input-webhookAuth_basic_username">Auth Username:</label>
940
+ <label class="towb_editorlabel" for="node-config-input-webhookAuth_basic_username"><i class="fa fa-user"></i> Username</label>
1019
941
  <input type="text" id="node-config-input-webhookAuth_basic_username" placeholder="testUser" />
1020
942
  </div>
1021
943
 
1022
944
  <div class="form-row">
1023
- <label for="node-config-input-webhookAuth_basic_password">Auth Password:</label>
945
+ <label class="towb_editorlabel" for="node-config-input-webhookAuth_basic_password"><i class="fa fa-key"></i> Password</label>
1024
946
  <input type="password" id="node-config-input-webhookAuth_basic_password" placeholder="password" />
1025
947
  </div>
1026
948
  </div>
1027
949
 
1028
950
  <div class="webhookauth webhookauth-apikey">
1029
951
  <div class="form-row">
1030
- <label for="node-config-input-webhookAuth_apikey_mechanism">APIKey Mechanism:</label>
952
+ <label class="towb_editorlabel" for="node-config-input-webhookAuth_apikey_mechanism"><i class="fa fa-exchange"></i> Mechanism</label>
1031
953
  <input type="text" id="node-config-input-webhookAuth_apikey_mechanism" />
1032
954
  </div>
1033
955
 
1034
956
  <div class="form-row">
1035
- <label for="node-config-input-webhookAuth_apikey_key">APIKey Key:</label>
957
+ <label class="towb_editorlabel" for="node-config-input-webhookAuth_apikey_key"><i class="fa fa-id-badge"></i> APIKey name</label>
1036
958
  <input type="text" id="node-config-input-webhookAuth_apikey_key" placeholder="x-api-key" />
1037
959
  </div>
1038
960
 
1039
961
  <div class="form-row">
1040
- <label for="node-config-input-webhookAuth_apikey_value">APIKey Value</label>
962
+ <label class="towb_editorlabel" for="node-config-input-webhookAuth_apikey_value"><i class="fa fa-lock"></i> APIKey value</label>
1041
963
  <input type="text" id="node-config-input-webhookAuth_apikey_value" placeholder="testvalue" />
1042
964
  </div>
1043
965
  </div>
1044
966
 
1045
- <div class="form-row">
1046
- <label>Reverse Proxy</label>
1047
- <input type="checkbox" id="node-config-input-reverseProxies_enabled" style="width:20px; margin-right:5px;" />
1048
- <label style="width:auto" for="node-config-input-reverseProxies_enabled"><span>Enable Reverse Proxy</span></label>
1049
- </div>
1050
- <div id="section_webhookconfig_reverseproxy" style="display:none">
967
+ <div id="section_reverseproxy_feature">
1051
968
  <div class="form-row">
1052
- <label></label>
1053
- <ol id="reverseproxylist_table" class="theotherwillembotha-compact-table"></ol>
969
+ <label>Reverse Proxy</label>
970
+ <input type="checkbox" id="node-config-input-reverseProxies_enabled" style="width:20px; margin-right:5px;" />
971
+ <label style="width:auto" for="node-config-input-reverseProxies_enabled"><span>Enable Reverse Proxy</span></label>
972
+ </div>
973
+ <div id="section_webhookconfig_reverseproxy" style="display:none">
974
+ <div class="form-row">
975
+ <label></label>
976
+ <ol id="reverseproxylist_table" class="theotherwillembotha-compact-table"></ol>
977
+ </div>
1054
978
  </div>
1055
979
  </div>
1056
980
 
@@ -1166,12 +1090,12 @@ The *external host* and *external port* fields on the linked **Webhook Server**
1166
1090
  <div id='section_CounterMetricConfigNode'>
1167
1091
  <div id="MetricsConfig">
1168
1092
  <div class="form-row">
1169
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
1093
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
1170
1094
  <input type="text" id="node-config-input-name" />
1171
1095
  </div>
1172
1096
 
1173
1097
  <div class="form-row">
1174
- <label for="node-config-input-description"><i class="fa fa-tag"></i> Description</label>
1098
+ <label class="towb_editorlabel" for="node-config-input-description"><i class="fa fa-info-circle"></i> Description</label>
1175
1099
  <input type="text" id="node-config-input-description" />
1176
1100
  </div>
1177
1101
 
@@ -1288,12 +1212,12 @@ Configuration node for the Counter Metrics
1288
1212
  <div id='section_GaugeMetricConfigNode'>
1289
1213
  <div id="MetricsConfig">
1290
1214
  <div class="form-row">
1291
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
1215
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
1292
1216
  <input type="text" id="node-config-input-name">
1293
1217
  </div>
1294
1218
 
1295
1219
  <div class="form-row">
1296
- <label for="node-config-input-description"><i class="fa fa-tag"></i> Description</label>
1220
+ <label class="towb_editorlabel" for="node-config-input-description"><i class="fa fa-info-circle"></i> Description</label>
1297
1221
  <input type="text" id="node-config-input-description">
1298
1222
  </div>
1299
1223
 
@@ -1522,23 +1446,23 @@ Configuration node for the Gauge Metrics
1522
1446
  <div id='section_TimerMetricConfigNode'>
1523
1447
  <div id="TimerMetricConfig">
1524
1448
  <div class="form-row">
1525
- <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
1449
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
1526
1450
  <input type="text" id="node-config-input-name" />
1527
1451
  </div>
1528
1452
 
1529
1453
  <div class="form-row">
1530
- <label class="towb_editorlabel" for="node-config-input-description"><i class="fa fa-tag"></i> Description</label>
1454
+ <label class="towb_editorlabel" for="node-config-input-description"><i class="fa fa-info-circle"></i> Description</label>
1531
1455
  <input type="text" id="node-config-input-description" />
1532
1456
  </div>
1533
1457
 
1534
1458
  <div class="form-row">
1535
- <label class="towb_editorlabel" for="node-config-input-metricType"><i class="fa fa-tag"></i> Type</label>
1459
+ <label class="towb_editorlabel" for="node-config-input-metricType"><i class="fa fa-bar-chart"></i> Type</label>
1536
1460
  <input class="towb_editorfield" type="text" id="node-config-input-metricType" />
1537
1461
  </div>
1538
1462
 
1539
1463
  <div class="metrictype metrictype_histogram">
1540
1464
  <div class="form-row">
1541
- <label class="towb_editorlabel" for="node-config-input-buckettype"><i class="fa fa-tag"></i> Bucket Type</label>
1465
+ <label class="towb_editorlabel" for="node-config-input-buckettype"><i class="fa fa-sliders"></i> Bucket Type</label>
1542
1466
  <input class="towb_editorfield" type="text" id="node-config-input-buckettype" />
1543
1467
  </div>
1544
1468
 
@@ -1548,37 +1472,37 @@ Configuration node for the Gauge Metrics
1548
1472
 
1549
1473
  <div class="metricsconfig_buckets metricsconfig_buckets_manual">
1550
1474
  <div class="form-row">
1551
- <label class="towb_editorlabel" for="node-config-input-buckettype_manual_intervals"><i class="fa fa-tag"></i> Buckets</label>
1475
+ <label class="towb_editorlabel" for="node-config-input-buckettype_manual_intervals"><i class="fa fa-sliders"></i> Buckets</label>
1552
1476
  <input type="text" id="node-config-input-buckettype_manual_intervals" placeholder="0.001, 0.01, 0.1, 1, 2, 5" , value="0.001, 0.01, 0.1, 1, 2, 5" />
1553
1477
  </div>
1554
1478
  </div>
1555
1479
 
1556
1480
  <div class="metricsconfig_buckets metricsconfig_buckets_linear">
1557
1481
  <div class="form-row">
1558
- <label class="towb_editorlabel" for="node-config-input-buckettype_linear_start"><i class="fa fa-tag"></i> Start</label>
1482
+ <label class="towb_editorlabel" for="node-config-input-buckettype_linear_start"><i class="fa fa-sliders"></i> Start</label>
1559
1483
  <input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_linear_start" placeholder="0.000" , value="0.000" />
1560
1484
  </div>
1561
1485
  <div class="form-row">
1562
- <label class="towb_editorlabel" for="node-config-input-buckettype_linear_inteval"><i class="fa fa-tag"></i> Interval</label>
1486
+ <label class="towb_editorlabel" for="node-config-input-buckettype_linear_interval"><i class="fa fa-sliders"></i> Interval</label>
1563
1487
  <input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_linear_interval" placeholder="10" , value="10" />
1564
1488
  </div>
1565
1489
  <div class="form-row">
1566
- <label class="towb_editorlabel" for="node-config-input-buckettype_linear_count"><i class="fa fa-tag"></i> Count</label>
1490
+ <label class="towb_editorlabel" for="node-config-input-buckettype_linear_count"><i class="fa fa-sliders"></i> Count</label>
1567
1491
  <input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_linear_count" placeholder="10" , value="10" />
1568
1492
  </div>
1569
1493
  </div>
1570
1494
 
1571
1495
  <div class="metricsconfig_buckets metricsconfig_buckets_exponential">
1572
1496
  <div class="form-row">
1573
- <label class="towb_editorlabel" for="node-config-input-buckettype_exponential_start"><i class="fa fa-tag"></i> Start</label>
1497
+ <label class="towb_editorlabel" for="node-config-input-buckettype_exponential_start"><i class="fa fa-sliders"></i> Start</label>
1574
1498
  <input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_exponential_start" placeholder="1" , value="1" />
1575
1499
  </div>
1576
1500
  <div class="form-row">
1577
- <label class="towb_editorlabel" for="node-config-input-buckettype_exponential_factor"><i class="fa fa-tag"></i> Factor</label>
1501
+ <label class="towb_editorlabel" for="node-config-input-buckettype_exponential_factor"><i class="fa fa-sliders"></i> Factor</label>
1578
1502
  <input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_exponential_factor" placeholder="2" , value="2" />
1579
1503
  </div>
1580
1504
  <div class="form-row">
1581
- <label class="towb_editorlabel" for="node-config-input-buckettype_exponential_count"><i class="fa fa-tag"></i> Count</label>
1505
+ <label class="towb_editorlabel" for="node-config-input-buckettype_exponential_count"><i class="fa fa-sliders"></i> Count</label>
1582
1506
  <input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_exponential_count" placeholder="10" , value="10" />
1583
1507
  </div>
1584
1508
  </div>
@@ -1586,7 +1510,7 @@ Configuration node for the Gauge Metrics
1586
1510
 
1587
1511
  <div class="metrictype metrictype_summary">
1588
1512
  <div class="form-row">
1589
- <label class="towb_editorlabel" for="node-config-input-percentiletype"><i class="fa fa-tag"></i> Percentile Type</label>
1513
+ <label class="towb_editorlabel" for="node-config-input-percentiletype"><i class="fa fa-sliders"></i> Percentile Type</label>
1590
1514
  <input type="text" id="node-config-input-percentiletype" />
1591
1515
  </div>
1592
1516
 
@@ -1596,7 +1520,7 @@ Configuration node for the Gauge Metrics
1596
1520
 
1597
1521
  <div class="metricsconfig_percentiles metricsconfig_percentiles_manual">
1598
1522
  <div class="form-row">
1599
- <label class="towb_editorlabel" for="node-config-input-percentiletype_manual_intervals"><i class="fa fa-tag"></i> Percentiles</label>
1523
+ <label class="towb_editorlabel" for="node-config-input-percentiletype_manual_intervals"><i class="fa fa-sliders"></i> Percentiles</label>
1600
1524
  <input class="towb_editorfield" type="text" id="node-config-input-percentiletype_manual_intervals" placeholder="0.01, 0.1, 0.9, 0.99" , value="0.01, 0.1, 0.9, 0.99" />
1601
1525
  </div>
1602
1526
  </div>
@@ -1684,25 +1608,25 @@ Configuration node for the Timer Metrics
1684
1608
 
1685
1609
 
1686
1610
  <script type="text/html" data-template-name='WebhookServerConfigNode'>
1687
- <div id='section_WebhookServerConfigNode'>\
1611
+ <div id='section_WebhookServerConfigNode'>
1688
1612
  <div id="WebhookServerConfig">
1689
1613
  <div class="form-row">
1690
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
1614
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
1691
1615
  <input type="text" id="node-config-input-name" />
1692
1616
  </div>
1693
1617
 
1694
1618
  <div class="form-row">
1695
- <label for="node-config-input-port"><i class="fa fa-tag"></i> Port</label>
1619
+ <label class="towb_editorlabel" for="node-config-input-port"><i class="fa fa-plug"></i> Port</label>
1696
1620
  <input type="number" id="node-config-input-port" />
1697
1621
  </div>
1698
1622
 
1699
1623
  <div class="form-row">
1700
- <label for="node-config-input-externalHost"><i class="fa fa-tag"></i> External Host</label>
1624
+ <label class="towb_editorlabel" for="node-config-input-externalHost"><i class="fa fa-globe"></i> External Host</label>
1701
1625
  <input type="text" id="node-config-input-externalHost" />
1702
1626
  </div>
1703
1627
 
1704
1628
  <div class="form-row">
1705
- <label for="node-config-input-externalPort"><i class="fa fa-tag"></i> External Port</label>
1629
+ <label class="towb_editorlabel" for="node-config-input-externalPort"><i class="fa fa-plug"></i> External Port</label>
1706
1630
  <input type="number" id="node-config-input-externalPort" />
1707
1631
  </div>
1708
1632
  <!-- add a button here to autmatically find an open port -->