@theotherwillembotha/node-red-plugincore 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +155 -23
- package/build/GenerateNodes.js +3 -0
- package/build/Nodes.html +174 -250
- package/build/Nodes.js +2 -0
- package/build/core/NodeConstructor.d.ts +4 -2
- package/build/core/NodeConstructor.d.ts.map +1 -1
- package/build/core/NodeConstructor.js +5 -3
- package/build/core/NodeGenerator.js +8 -8
- package/build/core/logger/node/ConsoleLoggerConfigNode.html +20 -61
- package/build/core/logger/node/LokiLoggerConfigNode.d.ts +1 -1
- package/build/core/logger/node/LokiLoggerConfigNode.html +37 -73
- package/build/core/logger/node/LokiLoggerConfigNode.js +1 -1
- package/build/core/logger/node/RestLoggerConfigNode.html +51 -77
- package/build/core/logger/node/RestLoggerConfigNode.js +1 -1
- package/build/core/logger/service/LoggerService.d.ts +1 -1
- package/build/core/logger/service/LoggerService.d.ts.map +1 -1
- package/build/core/logger/service/LoggerService.js +2 -3
- package/build/core/logger/template/LoggerTemplate.d.ts.map +1 -1
- package/build/core/logger/template/LoggerTemplate.html +15 -12
- package/build/core/logger/template/LoggerTemplate.js +1 -2
- package/build/core/metrics/MetricsDecorator.js +2 -2
- package/build/core/metrics/node/CounterMetricConfigNode.html +2 -2
- package/build/core/metrics/node/GaugeMetricConfigNode.html +2 -2
- package/build/core/metrics/node/GaugeMetricConfigNode.js +2 -2
- package/build/core/metrics/node/MetricsConfigNode.html +1 -1
- package/build/core/metrics/node/TimerMetricConfigNode.html +13 -13
- package/build/core/metrics/service/MetricsService.d.ts +1 -1
- package/build/core/metrics/service/MetricsService.js +6 -6
- package/build/core/metrics/template/CounterMetricTemplate.html +1 -1
- package/build/core/metrics/template/GaugeMetricTemplate.html +1 -1
- package/build/core/metrics/template/TimerMetricTemplate.html +1 -1
- package/build/core/other/node/DelegatedConfigReferenceNode.d.ts +57 -0
- package/build/core/other/node/DelegatedConfigReferenceNode.d.ts.map +1 -0
- package/build/core/other/node/DelegatedConfigReferenceNode.html +1 -0
- package/build/core/other/node/DelegatedConfigReferenceNode.js +79 -0
- package/build/core/tagging/NodeDescriptionDecorator.js +1 -1
- package/build/core/tagging/service/NodeTypeService.js +1 -1
- package/build/core/ui/template/UIHelperTemplate.d.ts +5 -0
- package/build/core/ui/template/UIHelperTemplate.d.ts.map +1 -0
- package/build/core/ui/template/UIHelperTemplate.html +229 -0
- package/build/core/ui/template/UIHelperTemplate.js +11 -0
- package/build/core/webhook/node/WebhookServerConfigNode.html +5 -5
- package/build/core/webhook/template/WebhookTemplate.html +18 -10
- package/build/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -1
- package/documentation/ConsoleLoggerConfigNode.png +0 -0
- package/documentation/CounterMetricConfigNode.png +0 -0
- package/documentation/GaugeMetricConfigNode.png +0 -0
- package/documentation/LokiLoggerConfigNode.png +0 -0
- package/documentation/MetricsConfigNode.png +0 -0
- package/documentation/RestLoggerConfigNode.png +0 -0
- package/documentation/TimerMetricConfigNode.png +0 -0
- package/documentation/WebhookNode.png +0 -0
- package/package.json +20 -8
- package/src/GenerateNodes.ts +5 -2
- package/src/core/NodeConstructor.ts +7 -4
- package/src/core/NodeGenerator.ts +8 -8
- package/src/core/logger/node/ConsoleLoggerConfigNode.html +20 -61
- package/src/core/logger/node/LokiLoggerConfigNode.html +37 -73
- package/src/core/logger/node/LokiLoggerConfigNode.ts +2 -2
- package/src/core/logger/node/RestLoggerConfigNode.html +51 -77
- package/src/core/logger/node/RestLoggerConfigNode.ts +1 -1
- package/src/core/logger/service/LoggerService.ts +3 -4
- package/src/core/logger/template/LoggerTemplate.html +15 -12
- package/src/core/logger/template/LoggerTemplate.ts +1 -2
- package/src/core/metrics/MetricsDecorator.ts +2 -2
- package/src/core/metrics/node/CounterMetricConfigNode.html +2 -2
- package/src/core/metrics/node/GaugeMetricConfigNode.html +2 -2
- package/src/core/metrics/node/GaugeMetricConfigNode.ts +2 -2
- package/src/core/metrics/node/MetricsConfigNode.html +1 -1
- package/src/core/metrics/node/MetricsConfigNode.ts +1 -1
- package/src/core/metrics/node/TimerMetricConfigNode.html +13 -13
- package/src/core/metrics/service/MetricsService.ts +6 -6
- package/src/core/metrics/template/CounterMetricTemplate.html +1 -1
- package/src/core/metrics/template/GaugeMetricTemplate.html +1 -1
- package/src/core/metrics/template/TimerMetricTemplate.html +1 -1
- package/src/core/other/node/DelegatedConfigReferenceNode.html +1 -0
- package/src/core/other/node/DelegatedConfigReferenceNode.ts +70 -0
- package/src/core/tagging/NodeDescriptionDecorator.ts +1 -1
- package/src/core/tagging/service/NodeTypeService.ts +1 -1
- package/src/core/ui/template/UIHelperTemplate.html +229 -0
- package/src/core/ui/template/UIHelperTemplate.ts +14 -0
- package/src/core/webhook/node/WebhookServerConfigNode.html +5 -5
- package/src/core/webhook/template/WebhookTemplate.html +18 -10
- package/src/index.ts +3 -1
- package/build/core/logger/node/LoggerConfigNode.d.ts +0 -30
- package/build/core/logger/node/LoggerConfigNode.d.ts.map +0 -1
- package/build/core/logger/node/LoggerConfigNode.html +0 -307
- package/build/core/logger/node/LoggerConfigNode.js +0 -60
- package/src/core/logger/node/LoggerConfigNode.html +0 -307
- package/src/core/logger/node/LoggerConfigNode.ts +0 -95
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
.addDefault("level", {value:"info", required:true})
|
|
7
7
|
|
|
8
8
|
// platform rest:
|
|
9
|
-
.addDefault("
|
|
10
|
-
.addDefault("
|
|
9
|
+
.addDefault("rest_url", {})
|
|
10
|
+
.addDefault("rest_ignoresslerror", {})
|
|
11
11
|
.addDefault("rest_auth_type", {})
|
|
12
12
|
.addDefault("rest_auth_basic_username", {})
|
|
13
13
|
.addDefault("rest_auth_basic_password", {})
|
|
@@ -88,122 +88,96 @@
|
|
|
88
88
|
<script type="text/html" template-section="onIncludeEditForm">
|
|
89
89
|
<div id="LoggerConfig">
|
|
90
90
|
<div class="form-row">
|
|
91
|
-
<label for="node-config-input-name"><i class="fa fa-
|
|
91
|
+
<label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
|
|
92
92
|
<input type="text" id="node-config-input-name" />
|
|
93
93
|
</div>
|
|
94
94
|
|
|
95
95
|
<div class="form-row">
|
|
96
|
-
<label for="node-config-input-level"><i class="fa fa-
|
|
96
|
+
<label class="towb_editorlabel" for="node-config-input-level"><i class="fa fa-signal"></i> Level</label>
|
|
97
97
|
<input type="text" id="node-config-input-level" />
|
|
98
98
|
</div>
|
|
99
99
|
|
|
100
100
|
<div class="platform platform-rest">
|
|
101
101
|
<div class="form-row">
|
|
102
|
-
<label for="node-config-input-rest_url"><i class="fa fa-
|
|
102
|
+
<label class="towb_editorlabel" for="node-config-input-rest_url"><i class="fa fa-link"></i> URL</label>
|
|
103
103
|
<input class="platform-rest-input required" type="text" id="node-config-input-rest_url" />
|
|
104
104
|
</div>
|
|
105
105
|
<div class="form-row">
|
|
106
|
-
<label></label>
|
|
106
|
+
<label class="towb_editorlabel"></label>
|
|
107
107
|
<input type="checkbox" id="node-config-input-rest_ignoresslerror" style="width:20px; margin-right:5px;" />
|
|
108
108
|
<label style="width:auto" for="node-config-input-rest_ignoresslerror"><span>Ignore Invalid SSL certificates</span></label>
|
|
109
109
|
</div>
|
|
110
110
|
<div class="form-row">
|
|
111
|
-
<label for="node-config-input-rest_auth_type"><i class="fa fa-
|
|
111
|
+
<label class="towb_editorlabel" for="node-config-input-rest_auth_type"><i class="fa fa-lock"></i> Authentication</label>
|
|
112
112
|
<input class="platform-rest-input required" type="text" id="node-config-input-rest_auth_type" />
|
|
113
113
|
</div>
|
|
114
114
|
<div class="form-row platform-rest-auth auth-basic">
|
|
115
|
-
<label for="node-config-input-rest_auth_basic_username"><i class="fa fa-
|
|
115
|
+
<label class="towb_editorlabel" for="node-config-input-rest_auth_basic_username"><i class="fa fa-user"></i> Username</label>
|
|
116
116
|
<input class="platform-rest-input" type="text" id="node-config-input-rest_auth_basic_username" />
|
|
117
117
|
</div>
|
|
118
118
|
<div class="form-row platform-rest-auth auth-basic">
|
|
119
|
-
<label for="node-config-input-rest_auth_basic_password"><i class="fa fa-
|
|
119
|
+
<label class="towb_editorlabel" for="node-config-input-rest_auth_basic_password"><i class="fa fa-key"></i> Password</label>
|
|
120
120
|
<input class="platform-rest-input" type="password" id="node-config-input-rest_auth_basic_password" />
|
|
121
121
|
</div>
|
|
122
122
|
<div class="form-row platform-rest-auth auth-apikey">
|
|
123
|
-
<label for="node-config-input-rest_auth_apikey_mechanism"><i class="fa fa-
|
|
123
|
+
<label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_mechanism"><i class="fa fa-exchange"></i> Mechanism</label>
|
|
124
124
|
<input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_mechanism" />
|
|
125
125
|
</div>
|
|
126
126
|
<div class="form-row platform-rest-auth auth-apikey">
|
|
127
|
-
<label for="node-config-input-rest_auth_apikey_name"><i class="fa fa-
|
|
127
|
+
<label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_name"><i class="fa fa-id-badge"></i> APIKey name</label>
|
|
128
128
|
<input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_name" />
|
|
129
129
|
</div>
|
|
130
130
|
<div class="form-row platform-rest-auth auth-apikey">
|
|
131
|
-
<label for="node-config-input-rest_auth_apikey_value"><i class="fa fa-
|
|
131
|
+
<label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_value"><i class="fa fa-lock"></i> APIKey value</label>
|
|
132
132
|
<input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_value" />
|
|
133
133
|
</div>
|
|
134
134
|
</div>
|
|
135
135
|
|
|
136
136
|
<div class="form-row">
|
|
137
|
-
<label for="node-config-input-templateEditor"><i class="fa fa-
|
|
137
|
+
<label class="towb_editorlabel" for="node-config-input-templateEditor"><i class="fa fa-code"></i> Template</label>
|
|
138
138
|
<div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-config-input-templateEditor"></div>
|
|
139
139
|
</div>
|
|
140
140
|
</div>
|
|
141
141
|
</script>
|
|
142
142
|
|
|
143
143
|
<script type="text/markdown" template-section="onIncludeDocumentation">
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
: *name*
|
|
148
|
-
: *level*
|
|
149
|
-
: *
|
|
150
|
-
: *
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
: *
|
|
163
|
-
: *
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
: *
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
: *host* (string) : the host and port\ of the loki instance that it being logged to
|
|
183
|
-
: *tenant* (string) : the tenant id that will be used to log to
|
|
184
|
-
: *username* (string) : the username for the loki instance.
|
|
185
|
-
: *authtoken* (string) : the authtoken for the loki instance.
|
|
186
|
-
|
|
187
|
-
# Mustache Templating
|
|
188
|
-
Mustache / Handlebars are used for building up the logged message payloads that are sent to the logging backend.
|
|
189
|
-
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.
|
|
190
|
-
|
|
191
|
-
### Provided Properties
|
|
192
|
-
A couple of values are provided to the logging context by default.
|
|
193
|
-
|
|
194
|
-
: *msg* (object) : an object containing the payload or message that should be parsed through the template.
|
|
195
|
-
: *currentTime* (object) : a string containing the current time in ISO8601 format
|
|
196
|
-
|
|
197
|
-
### Mustache Helpers
|
|
198
|
-
In addition to the provided properties, some "helpers" have also been provided to assist in serialization.
|
|
199
|
-
|
|
200
|
-
: *json* (helper) : converts a json object to a string using the JSON.stringify method.
|
|
201
|
-
|
|
202
|
-
## Examples
|
|
203
|
-
- {{{json msg}}} - serializes the the msg object to json format.
|
|
204
|
-
|
|
205
|
-
# References
|
|
206
|
-
- [Mustache - Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
|
|
207
|
-
- [Mustache - Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
|
|
144
|
+
Posts log messages to an HTTP or HTTPS endpoint as a JSON payload.
|
|
145
|
+
|
|
146
|
+
### Properties
|
|
147
|
+
: *name* (string) : A descriptive name for this logger configuration.
|
|
148
|
+
: *level* (level) : The minimum log level. Messages below this threshold are suppressed. Options: DEBUG, INFO, WARNING, ERROR.
|
|
149
|
+
: *url* (url) : The endpoint that log messages will be POSTed to.
|
|
150
|
+
: *ignore SSL errors* (boolean) : When enabled, invalid SSL certificates are accepted.
|
|
151
|
+
: *authentication* (select) : The authentication strategy applied to each request. Options: None, Basic, ApiKey.
|
|
152
|
+
: *template* (mustache) : A Mustache/Handlebars template that formats the log message body.
|
|
153
|
+
|
|
154
|
+
### Authentication
|
|
155
|
+
#### Basic
|
|
156
|
+
Authenticates using the HTTP `Authorization` header (RFC 7617).
|
|
157
|
+
: *username* (string) : The username credential.
|
|
158
|
+
: *password* (string) : The password credential.
|
|
159
|
+
|
|
160
|
+
#### ApiKey
|
|
161
|
+
Authenticates by injecting a key/value pair into the request.
|
|
162
|
+
: *mechanism* (select) : Where the key is injected — Header, Query Param, or Matrix Param.
|
|
163
|
+
: *APIKey name* (string) : The name of the key (e.g. `x-api-key`).
|
|
164
|
+
: *APIKey value* (string) : The value of the key.
|
|
165
|
+
|
|
166
|
+
### Mustache Templating
|
|
167
|
+
Mustache/Handlebars templates build the message string POSTed to the endpoint.
|
|
168
|
+
|
|
169
|
+
#### Provided Properties
|
|
170
|
+
: *msg* (object) : The Node-RED message object passed through the node.
|
|
171
|
+
: *currentTime* (string) : The current time in ISO 8601 format.
|
|
172
|
+
|
|
173
|
+
#### Helpers
|
|
174
|
+
: *json* (helper) : Serialises an object to a JSON string using `JSON.stringify`.
|
|
175
|
+
|
|
176
|
+
#### Examples
|
|
177
|
+
- `{{{json msg}}}` — serialises the full message object as JSON.
|
|
178
|
+
|
|
179
|
+
#### References
|
|
180
|
+
- [Mustache — Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
|
|
181
|
+
- [Mustache — Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
|
|
208
182
|
</script>
|
|
209
183
|
|
|
@@ -46,7 +46,7 @@ exports.RestLoggerConfigNode = RestLoggerConfigNode;
|
|
|
46
46
|
exports.RestLoggerConfigNode = RestLoggerConfigNode = __decorate([
|
|
47
47
|
(0, NodeDescriptionDecorator_1.NodeDescription)({
|
|
48
48
|
id: "RestLoggerConfigNode",
|
|
49
|
-
name: "
|
|
49
|
+
name: "Rest Endpoint Logger",
|
|
50
50
|
group: "config",
|
|
51
51
|
sourceFile: NodeGenerator_1.SourceUtility.getSourcePath("/build/", "/src/") + "RestLoggerConfigNode.html",
|
|
52
52
|
package: "@theotherwillembotha/node-red-plugincore",
|
|
@@ -52,7 +52,7 @@ export interface LokiLoggerConfig extends BaseLoggerConfig {
|
|
|
52
52
|
host: string;
|
|
53
53
|
userid?: string;
|
|
54
54
|
authtoken?: string;
|
|
55
|
-
|
|
55
|
+
tenantid?: string;
|
|
56
56
|
}
|
|
57
57
|
export interface RestLoggerConfig extends BaseLoggerConfig {
|
|
58
58
|
type: PlatformType.rest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoggerService.d.ts","sourceRoot":"","sources":["../../../../src/core/logger/service/LoggerService.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"LoggerService.d.ts","sourceRoot":"","sources":["../../../../src/core/logger/service/LoggerService.ts"],"names":[],"mappings":"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"}
|
|
@@ -9,7 +9,6 @@ const handlebars_1 = __importDefault(require("handlebars"));
|
|
|
9
9
|
const winston_1 = require("winston");
|
|
10
10
|
const winston_loki_1 = __importDefault(require("winston-loki"));
|
|
11
11
|
const whatwg_url_1 = require("whatwg-url");
|
|
12
|
-
const LoggerConfigNode_1 = require("../node/LoggerConfigNode");
|
|
13
12
|
const LoggerTemplate_1 = require("../template/LoggerTemplate");
|
|
14
13
|
var network = require('network');
|
|
15
14
|
const deep_equal_1 = __importDefault(require("deep-equal"));
|
|
@@ -94,7 +93,7 @@ class LokiLogger extends NewLogger {
|
|
|
94
93
|
json: true,
|
|
95
94
|
format: winston_1.format.json(),
|
|
96
95
|
headers: {
|
|
97
|
-
"X-Scope-OrgID": (config.
|
|
96
|
+
"X-Scope-OrgID": (config.tenantid) ? config.tenantid : undefined
|
|
98
97
|
},
|
|
99
98
|
replaceTimestamp: true,
|
|
100
99
|
onConnectionError: (err) => console.error(err),
|
|
@@ -197,7 +196,7 @@ class LoggerService extends NodeConstructor_1.BaseService {
|
|
|
197
196
|
return logger;
|
|
198
197
|
}
|
|
199
198
|
static getServiceDescriptor() {
|
|
200
|
-
return new NodeConstructor_1.ServiceDescriptor("@theotherwillembotha/loggerservice", "LoggerService", "services-plugin", "@theotherwillembotha/node-red-plugincore", LoggerService, [
|
|
199
|
+
return new NodeConstructor_1.ServiceDescriptor("@theotherwillembotha/loggerservice", "LoggerService", "services-plugin", "@theotherwillembotha/node-red-plugincore", LoggerService, [LoggerTemplate_1.LoggerTemplate]);
|
|
201
200
|
}
|
|
202
201
|
}
|
|
203
202
|
exports.LoggerService = LoggerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoggerTemplate.d.ts","sourceRoot":"","sources":["../../../../src/core/logger/template/LoggerTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"LoggerTemplate.d.ts","sourceRoot":"","sources":["../../../../src/core/logger/template/LoggerTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAEpF,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IACxD,UAAU,EAAC,OAAO,CAAC;IACnB,MAAM,EAAC,MAAM,CAAC;IACd,0BAA0B,EAAC,OAAO,CAAC;IACnC,mBAAmB,EAAC,MAAM,CAAC;CAC9B;AAED,qBAAa,cAAe,SAAQ,QAAQ;IAGxC,MAAM,CAAC,qBAAqB,IAAI,kBAAkB;CAQrD"}
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<script type="text/javascript" template-section="onCompose">
|
|
103
103
|
node
|
|
104
104
|
.addDefault("logEnabled", { value:false, required:true})
|
|
105
|
-
.addDefault("logger", { required:false})
|
|
105
|
+
.addDefault("logger", { required:false, value:'', type:"DelegatedConfigReferenceNode"})
|
|
106
106
|
.addDefault("logTemplateOverrideEnabled", {value:false})
|
|
107
107
|
.addDefault("logTemplateOverride", {value:"message:{{msg}}"})
|
|
108
108
|
</script>
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
value: node.logTemplateOverride
|
|
187
187
|
});
|
|
188
188
|
|
|
189
|
-
let loggerSelector = $("#
|
|
189
|
+
let loggerSelector = $("#logger-selector");
|
|
190
190
|
let loggerEditButton = $("#logger-edit-btn");
|
|
191
191
|
let loggerAddButton = $("#logger-add-btn");
|
|
192
192
|
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
|
|
200
200
|
// figure out what type of logger this is.
|
|
201
201
|
let selectedLogger = (await getLoggers()).find(logger => logger.id === loggerSelector.val());
|
|
202
|
-
RED.editor.editConfig("#
|
|
202
|
+
RED.editor.editConfig("#logger-selector", selectedLogger.type, selectedLogger.id);
|
|
203
203
|
});
|
|
204
204
|
|
|
205
205
|
loggerAddButton.on('click', function(event) {
|
|
@@ -223,14 +223,14 @@
|
|
|
223
223
|
.appendTo($dropdown);
|
|
224
224
|
});
|
|
225
225
|
|
|
226
|
-
//
|
|
226
|
+
// Append first so outerWidth() is measurable, then position so the
|
|
227
|
+
// right edge of the dropdown aligns with the right edge of the button.
|
|
228
|
+
$('body').append($dropdown);
|
|
227
229
|
$dropdown.css({
|
|
228
|
-
top: $btn.offset().top + $btn.
|
|
229
|
-
left: $btn.offset().left
|
|
230
|
+
top: $btn.offset().top + $btn.outerHeight(),
|
|
231
|
+
left: $btn.offset().left + $btn.outerWidth() - $dropdown.outerWidth()
|
|
230
232
|
});
|
|
231
233
|
|
|
232
|
-
$('body').append($dropdown);
|
|
233
|
-
|
|
234
234
|
$(document).on('mousedown.dropdown', function(e) {
|
|
235
235
|
if (!$(e.target).closest('.loggertype-dropdown').length) {
|
|
236
236
|
$dropdown.remove();
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
// Do whatever you need with the selection
|
|
248
248
|
console.log('Selected:', selectedValue, selectedText);
|
|
249
249
|
$dropdown.remove();
|
|
250
|
-
RED.editor.editConfig("#
|
|
250
|
+
RED.editor.editConfig("#logger-selector", selectedValue, "_ADD_");
|
|
251
251
|
});
|
|
252
252
|
})
|
|
253
253
|
});
|
|
@@ -265,12 +265,15 @@
|
|
|
265
265
|
// lastly, make sure that we set the correct value on the logger selector.
|
|
266
266
|
updateLoggerSelectorList().then(() => {
|
|
267
267
|
loggerSelector.val(node.logger);
|
|
268
|
+
loggerSelector.trigger('change');
|
|
268
269
|
});
|
|
269
270
|
|
|
270
271
|
</script>
|
|
271
272
|
|
|
272
273
|
<script type="text/javascript" template-section="onIncludeEditSave">
|
|
273
274
|
node = this;
|
|
275
|
+
var selectedLogger = $("#logger-selector").val();
|
|
276
|
+
node.logger = (selectedLogger && selectedLogger !== "_ADD_") ? selectedLogger : '';
|
|
274
277
|
node.logTemplateOverride = node.logTemplateOverrideEditor.getValue();
|
|
275
278
|
node.logTemplateOverrideEditor.destroy();
|
|
276
279
|
delete node.logTemplateOverrideEditor;
|
|
@@ -289,9 +292,9 @@
|
|
|
289
292
|
|
|
290
293
|
<div id="section_logEnabled">
|
|
291
294
|
<div class="form-row nomargin">
|
|
292
|
-
<label for="
|
|
295
|
+
<label for="logger-selector">Logger</label>
|
|
293
296
|
<div style="width: 70%; display: inline-flex;">
|
|
294
|
-
<select id="
|
|
297
|
+
<select id="logger-selector" style="flex-grow: 1;" class="">
|
|
295
298
|
<option value="_ADD_">none</option>
|
|
296
299
|
</select>
|
|
297
300
|
<a id="logger-edit-btn" class="red-ui-button disabled" style="margin-left: 10px;">
|
|
@@ -310,7 +313,7 @@
|
|
|
310
313
|
|
|
311
314
|
<div id="section_logTemplateOverrideEnabled">
|
|
312
315
|
<div class="form-row">
|
|
313
|
-
<label for="node-input-logTemplateOverrideEditor"><i class="fa fa-
|
|
316
|
+
<label class="towb_editorlabel" for="node-input-logTemplateOverrideEditor"><i class="fa fa-code"></i> Template</label>
|
|
314
317
|
<div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-input-logTemplateOverrideEditor"></div>
|
|
315
318
|
</div>
|
|
316
319
|
</div>
|
|
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LoggerTemplate = void 0;
|
|
4
4
|
const NodeGenerator_1 = require("../../NodeGenerator");
|
|
5
5
|
const NodeConstructor_1 = require("../../NodeConstructor");
|
|
6
|
-
const LoggerConfigNode_1 = require("../node/LoggerConfigNode");
|
|
7
6
|
class LoggerTemplate extends NodeConstructor_1.Template {
|
|
8
7
|
static getTemplateDescriptor() {
|
|
9
|
-
return new NodeConstructor_1.TemplateDescriptor("logger", LoggerTemplate, NodeGenerator_1.SourceUtility.getSourcePath("/build/", "/src/") + "LoggerTemplate.html", [
|
|
8
|
+
return new NodeConstructor_1.TemplateDescriptor("logger", LoggerTemplate, NodeGenerator_1.SourceUtility.getSourcePath("/build/", "/src/") + "LoggerTemplate.html", []);
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
11
|
exports.LoggerTemplate = LoggerTemplate;
|
|
@@ -53,7 +53,7 @@ function Metrics(metricsConfig) {
|
|
|
53
53
|
metricdescription: metricsConfig.description,
|
|
54
54
|
node: nde
|
|
55
55
|
};
|
|
56
|
-
this[valueSymbol] = _metrics.
|
|
56
|
+
this[valueSymbol] = _metrics.gauge(gaugeConfig);
|
|
57
57
|
return this[valueSymbol];
|
|
58
58
|
}
|
|
59
59
|
// timer metric.
|
|
@@ -126,7 +126,7 @@ function Metrics(metricsConfig) {
|
|
|
126
126
|
metricdescription: metricsConfig.description,
|
|
127
127
|
node: nde
|
|
128
128
|
};
|
|
129
|
-
this[valueSymbol] = _metrics.
|
|
129
|
+
this[valueSymbol] = _metrics.gauge(gaugeConfig);
|
|
130
130
|
return this[valueSymbol];
|
|
131
131
|
}
|
|
132
132
|
// timer metric.
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
<script type="text/html" template-section="onIncludeEditForm">
|
|
21
21
|
<div id="MetricsConfig">
|
|
22
22
|
<div class="form-row">
|
|
23
|
-
<label for="node-config-input-name"><i class="fa fa-
|
|
23
|
+
<label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
|
|
24
24
|
<input type="text" id="node-config-input-name" />
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<div class="form-row">
|
|
28
|
-
<label for="node-config-input-description"><i class="fa fa-
|
|
28
|
+
<label class="towb_editorlabel" for="node-config-input-description"><i class="fa fa-info-circle"></i> Description</label>
|
|
29
29
|
<input type="text" id="node-config-input-description" />
|
|
30
30
|
</div>
|
|
31
31
|
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
<script type="text/html" template-section="onIncludeEditForm">
|
|
21
21
|
<div id="MetricsConfig">
|
|
22
22
|
<div class="form-row">
|
|
23
|
-
<label for="node-config-input-name"><i class="fa fa-
|
|
23
|
+
<label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
|
|
24
24
|
<input type="text" id="node-config-input-name">
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<div class="form-row">
|
|
28
|
-
<label for="node-config-input-description"><i class="fa fa-
|
|
28
|
+
<label class="towb_editorlabel" for="node-config-input-description"><i class="fa fa-info-circle"></i> Description</label>
|
|
29
29
|
<input type="text" id="node-config-input-description">
|
|
30
30
|
</div>
|
|
31
31
|
|
|
@@ -31,7 +31,7 @@ let GaugeMetricConfigNode = class GaugeMetricConfigNode extends NodeConstructor_
|
|
|
31
31
|
name: this.name()
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
this._gauge = this._metrics.
|
|
34
|
+
this._gauge = this._metrics.gauge(gaugeConfig);
|
|
35
35
|
if (config.reset) {
|
|
36
36
|
_this._gauge.reset();
|
|
37
37
|
}
|
|
@@ -47,7 +47,7 @@ exports.GaugeMetricConfigNode = GaugeMetricConfigNode;
|
|
|
47
47
|
exports.GaugeMetricConfigNode = GaugeMetricConfigNode = __decorate([
|
|
48
48
|
(0, NodeDescriptionDecorator_1.NodeDescription)({
|
|
49
49
|
id: "GaugeMetricConfigNode",
|
|
50
|
-
name: "
|
|
50
|
+
name: "Gauge Metric Config Node",
|
|
51
51
|
group: "config",
|
|
52
52
|
sourceFile: NodeGenerator_1.SourceUtility.getSourcePath("/build/", "/src/") + "GaugeMetricConfigNode.html",
|
|
53
53
|
package: "@theotherwillembotha/node-red-plugincore",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<script type="text/html" template-section="onIncludeEditForm">
|
|
9
9
|
<div id="MetricsConfig">
|
|
10
10
|
<div class="form-row">
|
|
11
|
-
<label for="node-config-input-name"><i class="fa fa-
|
|
11
|
+
<label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
|
|
12
12
|
<input type="text" id="node-config-input-name" />
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
@@ -88,23 +88,23 @@
|
|
|
88
88
|
<script type="text/html" template-section="onIncludeEditForm">
|
|
89
89
|
<div id="TimerMetricConfig">
|
|
90
90
|
<div class="form-row">
|
|
91
|
-
<label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-
|
|
91
|
+
<label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
|
|
92
92
|
<input type="text" id="node-config-input-name" />
|
|
93
93
|
</div>
|
|
94
94
|
|
|
95
95
|
<div class="form-row">
|
|
96
|
-
<label class="towb_editorlabel" for="node-config-input-description"><i class="fa fa-
|
|
96
|
+
<label class="towb_editorlabel" for="node-config-input-description"><i class="fa fa-info-circle"></i> Description</label>
|
|
97
97
|
<input type="text" id="node-config-input-description" />
|
|
98
98
|
</div>
|
|
99
99
|
|
|
100
100
|
<div class="form-row">
|
|
101
|
-
<label class="towb_editorlabel" for="node-config-input-metricType"><i class="fa fa-
|
|
101
|
+
<label class="towb_editorlabel" for="node-config-input-metricType"><i class="fa fa-bar-chart"></i> Type</label>
|
|
102
102
|
<input class="towb_editorfield" type="text" id="node-config-input-metricType" />
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
<div class="metrictype metrictype_histogram">
|
|
106
106
|
<div class="form-row">
|
|
107
|
-
<label class="towb_editorlabel" for="node-config-input-buckettype"><i class="fa fa-
|
|
107
|
+
<label class="towb_editorlabel" for="node-config-input-buckettype"><i class="fa fa-sliders"></i> Bucket Type</label>
|
|
108
108
|
<input class="towb_editorfield" type="text" id="node-config-input-buckettype" />
|
|
109
109
|
</div>
|
|
110
110
|
|
|
@@ -114,37 +114,37 @@
|
|
|
114
114
|
|
|
115
115
|
<div class="metricsconfig_buckets metricsconfig_buckets_manual">
|
|
116
116
|
<div class="form-row">
|
|
117
|
-
<label class="towb_editorlabel" for="node-config-input-buckettype_manual_intervals"><i class="fa fa-
|
|
117
|
+
<label class="towb_editorlabel" for="node-config-input-buckettype_manual_intervals"><i class="fa fa-sliders"></i> Buckets</label>
|
|
118
118
|
<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"/>
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
121
|
|
|
122
122
|
<div class="metricsconfig_buckets metricsconfig_buckets_linear">
|
|
123
123
|
<div class="form-row">
|
|
124
|
-
<label class="towb_editorlabel" for="node-config-input-buckettype_linear_start"><i class="fa fa-
|
|
124
|
+
<label class="towb_editorlabel" for="node-config-input-buckettype_linear_start"><i class="fa fa-sliders"></i> Start</label>
|
|
125
125
|
<input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_linear_start" placeholder="0.000", value="0.000"/>
|
|
126
126
|
</div>
|
|
127
127
|
<div class="form-row">
|
|
128
|
-
<label class="towb_editorlabel" for="node-config-input-
|
|
128
|
+
<label class="towb_editorlabel" for="node-config-input-buckettype_linear_interval"><i class="fa fa-sliders"></i> Interval</label>
|
|
129
129
|
<input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_linear_interval" placeholder="10", value="10"/>
|
|
130
130
|
</div>
|
|
131
131
|
<div class="form-row">
|
|
132
|
-
<label class="towb_editorlabel" for="node-config-input-buckettype_linear_count"><i class="fa fa-
|
|
132
|
+
<label class="towb_editorlabel" for="node-config-input-buckettype_linear_count"><i class="fa fa-sliders"></i> Count</label>
|
|
133
133
|
<input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_linear_count" placeholder="10", value="10"/>
|
|
134
134
|
</div>
|
|
135
135
|
</div>
|
|
136
136
|
|
|
137
137
|
<div class="metricsconfig_buckets metricsconfig_buckets_exponential">
|
|
138
138
|
<div class="form-row">
|
|
139
|
-
<label class="towb_editorlabel" for="node-config-input-buckettype_exponential_start"><i class="fa fa-
|
|
139
|
+
<label class="towb_editorlabel" for="node-config-input-buckettype_exponential_start"><i class="fa fa-sliders"></i> Start</label>
|
|
140
140
|
<input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_exponential_start" placeholder="1", value="1"/>
|
|
141
141
|
</div>
|
|
142
142
|
<div class="form-row">
|
|
143
|
-
<label class="towb_editorlabel" for="node-config-input-buckettype_exponential_factor"><i class="fa fa-
|
|
143
|
+
<label class="towb_editorlabel" for="node-config-input-buckettype_exponential_factor"><i class="fa fa-sliders"></i> Factor</label>
|
|
144
144
|
<input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_exponential_factor" placeholder="2", value="2"/>
|
|
145
145
|
</div>
|
|
146
146
|
<div class="form-row">
|
|
147
|
-
<label class="towb_editorlabel" for="node-config-input-buckettype_exponential_count"><i class="fa fa-
|
|
147
|
+
<label class="towb_editorlabel" for="node-config-input-buckettype_exponential_count"><i class="fa fa-sliders"></i> Count</label>
|
|
148
148
|
<input class="towb_editorfield_short" type="text" id="node-config-input-buckettype_exponential_count" placeholder="10", value="10"/>
|
|
149
149
|
</div>
|
|
150
150
|
</div>
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
|
|
153
153
|
<div class="metrictype metrictype_summary">
|
|
154
154
|
<div class="form-row">
|
|
155
|
-
<label class="towb_editorlabel" for="node-config-input-percentiletype"><i class="fa fa-
|
|
155
|
+
<label class="towb_editorlabel" for="node-config-input-percentiletype"><i class="fa fa-sliders"></i> Percentile Type</label>
|
|
156
156
|
<input type="text" id="node-config-input-percentiletype" />
|
|
157
157
|
</div>
|
|
158
158
|
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
|
|
163
163
|
<div class="metricsconfig_percentiles metricsconfig_percentiles_manual">
|
|
164
164
|
<div class="form-row">
|
|
165
|
-
<label class="towb_editorlabel" for="node-config-input-percentiletype_manual_intervals"><i class="fa fa-
|
|
165
|
+
<label class="towb_editorlabel" for="node-config-input-percentiletype_manual_intervals"><i class="fa fa-sliders"></i> Percentiles</label>
|
|
166
166
|
<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"/>
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
|
@@ -153,7 +153,7 @@ export declare class MetricsContainer {
|
|
|
153
153
|
registry(): client.Registry;
|
|
154
154
|
hasChanged(config: MetricsConfig): boolean;
|
|
155
155
|
counter(config: CounterMetricConfig): CounterMetric;
|
|
156
|
-
|
|
156
|
+
gauge(config: GaugeMetricConfig): GaugeMetric;
|
|
157
157
|
histogram(config: HistogramMetricConfig): HistogramMetric;
|
|
158
158
|
summary(config: SummaryMetricConfig): SummaryMetric;
|
|
159
159
|
}
|
|
@@ -281,18 +281,18 @@ class MetricsContainer {
|
|
|
281
281
|
}
|
|
282
282
|
return counter;
|
|
283
283
|
}
|
|
284
|
-
|
|
285
|
-
var
|
|
286
|
-
var gauge = this.gauges[
|
|
284
|
+
gauge(config) {
|
|
285
|
+
var gaugeId = `gauge_${config.node.id}`;
|
|
286
|
+
var gauge = this.gauges[gaugeId];
|
|
287
287
|
if (gauge) {
|
|
288
288
|
// check if the config has changed much.
|
|
289
289
|
if (!(0, deep_equal_1.default)(gauge.config(), config)) {
|
|
290
|
-
this._registry.removeSingleMetric(
|
|
291
|
-
this.gauges[
|
|
290
|
+
this._registry.removeSingleMetric(gaugeId);
|
|
291
|
+
this.gauges[gaugeId] = (gauge = new GaugeMetric(gaugeId, config, this._registry));
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
else {
|
|
295
|
-
this.gauges[
|
|
295
|
+
this.gauges[gaugeId] = (gauge = new GaugeMetric(gaugeId, config, this._registry));
|
|
296
296
|
}
|
|
297
297
|
return gauge;
|
|
298
298
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<!-- CounterMetric -->
|
|
29
29
|
<div id="section_countermetricconfig">
|
|
30
30
|
<div class="form-row">
|
|
31
|
-
<label for="node-input-counterConfig"><i class="fa fa-
|
|
31
|
+
<label class="towb_editorlabel" for="node-input-counterConfig"><i class="fa fa-bar-chart"></i> Counter</label>
|
|
32
32
|
<input type="text" id="node-input-counterConfig" />
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<!-- GaugeMetric -->
|
|
28
28
|
<div id="section_gaugemetricconfig">
|
|
29
29
|
<div class="form-row">
|
|
30
|
-
<label for="node-input-gaugeConfig"><i class="fa fa-
|
|
30
|
+
<label class="towb_editorlabel" for="node-input-gaugeConfig"><i class="fa fa-bar-chart"></i> Gauge</label>
|
|
31
31
|
<input type="text" id="node-input-gaugeConfig" />
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<div id="section_timermetricconfig">
|
|
29
29
|
<div class="form-row">
|
|
30
|
-
<label for="node-input-timerConfig"><i class="fa fa-
|
|
30
|
+
<label class="towb_editorlabel" for="node-input-timerConfig"><i class="fa fa-clock-o"></i> Timer</label>
|
|
31
31
|
<input type="text" id="node-input-timerConfig" />
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|