@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.js CHANGED
@@ -9,6 +9,7 @@
9
9
  */
10
10
  "use strict";
11
11
  const NodeManager = require("@theotherwillembotha/node-red-plugincore").NodeManager;
12
+ const DelegatedConfigReferenceNode = require("@theotherwillembotha/node-red-plugincore").DelegatedConfigReferenceNode;
12
13
  const ConsoleLoggerConfigNode = require("@theotherwillembotha/node-red-plugincore").ConsoleLoggerConfigNode;
13
14
  const RestLoggerConfigNode = require("@theotherwillembotha/node-red-plugincore").RestLoggerConfigNode;
14
15
  const LokiLoggerConfigNode = require("@theotherwillembotha/node-red-plugincore").LokiLoggerConfigNode;
@@ -19,6 +20,7 @@ const TimerMetricConfigNode = require("@theotherwillembotha/node-red-plugincore"
19
20
  const WebhookServerConfigNode = require("@theotherwillembotha/node-red-plugincore").WebhookServerConfigNode;
20
21
  module.exports = (RED) => {
21
22
  let manager = new NodeManager(RED);
23
+ manager.registerNodeType("DelegatedConfigReferenceNode", DelegatedConfigReferenceNode);
22
24
  manager.registerNodeType("ConsoleLoggerConfigNode", ConsoleLoggerConfigNode);
23
25
  manager.registerNodeType("RestLoggerConfigNode", RestLoggerConfigNode);
24
26
  manager.registerNodeType("LokiLoggerConfigNode", LokiLoggerConfigNode);
@@ -33,18 +33,20 @@ export interface TemplateConfig {
33
33
  export type NodeDependencyType = INamedType & (INodeClass | IServiceClass);
34
34
  export declare class NodeDescriptor {
35
35
  private _group;
36
+ private _id;
36
37
  private _name;
37
38
  private _sourceFile;
38
39
  private _dependencies;
39
40
  private _templates;
40
41
  private _package;
41
42
  private _tags;
42
- constructor(group: string, name: string, sourceFile: string, pkg: string);
43
+ constructor(group: string, id: string, name: string, sourceFile: string, pkg: string);
43
44
  addDependency(dependency: NodeDependencyType): NodeDescriptor;
44
45
  addTag(tag: string): NodeDescriptor;
45
46
  addTemplate(template: ITemplateClass, config: TemplateConfig): NodeDescriptor;
46
47
  group(): string;
47
- name(): string;
48
+ id(): string;
49
+ name(): String;
48
50
  sourceFile(): string;
49
51
  package(): string;
50
52
  dependencies(): DependencyType[];
@@ -1 +1 @@
1
- {"version":3,"file":"NodeConstructor.d.ts","sourceRoot":"","sources":["../../src/core/NodeConstructor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAW,uBAAuB,EAAC,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEzE,OAAO,kBAAkB,CAAC;AAW1B,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAC,MAAM,CAAC;IACV,IAAI,EAAC,MAAM,CAAC;IACZ,IAAI,EAAC,MAAM,CAAC;CACf;AAED,8BAAsB,QAAQ,CAAC,MAAM,SAAS,cAAc;IAExD,OAAO,CAAC,KAAK,CAAM;IACZ,IAAI;IAEX,OAAO,CAAC,OAAO,CAAQ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;KAAE,GAAG,WAAW;IAwBzF,cAAc,CAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,GAAE,WAAW;IAKxD,qBAAqB,CAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,GAAE,WAAW;IAK/D,kBAAkB,CAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,GAAE,WAAW;IAK5D,oBAAoB,CAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,GAAE,WAAW;IAK9D,oBAAoB,CAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,GAAE,WAAW;IAK9D,kBAAkB,CAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,GAAE,WAAW;IAK5D,uBAAuB,CAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,GAAE,WAAW;IAKxE,OAAO,CAAC,iBAAiB;IAqBzB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,2BAA2B;IAI5B,SAAS,IAAG,MAAM;IAiDlB,SAAS,IAAG,MAAM;IAQlB,kBAAkB,IAAG,MAAM;CASrC;AAiBD,QAAA,IAAI,SAAS,SAAiB,UAAU,WA4BvC,CAAA;AAED,OAAO,EACH,SAAS,EACZ,CAAA"}
@@ -48,11 +48,12 @@ class ConfigNode extends BaseNode {
48
48
  }
49
49
  exports.ConfigNode = ConfigNode;
50
50
  class NodeDescriptor {
51
- constructor(group, name, sourceFile, pkg) {
51
+ constructor(group, id, name, sourceFile, pkg) {
52
52
  this._dependencies = [];
53
53
  this._templates = [];
54
54
  this._tags = [];
55
55
  this._group = group;
56
+ this._id = id;
56
57
  this._name = name;
57
58
  this._sourceFile = sourceFile;
58
59
  this._package = pkg;
@@ -75,6 +76,7 @@ class NodeDescriptor {
75
76
  return this;
76
77
  }
77
78
  group() { return this._group; }
79
+ id() { return this._id; }
78
80
  name() { return this._name; }
79
81
  sourceFile() { return this._sourceFile; }
80
82
  package() { return this._package; }
@@ -656,7 +658,7 @@ let evalInContext = (context, js) => {
656
658
  let buildNode = function (node) {
657
659
  // get the node descriptor and create the builder.
658
660
  let nodeDescriptor = node.getNodeDescriptor();
659
- let nodeBuilder = new NodeBuilder(nodeDescriptor.name(), nodeDescriptor.group());
661
+ let nodeBuilder = new NodeBuilder(nodeDescriptor.id(), nodeDescriptor.group());
660
662
  // load the html source file
661
663
  let uiDom = new JSDOM(fs_1.default.readFileSync(nodeDescriptor.sourceFile()));
662
664
  // apply the onCompose section if available.
@@ -669,7 +671,7 @@ let buildNode = function (node) {
669
671
  Object.values(sections).forEach(section => {
670
672
  let sectionData = uiDom.window.document.querySelector(`[template-section='on${section}']`)?.innerHTML;
671
673
  if (sectionData) {
672
- nodeBuilder[`add${section}`](nodeDescriptor.name(), sectionData);
674
+ nodeBuilder[`add${section}`](nodeDescriptor.id(), sectionData);
673
675
  }
674
676
  });
675
677
  // add some of the dependencies here.
@@ -78,8 +78,8 @@ class NodeGenerator {
78
78
  try {
79
79
  // verify that we have dont already have this node.
80
80
  let descriptor = node.getNodeDescriptor();
81
- if (!this._nodes[descriptor.name()]) {
82
- this._nodes[descriptor.name()] = { nodeClass: node, descriptor: descriptor };
81
+ if (!this._nodes[descriptor.id()]) {
82
+ this._nodes[descriptor.id()] = { nodeClass: node, descriptor: descriptor };
83
83
  // skip the recursive dependencies for now.
84
84
  //descriptor.dependencies().forEach(dependency => this.addDependency(dependency));
85
85
  }
@@ -115,7 +115,7 @@ class NodeGenerator {
115
115
  // STEP 2. compose the HTMLStructure of each of the nodes.
116
116
  let nodeHTMLOutut = Object.values(this._nodes)
117
117
  .map(node => {
118
- console.log(`Processing node: ${node.descriptor.name()}`);
118
+ console.log(`Processing node: ${node.descriptor.id()}`);
119
119
  return (0, NodeConstructor_1.buildNode)(node.nodeClass);
120
120
  })
121
121
  .join("\n");
@@ -131,7 +131,7 @@ ${nodeHTMLOutut}
131
131
  // 1. get a list of the files to import.
132
132
  let importList = [
133
133
  ...Object.values(this._nodes).map(node => {
134
- return `const ${node.descriptor.name()} = require("${node.descriptor.package()}").${node.descriptor.name()};`;
134
+ return `const ${node.descriptor.id()} = require("${node.descriptor.package()}").${node.descriptor.id()};`;
135
135
  //let nodeFile = "./" + node.group() + "/" + node.sourceFile();
136
136
  //return `const ${node.name()} = require("${nodeFile}");`;
137
137
  }),
@@ -139,7 +139,7 @@ ${nodeHTMLOutut}
139
139
  .join("\n");
140
140
  // 2. get the exported modules that have to be regestered by the node manager.
141
141
  let moduleExports = Object.values(this._nodes).map(node => {
142
- return ` manager.registerNodeType("${node.descriptor.name()}", ${node.descriptor.name()});`;
142
+ return ` manager.registerNodeType("${node.descriptor.id()}", ${node.descriptor.id()});`;
143
143
  }).join("\n");
144
144
  fs.writeFileSync(nodesOutputFile + ".js", `
145
145
  /*
@@ -154,7 +154,7 @@ ${moduleExports}
154
154
  }
155
155
 
156
156
  `);
157
- console.log(`Done building ${Object.keys(this._nodes).length} nodes\n${Object.values(this._nodes).map(node => " - " + node.descriptor.name() + "\n").join("")}\n`);
157
+ console.log(`Done building ${Object.keys(this._nodes).length} nodes\n${Object.values(this._nodes).map(node => " - " + node.descriptor.id() + "\n").join("")}\n`);
158
158
  let serviceExports = this._services.map(service => {
159
159
  return ` manager.registerService(${service.name()}.${service.name()});`;
160
160
  }).join("\n");
@@ -231,10 +231,10 @@ module.exports = function (RED) {
231
231
  console.log(`Done building ${this._services.length} services\n${this._services.map(service => " - " + service.name() + "\n").join("")}\n`);
232
232
  }
233
233
  static generateHeader(node) {
234
- let padding = ' '.repeat(Math.max(0, Math.floor(NodeGenerator.headerWidth - node.name().length) / 2));
234
+ let padding = ' '.repeat(Math.max(0, Math.floor(NodeGenerator.headerWidth - node.id().length) / 2));
235
235
  return `
236
236
  <!-- *${'*'.repeat(NodeGenerator.headerWidth)}* -->
237
- <!-- ${padding} ${node.name()} ${padding} -->
237
+ <!-- ${padding} ${node.id()} ${padding} -->
238
238
  <!-- *${'*'.repeat(NodeGenerator.headerWidth)}* -->
239
239
  `;
240
240
  }
@@ -46,86 +46,45 @@
46
46
  <script type="text/html" template-section="onIncludeEditForm">
47
47
  <div id="LoggerConfig">
48
48
  <div class="form-row">
49
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
49
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
50
50
  <input type="text" id="node-config-input-name" />
51
51
  </div>
52
52
 
53
53
  <div class="form-row">
54
- <label for="node-config-input-level"><i class="fa fa-tag"></i> Level</label>
54
+ <label class="towb_editorlabel" for="node-config-input-level"><i class="fa fa-signal"></i> Level</label>
55
55
  <input type="text" id="node-config-input-level" />
56
56
  </div>
57
57
 
58
58
  <div class="form-row">
59
- <label for="node-config-input-templateEditor"><i class="fa fa-tag"></i> Template</label>
59
+ <label class="towb_editorlabel" for="node-config-input-templateEditor"><i class="fa fa-code"></i> Template</label>
60
60
  <div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-config-input-templateEditor"></div>
61
61
  </div>
62
62
  </div>
63
63
  </script>
64
64
 
65
65
  <script type="text/markdown" template-section="onIncludeDocumentation">
66
- Configuration node for the Logger Integration
66
+ Writes log output to the Node-RED runtime console (stdout). Suitable for local development and containerised environments where stdout is captured.
67
67
 
68
- ## Inputs
69
- : *name* (string) : The common name for the logger Configuration
70
- : *level* (level) : The logging level - debug, info, warning, error
71
- : *platform*(string) : The common name for the logger Configuration
72
- : *template*(mustache) : A template for the log messages.
68
+ ### Properties
69
+ : *name* (string) : A descriptive name for this logger configuration.
70
+ : *level* (level) : The minimum log level. Messages below this threshold are suppressed. Options: DEBUG, INFO, WARNING, ERROR.
71
+ : *template* (mustache) : A Mustache/Handlebars template that formats the log message body.
73
72
 
74
- ## Logger platform
75
- Currently supported logging platforms
73
+ ### Mustache Templating
74
+ Mustache/Handlebars templates build the message string written to the console.
76
75
 
77
- ### Console
78
- The log message will be printed out to stdio
76
+ #### Provided Properties
77
+ : *msg* (object) : The Node-RED message object passed through the node.
78
+ : *currentTime* (string) : The current time in ISO 8601 format.
79
79
 
80
- ### Http / Https
81
- Publish the message to an http endpoint using a http / https POST command.
80
+ #### Helpers
81
+ : *json* (helper) : Serialises an object to a JSON string using `JSON.stringify`.
82
82
 
83
- : *url* (url) : The endpoint for the url where requests are to be posted to.
84
- : *ignore ssl errors* (boolean) : If enabled, the invalid ssl certificates will be ignored.
85
- : *authentication* (auth method) : what auth method should be used for the http request. (none, basic, api key)
83
+ #### Examples
84
+ - `{{{json msg}}}` serialises the full message object as JSON.
86
85
 
87
- #### Authentication
88
- ##### Basic
89
- Provides basic authentication using the Authorization header
90
-
91
- : *username* (string) : the username used for basic authentication
92
- : *password* (string) : the password used for basic authentication
93
-
94
- ##### APIKey
95
- Provides authentication using a matrix parameter, header or query parameter and an apikey
96
-
97
- : *mechanism* (mechanism) : the mechanism that will be used for transmitting the key (header, queryparam, matrixparam)
98
- : *apikey name* (string) : the name of the key used for api authentication. (path variable or query param name)
99
- : *apikey value*(string) : the value of the api key that will be transmitted. (beware of special characters)
100
-
101
- ### Loki
102
- Publish the message to a loki endpoint.
103
-
104
- : *host* (string) : the host and port\ of the loki instance that it being logged to
105
- : *tenant* (string) : the tenant id that will be used to log to
106
- : *username* (string) : the username for the loki instance.
107
- : *authtoken* (string) : the authtoken for the loki instance.
108
-
109
- # Mustache Templating
110
- Mustache / Handlebars are used for building up the logged message payloads that are sent to the logging backend.
111
- 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.
112
-
113
- ### Provided Properties
114
- A couple of values are provided to the logging context by default.
115
-
116
- : *msg* (object) : an object containing the payload or message that should be parsed through the template.
117
- : *currentTime* (object) : a string containing the current time in ISO8601 format
118
-
119
- ### Mustache Helpers
120
- In addition to the provided properties, some "helpers" have also been provided to assist in serialization.
121
-
122
- : *json* (helper) : converts a json object to a string using the JSON.stringify method.
123
-
124
- ## Examples
125
- - {{{json msg}}} - serializes the the msg object to json format.
126
-
127
- # References
128
- - [Mustache - Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
129
- - [Mustache - Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
86
+ #### References
87
+ - [Mustache — Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
88
+ - [Mustache Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
130
89
  </script>
131
90
 
@@ -9,7 +9,7 @@ interface LokiLoggerConfigNodeConfig extends ConfigNodeConfig {
9
9
  loki_host: string;
10
10
  loki_userid?: string;
11
11
  loki_authtoken?: string;
12
- loki_tenantID?: string;
12
+ loki_tenantid?: string;
13
13
  }
14
14
  export declare class LokiLoggerConfigNode extends ConfigNode<LokiLoggerConfigNodeConfig> {
15
15
  private _logger;
@@ -6,7 +6,7 @@
6
6
  .addDefault("level", {value:"info", required:true})
7
7
 
8
8
  .addDefault("loki_host", {})
9
- .addDefault("loki_tenantID", {})
9
+ .addDefault("loki_tenantid", {})
10
10
  .addDefault("loki_userid", {})
11
11
  .addDefault("loki_authtoken", {})
12
12
 
@@ -51,103 +51,67 @@
51
51
  <script type="text/html" template-section="onIncludeEditForm">
52
52
  <div id="LoggerConfig">
53
53
  <div class="form-row">
54
- <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
54
+ <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
55
55
  <input type="text" id="node-config-input-name" />
56
56
  </div>
57
57
 
58
58
  <div class="form-row">
59
- <label for="node-config-input-level"><i class="fa fa-tag"></i> Level</label>
59
+ <label class="towb_editorlabel" for="node-config-input-level"><i class="fa fa-signal"></i> Level</label>
60
60
  <input type="text" id="node-config-input-level" />
61
61
  </div>
62
62
 
63
63
  <div class="form-row">
64
- <label for="node-config-input-loki_host"><i class="fa fa-tag"></i> Host</label>
64
+ <label class="towb_editorlabel" for="node-config-input-loki_host"><i class="fa fa-server"></i> Host</label>
65
65
  <input class="required" type="text" id="node-config-input-loki_host" />
66
66
  </div>
67
67
  <div class="form-row">
68
- <label for="node-config-input-loki_tenantID"><i class="fa fa-tag"></i> TenantID</label>
69
- <input class="" type="text" id="node-config-input-loki_tenantID" />
68
+ <label class="towb_editorlabel" for="node-config-input-loki_tenantid"><i class="fa fa-building-o"></i> Tenant ID</label>
69
+ <input class="" type="text" id="node-config-input-loki_tenantid" />
70
70
  </div>
71
71
  <div class="form-row">
72
- <label for="node-config-input-loki_userid"><i class="fa fa-tag"></i> Username</label>
72
+ <label class="towb_editorlabel" for="node-config-input-loki_userid"><i class="fa fa-user"></i> Username</label>
73
73
  <input class="" type="text" id="node-config-input-loki_userid" />
74
74
  </div>
75
75
  <div class="form-row">
76
- <label for="node-config-input-loki_authtoken"><i class="fa fa-tag"></i> AuthToken</label>
76
+ <label class="towb_editorlabel" for="node-config-input-loki_authtoken"><i class="fa fa-key"></i> Auth Token</label>
77
77
  <input class="" type="password" id="node-config-input-loki_authtoken" />
78
78
  </div>
79
79
 
80
80
  <div class="form-row">
81
- <label for="node-config-input-templateEditor"><i class="fa fa-tag"></i> Template</label>
81
+ <label class="towb_editorlabel" for="node-config-input-templateEditor"><i class="fa fa-code"></i> Template</label>
82
82
  <div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-config-input-templateEditor"></div>
83
83
  </div>
84
84
  </div>
85
85
  </script>
86
86
 
87
87
  <script type="text/markdown" template-section="onIncludeDocumentation">
88
- Configuration node for the Logger Integration
89
-
90
- ## Inputs
91
- : *name* (string) : The common name for the logger Configuration
92
- : *level* (level) : The logging level - debug, info, warning, error
93
- : *platform*(string) : The common name for the logger Configuration
94
- : *template*(mustache) : A template for the log messages.
95
-
96
- ## Logger platform
97
- Currently supported logging platforms
98
-
99
- ### Console
100
- The log message will be printed out to stdio
101
-
102
- ### Http / Https
103
- Publish the message to an http endpoint using a http / https POST command.
104
-
105
- : *url* (url) : The endpoint for the url where requests are to be posted to.
106
- : *ignore ssl errors* (boolean) : If enabled, the invalid ssl certificates will be ignored.
107
- : *authentication* (auth method) : what auth method should be used for the http request. (none, basic, api key)
108
-
109
- #### Authentication
110
- ##### Basic
111
- Provides basic authentication using the Authorization header
112
-
113
- : *username* (string) : the username used for basic authentication
114
- : *password* (string) : the password used for basic authentication
115
-
116
- ##### APIKey
117
- Provides authentication using a matrix parameter, header or query parameter and an apikey
118
-
119
- : *mechanism* (mechanism) : the mechanism that will be used for transmitting the key (header, queryparam, matrixparam)
120
- : *apikey name* (string) : the name of the key used for api authentication. (path variable or query param name)
121
- : *apikey value*(string) : the value of the api key that will be transmitted. (beware of special characters)
122
-
123
- ### Loki
124
- Publish the message to a loki endpoint.
125
-
126
- : *host* (string) : the host and port\ of the loki instance that it being logged to
127
- : *tenant* (string) : the tenant id that will be used to log to
128
- : *username* (string) : the username for the loki instance.
129
- : *authtoken* (string) : the authtoken for the loki instance.
130
-
131
- # Mustache Templating
132
- Mustache / Handlebars are used for building up the logged message payloads that are sent to the logging backend.
133
- 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.
134
-
135
- ### Provided Properties
136
- A couple of values are provided to the logging context by default.
137
-
138
- : *msg* (object) : an object containing the payload or message that should be parsed through the template.
139
- : *currentTime* (object) : a string containing the current time in ISO8601 format
140
-
141
- ### Mustache Helpers
142
- In addition to the provided properties, some "helpers" have also been provided to assist in serialization.
143
-
144
- : *json* (helper) : converts a json object to a string using the JSON.stringify method.
145
-
146
- ## Examples
147
- - {{{json msg}}} - serializes the the msg object to json format.
148
-
149
- # References
150
- - [Mustache - Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
151
- - [Mustache - Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
88
+ Pushes log messages to a Grafana Loki instance using the Loki HTTP API.
89
+
90
+ ### Properties
91
+ : *name* (string) : A descriptive name for this logger configuration.
92
+ : *level* (level) : The minimum log level. Messages below this threshold are suppressed. Options: DEBUG, INFO, WARNING, ERROR.
93
+ : *host* (string) : The base URL of the Loki instance, including port (e.g. `http://localhost:3100`).
94
+ : *tenant ID* (string) : The tenant identifier for multi-tenant Loki deployments (`X-Scope-OrgID` header). Leave blank for single-tenant deployments.
95
+ : *username* (string) : Username for Loki authentication.
96
+ : *auth token* (string) : Authentication token or password for Loki.
97
+ : *template* (mustache) : A Mustache/Handlebars template that formats the log message body.
98
+
99
+ ### Mustache Templating
100
+ Mustache/Handlebars templates build the message string pushed to Loki.
101
+
102
+ #### Provided Properties
103
+ : *msg* (object) : The Node-RED message object passed through the node.
104
+ : *currentTime* (string) : The current time in ISO 8601 format.
105
+
106
+ #### Helpers
107
+ : *json* (helper) : Serialises an object to a JSON string using `JSON.stringify`.
108
+
109
+ #### Examples
110
+ - `{{{json msg}}}` — serialises the full message object as JSON.
111
+
112
+ #### References
113
+ - [Grafana Loki HTTP API](https://grafana.com/docs/loki/latest/reference/loki-http-api/)
114
+ - [Mustache — Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
115
+ - [Mustache — Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
152
116
  </script>
153
117
 
@@ -29,7 +29,7 @@ let LokiLoggerConfigNode = class LokiLoggerConfigNode extends NodeConstructor_1.
29
29
  host: config.loki_host,
30
30
  userid: config.loki_userid,
31
31
  authtoken: config.loki_authtoken,
32
- tenantID: config.loki_tenantID,
32
+ tenantID: config.loki_tenantid,
33
33
  };
34
34
  this._logger = LoggerService_1.LoggerService.get(loggerConfig);
35
35
  }