@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.
- package/README.md +60 -21
- package/build/GenerateNodes.js +2 -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/webhook/node/WebhookServerConfigNode.html +5 -5
- package/build/core/webhook/template/WebhookTemplate.html +18 -10
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/documentation/CounterMetricConfigNode.png +0 -0
- package/documentation/GaugeMetricConfigNode.png +0 -0
- package/documentation/MetricsConfigNode.png +0 -0
- package/documentation/TimerMetricConfigNode.png +0 -0
- package/documentation/WebhookNode.png +0 -0
- package/package.json +4 -3
- package/src/GenerateNodes.ts +3 -1
- 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/webhook/node/WebhookServerConfigNode.html +5 -5
- package/src/core/webhook/template/WebhookTemplate.html +18 -10
- package/src/index.ts +1 -2
- 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
|
@@ -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>
|
|
@@ -415,18 +415,18 @@ export class MetricsContainer {
|
|
|
415
415
|
return counter;
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
public
|
|
419
|
-
var
|
|
420
|
-
var gauge:GaugeMetric = this.gauges[
|
|
418
|
+
public gauge(config: GaugeMetricConfig): GaugeMetric {
|
|
419
|
+
var gaugeId = `gauge_${config.node.id}`;
|
|
420
|
+
var gauge:GaugeMetric = this.gauges[gaugeId];
|
|
421
421
|
if(gauge){
|
|
422
422
|
// check if the config has changed much.
|
|
423
423
|
if(!deepEqual(gauge.config(), config)){
|
|
424
|
-
this._registry.removeSingleMetric(
|
|
425
|
-
this.gauges[
|
|
424
|
+
this._registry.removeSingleMetric(gaugeId);
|
|
425
|
+
this.gauges[gaugeId] = (gauge = new GaugeMetric(gaugeId, config, this._registry));
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
else{
|
|
429
|
-
this.gauges[
|
|
429
|
+
this.gauges[gaugeId] = (gauge = new GaugeMetric(gaugeId, config, this._registry));
|
|
430
430
|
}
|
|
431
431
|
return gauge;
|
|
432
432
|
}
|
|
@@ -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>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!-- This section is intentionally left blank -->
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* DelegatedConfigReferenceNode — a framework-internal sentinel type.
|
|
4
|
+
*
|
|
5
|
+
* PROBLEM
|
|
6
|
+
* Node-RED's reference counter (the usage count shown on config nodes in the
|
|
7
|
+
* Config sidebar) is driven by `updateConfigNodeUsers()` in nodes.js. That
|
|
8
|
+
* function only tracks a property as a config-node reference when two conditions
|
|
9
|
+
* are met:
|
|
10
|
+
* 1. `defaults[property].type` is set to a registered node type name.
|
|
11
|
+
* 2. That node type's `category` equals `"config"`.
|
|
12
|
+
*
|
|
13
|
+
* When a node property can reference *any* of several config-node types (e.g.
|
|
14
|
+
* ConsoleLoggerConfigNode, RestLoggerConfigNode, LokiLoggerConfigNode, or a
|
|
15
|
+
* future third-party logger), there is no single concrete type to declare.
|
|
16
|
+
* Leaving `type` blank causes the counter to stay at zero even when references
|
|
17
|
+
* exist, and the config node is incorrectly flagged as unused.
|
|
18
|
+
*
|
|
19
|
+
* WORKAROUND
|
|
20
|
+
* Register this no-op node with `category: "config"` so that its type name can
|
|
21
|
+
* be used as the `type` value in `addDefault(...)` calls where the referenced
|
|
22
|
+
* config node type is not known ahead of time (open/delegated reference).
|
|
23
|
+
* `updateConfigNodeUsers` will then pass both gates, look up the config node by
|
|
24
|
+
* its actual runtime ID, and correctly increment the counter.
|
|
25
|
+
*
|
|
26
|
+
* USAGE
|
|
27
|
+
* In a template or node's onCompose section, declare the property like this:
|
|
28
|
+
*
|
|
29
|
+
* .addDefault("myProp", { value: '', required: false, type: "DelegatedConfigReferenceNode" })
|
|
30
|
+
*
|
|
31
|
+
* Because the property name intentionally does NOT match the `node-input-X` /
|
|
32
|
+
* `node-config-input-X` naming convention, Node-RED will NOT auto-initialise
|
|
33
|
+
* the form element or auto-save the value. You must therefore:
|
|
34
|
+
* - Read the stored value manually in `onIncludeEditPrepare`
|
|
35
|
+
* e.g. $("#my-selector").val(node.myProp);
|
|
36
|
+
* - Write it back manually in `onIncludeEditSave`
|
|
37
|
+
* e.g. node.myProp = $("#my-selector").val();
|
|
38
|
+
*
|
|
39
|
+
* LONG-TERM
|
|
40
|
+
* A proper fix would be a Node-RED PR to make `updateConfigNodeUsers` use the
|
|
41
|
+
* already-parsed `_type.types` array (set by `parseNodePropertyTypeString`) so
|
|
42
|
+
* that pipe-separated multi-type strings such as
|
|
43
|
+
* "ConsoleLoggerConfigNode|RestLoggerConfigNode" work natively.
|
|
44
|
+
* Until that PR is accepted, this sentinel type is the recommended workaround
|
|
45
|
+
* within this framework.
|
|
46
|
+
*
|
|
47
|
+
* NOTE: This node has no UI, no edit form, and no runtime behaviour. It cannot
|
|
48
|
+
* be instantiated by users and should never appear as a flow node.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
import { Node } from "node-red";
|
|
52
|
+
import { ConfigNode, ConfigNodeConfig } from "../../NodeConstructor"
|
|
53
|
+
import { SourceUtility } from "../../NodeGenerator";
|
|
54
|
+
import { NodeDescription } from "../../tagging/NodeDescriptionDecorator";
|
|
55
|
+
|
|
56
|
+
interface DelegatedConfigReferenceNodeConfig extends ConfigNodeConfig {}
|
|
57
|
+
|
|
58
|
+
@NodeDescription({
|
|
59
|
+
id:"DelegatedConfigReferenceNode",
|
|
60
|
+
name:"DelegatedConfigReferenceNode",
|
|
61
|
+
group:"config",
|
|
62
|
+
sourceFile:SourceUtility.getSourcePath("/build/", "/src/") + "DelegatedConfigReferenceNode.html",
|
|
63
|
+
package: "@theotherwillembotha/node-red-plugincore",
|
|
64
|
+
})
|
|
65
|
+
export class DelegatedConfigReferenceNode extends ConfigNode<DelegatedConfigReferenceNodeConfig> {
|
|
66
|
+
|
|
67
|
+
constructor(node: Node, config: DelegatedConfigReferenceNodeConfig){
|
|
68
|
+
super(node, config);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -14,7 +14,7 @@ export type NodeDescriptionConfig = {
|
|
|
14
14
|
|
|
15
15
|
export function NodeDescription(config:NodeDescriptionConfig) {
|
|
16
16
|
return function(target: any) {
|
|
17
|
-
let descriptor:NodeDescriptor = new NodeDescriptor(config.group, config.id, config.sourceFile, config.package);
|
|
17
|
+
let descriptor:NodeDescriptor = new NodeDescriptor(config.group, config.id, config.name, config.sourceFile, config.package);
|
|
18
18
|
|
|
19
19
|
if(config.templates){
|
|
20
20
|
for(let template of config.templates){
|
|
@@ -22,7 +22,7 @@ export class NodeTypeService extends BaseService {
|
|
|
22
22
|
let types = this.getNodeTypesForTag(tag).map( type => {
|
|
23
23
|
let description = type.getNodeDescriptor();
|
|
24
24
|
return {
|
|
25
|
-
"id": description.
|
|
25
|
+
"id": description.id(),
|
|
26
26
|
"name": description.name(),
|
|
27
27
|
};
|
|
28
28
|
})
|
|
@@ -18,25 +18,25 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
<script type="text/html" template-section="onIncludeEditForm"
|
|
21
|
+
<script type="text/html" template-section="onIncludeEditForm">
|
|
22
22
|
<div id="WebhookServerConfig">
|
|
23
23
|
<div class="form-row">
|
|
24
|
-
<label for="node-config-input-name"><i class="fa fa-
|
|
24
|
+
<label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
|
|
25
25
|
<input type="text" id="node-config-input-name" />
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
<div class="form-row">
|
|
29
|
-
<label for="node-config-input-port"><i class="fa fa-
|
|
29
|
+
<label class="towb_editorlabel" for="node-config-input-port"><i class="fa fa-plug"></i> Port</label>
|
|
30
30
|
<input type="number" id="node-config-input-port" />
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
33
|
<div class="form-row">
|
|
34
|
-
<label for="node-config-input-externalHost"><i class="fa fa-
|
|
34
|
+
<label class="towb_editorlabel" for="node-config-input-externalHost"><i class="fa fa-globe"></i> External Host</label>
|
|
35
35
|
<input type="text" id="node-config-input-externalHost" />
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
<div class="form-row">
|
|
39
|
-
<label for="node-config-input-externalPort"><i class="fa fa-
|
|
39
|
+
<label class="towb_editorlabel" for="node-config-input-externalPort"><i class="fa fa-plug"></i> External Port</label>
|
|
40
40
|
<input type="number" id="node-config-input-externalPort" />
|
|
41
41
|
</div>
|
|
42
42
|
<!-- add a button here to autmatically find an open port -->
|
|
@@ -133,6 +133,12 @@ node
|
|
|
133
133
|
return types;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
getProxyTypes().then(types => {
|
|
137
|
+
if(types.length === 0){
|
|
138
|
+
$("#section_reverseproxy_feature").hide();
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
136
142
|
let getProxies = async () => {
|
|
137
143
|
let proxies = [];
|
|
138
144
|
|
|
@@ -335,17 +341,17 @@ node
|
|
|
335
341
|
|
|
336
342
|
<div class="editorgroupborder">
|
|
337
343
|
<div class="form-row nomargin">
|
|
338
|
-
<label for="{{defaults.webhook}}">Server</label>
|
|
344
|
+
<label class="towb_editorlabel" for="{{defaults.webhook}}"><i class="fa fa-server"></i> Server</label>
|
|
339
345
|
<input id="{{defaults.webhook}}" placeholder="webhook" />
|
|
340
346
|
</div>
|
|
341
|
-
|
|
347
|
+
|
|
342
348
|
<div class="form-row">
|
|
343
|
-
<label for="{{defaults.webhookPath}}">Path</label>
|
|
349
|
+
<label class="towb_editorlabel" for="{{defaults.webhookPath}}"><i class="fa fa-link"></i> Path</label>
|
|
344
350
|
<input type="text" id="{{defaults.webhookPath}}" placeholder="/example" />
|
|
345
351
|
</div>
|
|
346
352
|
|
|
347
353
|
<div class="form-row">
|
|
348
|
-
<label for="{{defaults.webhookAuth}}">Authentication</label>
|
|
354
|
+
<label class="towb_editorlabel" for="{{defaults.webhookAuth}}"><i class="fa fa-lock"></i> Authentication</label>
|
|
349
355
|
<input type="text" id="{{defaults.webhookAuth}}" placeholder="none" />
|
|
350
356
|
</div>
|
|
351
357
|
|
|
@@ -354,33 +360,34 @@ node
|
|
|
354
360
|
|
|
355
361
|
<div class="webhookauth webhookauth-basic">
|
|
356
362
|
<div class="form-row">
|
|
357
|
-
<label for="{{defaults.webhookAuth_basic_username}}">
|
|
363
|
+
<label class="towb_editorlabel" for="{{defaults.webhookAuth_basic_username}}"><i class="fa fa-user"></i> Username</label>
|
|
358
364
|
<input type="text" id="{{defaults.webhookAuth_basic_username}}" placeholder="testUser" />
|
|
359
365
|
</div>
|
|
360
366
|
|
|
361
367
|
<div class="form-row">
|
|
362
|
-
<label for="{{defaults.webhookAuth_basic_password}}">
|
|
368
|
+
<label class="towb_editorlabel" for="{{defaults.webhookAuth_basic_password}}"><i class="fa fa-key"></i> Password</label>
|
|
363
369
|
<input type="password" id="{{defaults.webhookAuth_basic_password}}" placeholder="password" />
|
|
364
370
|
</div>
|
|
365
371
|
</div>
|
|
366
372
|
|
|
367
373
|
<div class="webhookauth webhookauth-apikey">
|
|
368
374
|
<div class="form-row">
|
|
369
|
-
<label for="{{defaults.webhookAuth_apikey_mechanism}}">
|
|
375
|
+
<label class="towb_editorlabel" for="{{defaults.webhookAuth_apikey_mechanism}}"><i class="fa fa-exchange"></i> Mechanism</label>
|
|
370
376
|
<input type="text" id="{{defaults.webhookAuth_apikey_mechanism}}"/>
|
|
371
377
|
</div>
|
|
372
378
|
|
|
373
379
|
<div class="form-row">
|
|
374
|
-
<label for="{{defaults.webhookAuth_apikey_key}}">APIKey
|
|
380
|
+
<label class="towb_editorlabel" for="{{defaults.webhookAuth_apikey_key}}"><i class="fa fa-id-badge"></i> APIKey name</label>
|
|
375
381
|
<input type="text" id="{{defaults.webhookAuth_apikey_key}}" placeholder="x-api-key" />
|
|
376
382
|
</div>
|
|
377
383
|
|
|
378
384
|
<div class="form-row">
|
|
379
|
-
<label for="{{defaults.webhookAuth_apikey_value}}">APIKey
|
|
385
|
+
<label class="towb_editorlabel" for="{{defaults.webhookAuth_apikey_value}}"><i class="fa fa-lock"></i> APIKey value</label>
|
|
380
386
|
<input type="text" id="{{defaults.webhookAuth_apikey_value}}" placeholder="testvalue" />
|
|
381
387
|
</div>
|
|
382
388
|
</div>
|
|
383
389
|
|
|
390
|
+
<div id="section_reverseproxy_feature">
|
|
384
391
|
<div class="form-row">
|
|
385
392
|
<label>Reverse Proxy</label>
|
|
386
393
|
<input type="checkbox" id="{{defaults.reverseProxies_enabled}}" style="width:20px; margin-right:5px;" />
|
|
@@ -392,8 +399,9 @@ node
|
|
|
392
399
|
<ol id="reverseproxylist_table" class="theotherwillembotha-compact-table"></ol>
|
|
393
400
|
</div>
|
|
394
401
|
</div>
|
|
402
|
+
</div>
|
|
403
|
+
|
|
395
404
|
|
|
396
|
-
|
|
397
405
|
</div>
|
|
398
406
|
</div>
|
|
399
407
|
</script>
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from "./core/NodeConstructor";
|
|
|
4
4
|
|
|
5
5
|
// LOGGER
|
|
6
6
|
export * from "./core/logger/service/LoggerService";
|
|
7
|
-
export * from "./core/logger/node/LoggerConfigNode";
|
|
8
7
|
export * from "./core/logger/template/LoggerTemplate";
|
|
9
8
|
export * from "./core/logger/node/ConsoleLoggerConfigNode";
|
|
10
9
|
export * from "./core/logger/node/RestLoggerConfigNode";
|
|
@@ -25,8 +24,8 @@ export * from "./core/metrics/template/TimerMetricTemplate";
|
|
|
25
24
|
export * from "./core/tagging/service/NodeTypeService";
|
|
26
25
|
export * from "./core/tagging/NodeDescriptionDecorator";
|
|
27
26
|
|
|
28
|
-
|
|
29
27
|
// OTHER
|
|
28
|
+
export * from "./core/other/node/DelegatedConfigReferenceNode";
|
|
30
29
|
export * from "./core/other/service/InputService";
|
|
31
30
|
export * from "./core/other/service/SettingsService";
|
|
32
31
|
export * from "./core/other/template/BasicTemplate";
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Node } from "node-red";
|
|
2
|
-
import { ConfigNode, ConfigNodeConfig, NodeDescriptor } from "../../NodeConstructor";
|
|
3
|
-
import { Log, LoggerRegistration } from "../service/LoggerService";
|
|
4
|
-
import { ApiKeyMechanismType, Level, PlatformType, RestAuthType } from "../service/LoggerServiceTypes";
|
|
5
|
-
interface LoggerConfigNodeConfig extends ConfigNodeConfig {
|
|
6
|
-
id: string;
|
|
7
|
-
platform: PlatformType;
|
|
8
|
-
level: Level;
|
|
9
|
-
platfrom: PlatformType;
|
|
10
|
-
template: string;
|
|
11
|
-
platform_rest_url: string;
|
|
12
|
-
platform_rest_auth_type: RestAuthType;
|
|
13
|
-
platform_rest_auth_basic_username: string;
|
|
14
|
-
platform_rest_auth_basic_password: string;
|
|
15
|
-
platform_rest_auth_apikey_mechanism: ApiKeyMechanismType;
|
|
16
|
-
platform_rest_auth_apikey_name: string;
|
|
17
|
-
platform_rest_auth_apikey_value: string;
|
|
18
|
-
platform_loki_host: string;
|
|
19
|
-
platform_loki_userid?: string;
|
|
20
|
-
platform_loki_authtoken?: string;
|
|
21
|
-
platform_loki_tenantID?: string;
|
|
22
|
-
}
|
|
23
|
-
export declare class LoggerConfigNode extends ConfigNode<LoggerConfigNodeConfig> {
|
|
24
|
-
private _logger;
|
|
25
|
-
constructor(node: Node, config: LoggerConfigNodeConfig);
|
|
26
|
-
registerLogger(registration: LoggerRegistration): Log;
|
|
27
|
-
static getNodeDescriptor(): NodeDescriptor;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=LoggerConfigNode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoggerConfigNode.d.ts","sourceRoot":"","sources":["../../../../src/core/logger/node/LoggerConfigNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACpF,OAAO,EAAa,GAAG,EAAE,kBAAkB,EAAmC,MAAM,0BAA0B,CAAA;AAE9G,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAEvG,UAAU,sBAAuB,SAAQ,gBAAgB;IAErD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAC,KAAK,CAAC;IACZ,QAAQ,EAAC,YAAY,CAAC;IACtB,QAAQ,EAAC,MAAM,CAAC;IAEhB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,YAAY,CAAC;IACtC,iCAAiC,EAAC,MAAM,CAAC;IACzC,iCAAiC,EAAC,MAAM,CAAC;IACzC,mCAAmC,EAAC,mBAAmB,CAAC;IACxD,8BAA8B,EAAC,MAAM,CAAC;IACtC,+BAA+B,EAAC,MAAM,CAAC;IAEvC,kBAAkB,EAAC,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAC,MAAM,CAAC;IAC7B,uBAAuB,CAAC,EAAC,MAAM,CAAC;IAChC,sBAAsB,CAAC,EAAC,MAAM,CAAA;CACjC;AAED,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,sBAAsB,CAAC;IAEpE,OAAO,CAAC,OAAO,CAAkB;gBAErB,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,sBAAsB;IAgD/C,cAAc,CAAC,YAAY,EAAC,kBAAkB,GAAE,GAAG;WAI1C,iBAAiB,IAAG,cAAc;CASrD"}
|