Skip to content

Commit 251c287

Browse files
committed
Show login errors on remote nodereds
1 parent 929ce52 commit 251c287

6 files changed

Lines changed: 18 additions & 5 deletions

File tree

OpenFlowNodeRED/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openiap/nodered",
3-
"version": "1.1.180",
3+
"version": "1.1.182",
44
"description": "Simple wrapper around NodeRed, RabbitMQ and MongoDB to support a more scaleable NodeRed implementation.\r Also the \"backend\" for [OpenRPA](https://github.com/skadefro/OpenRPA)",
55
"main": "index.js",
66
"scripts": {

OpenFlowNodeRED/src/nodered/nodes/amqp.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<label><i class="icon-bookmark"></i> Password</label>
1212
<input type="password" id="node-config-input-password">
1313
</div>
14+
<div class="form-row">
15+
<label ><i class="fa fa-tag"></i> Name</label>
16+
<input type="text" id="node-config-input-name" placeholder="Node name">
17+
</div>
1418
</script>
1519
<script type="text/javascript">
1620
RED.nodes.registerType('amqp-connection', {
@@ -24,7 +28,7 @@
2428
password: { type: "password" }
2529
},
2630
label: function () {
27-
return this.host || "amqp credentials";
31+
return (this.name || this.host) || "amqp credentials";
2832
}
2933
});
3034
</script>

OpenFlowNodeRED/src/nodered/nodes/amqp_nodes.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export class amqp_connection {
5151
this.webcli.events.emit("onsignedin", result.user);
5252
} catch (error) {
5353
this.webcli._logger.error(error);
54+
this.webcli.events.emit("onclose", (error.message ? error.message : error));
55+
NoderedUtil.HandleError(this.node, error, null);
5456
}
5557
});
5658
this.webcli.events.on("onsignedin", async (user) => {
@@ -82,7 +84,8 @@ export class amqp_consumer_node {
8284
RED.nodes.createNode(this, config);
8385
try {
8486
this.node = this;
85-
this.node.status({});
87+
// this.node.status({});
88+
this.node.status({ fill: "blue", shape: "dot", text: "Offline" });
8689
this.node.on("close", this.onclose);
8790
this.connection = RED.nodes.getNode(this.config.config);
8891
this._onsignedin = this.onsignedin.bind(this);
@@ -91,6 +94,8 @@ export class amqp_consumer_node {
9194
this.websocket().events.on("onclose", this._onsocketclose);
9295
if (this.websocket().isConnected && this.websocket().user != null) {
9396
this.connect();
97+
} else {
98+
this.node.status({ fill: "blue", shape: "dot", text: "Waiting on conn" });
9499
}
95100
} catch (error) {
96101
NoderedUtil.HandleError(this, error, null);

OpenFlowNodeRED/src/nodered/nodes/api.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
<label><i class="icon-bookmark"></i> Password</label>
88
<input type="password" id="node-config-input-password">
99
</div>
10+
<div class="form-row">
11+
<label ><i class="fa fa-tag"></i> Name</label>
12+
<input type="text" id="node-config-input-name" placeholder="Node name">
13+
</div>
1014
</script>
1115
<script type="text/javascript">
1216
RED.nodes.registerType('api-credentials', {

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.180
1+
1.1.182

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openiap/openflow",
3-
"version": "1.1.180",
3+
"version": "1.1.182",
44
"description": "Simple wrapper around NodeRed, RabbitMQ and MongoDB to support a more scaleable NodeRed implementation.\r Also the \"backend\" for [OpenRPA](https://github.com/skadefro/OpenRPA)",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)