node-red-contrib-uos-nats 0.2.59 → 0.2.60
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/nodes/uos-config.html +10 -2
- package/package.json +1 -1
package/nodes/uos-config.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
defaults: {
|
|
6
6
|
host: { value: '127.0.0.1', required: true },
|
|
7
7
|
port: { value: 49360, required: true, validate: RED.validators.number() },
|
|
8
|
-
clientName: { value: '
|
|
8
|
+
clientName: { value: '', required: true }, // No default, required
|
|
9
9
|
scope: { value: FIXED_SCOPE, required: true },
|
|
10
10
|
},
|
|
11
11
|
credentials: {
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
const $scopeDisplay = $('#uos-scope-display');
|
|
22
22
|
const $scopeSpinner = $('#uos-scope-spinner');
|
|
23
23
|
const $refresh = $('#uos-scope-refresh');
|
|
24
|
+
|
|
25
|
+
// Ensure red border for empty required fields is handled by Node-RED standard 'required: true'
|
|
26
|
+
// but we removed the default value for clientName so it starts empty.
|
|
27
|
+
|
|
24
28
|
const updateDisplay = (text, cls = '') => {
|
|
25
29
|
$scopeDisplay.text(text);
|
|
26
30
|
$scopeDisplay.removeClass('form-tips-warning form-tips-error');
|
|
@@ -69,6 +73,9 @@
|
|
|
69
73
|
const clientId = $('#node-config-input-clientId').val();
|
|
70
74
|
const clientSecret = $('#node-config-input-clientSecret').val();
|
|
71
75
|
|
|
76
|
+
// Show the status box
|
|
77
|
+
$testStatus.show();
|
|
78
|
+
|
|
72
79
|
if (!host || !clientId || !clientSecret) {
|
|
73
80
|
$testStatus.html('<span style="color:var(--red-ui-text-color-error)"><i class="fa fa-exclamation-triangle"></i> Please fill Host, Client ID and Secret</span>');
|
|
74
81
|
return;
|
|
@@ -137,7 +144,8 @@
|
|
|
137
144
|
<button class="red-ui-button" id="uos-config-test-connection" type="button" style="width:100%">
|
|
138
145
|
<i class="fa fa-plug"></i> Test Connection & List Providers
|
|
139
146
|
</button>
|
|
140
|
-
|
|
147
|
+
<!-- Initially hidden, only shown after click. Same width behavior inherited from container logic. -->
|
|
148
|
+
<div id="uos-test-status" class="form-tips" style="margin-top:5px; display:none;"></div>
|
|
141
149
|
</div>
|
|
142
150
|
</script>
|
|
143
151
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-uos-nats",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.60",
|
|
4
4
|
"description": "Node-RED nodes for Weidmüller u-OS Data Hub. Read, write, and provide variables via NATS protocol with OAuth2 authentication. Features: Variable Key resolution, custom icons, example flows, and provider definition caching.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "IoTUeli",
|