Skip to content

Commit 5ef91e9

Browse files
committed
fixes
1 parent 528f4e0 commit 5ef91e9

7 files changed

Lines changed: 13 additions & 5 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ dist
55
config
66
temp
77
.cache
8-
.npmrc
8+
.npmrc
9+
.openflowapicache

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.vscode
33
.npmrc
44
.cache
5+
.openflowapicache
56
config
67
docs
78
node_modules

OpenFlow/src/Messages/Message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2305,7 +2305,7 @@ export class Message {
23052305
let exists = known.filter((x: any) => x.id == id);
23062306
let item: any = {
23072307
id: client.id, user: client.user, clientagent: client.clientagent, clientversion: client.clientversion
2308-
, lastheartbeat: client.lastheartbeat, _type: "socketclient", name: client.id,
2308+
, lastheartbeat: client.lastheartbeat, _type: "socketclient", name: client.id, remoteip: client.remoteip,
23092309
queues: client._queues
23102310
};
23112311
if (client.user != null) {

OpenFlow/src/WebSocketServerClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class WebSocketServerClient {
9090
if (req.headers["x-real-ip"] != null) this.remoteip = req.headers["x-real-ip"];
9191
}
9292
}
93-
logger.info("new client " + this.id);;
93+
logger.info("new client " + this.id + " from " + this.remoteip);
9494
socketObject.on("open", (e: Event): void => this.open(e));
9595
socketObject.on("message", (e: string): void => this.message(e)); // e: MessageEvent
9696
socketObject.on("error", (e: Event): void => this.error(e));

OpenFlow/src/public/Sockets.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<th scope="col" ng-click="ctrl.ToggleOrder('name')"><b translate lib="web">name</b></th>
1111
<th scope="col" ng-click="ctrl.ToggleOrder('clientagent')"><b translate lib="web">clientagent</b></th>
1212
<th scope="col" ng-click="ctrl.ToggleOrder('queues')"><b translate lib="web">queues</b></th>
13+
<th scope="col" ng-click="ctrl.ToggleOrder('remoteip')"><b translate lib="web">remoteip</b></th>
1314
<th scope="col" ng-click="ctrl.ToggleOrder('lastheartbeat')"><b translate lib="web">lastheartbeat</b></th>
1415
<th scope="col" ng-click="ctrl.ToggleOrder('_modified')"><b translate lib="web">updated</b></th>
1516
</tr>
@@ -19,6 +20,7 @@
1920
<td>{{model.name}}</td>
2021
<td>{{model.clientagent}}</td>
2122
<td>{{model.queuescount}} </td>
23+
<td>{{model.remoteip}} </td>
2224
<td>
2325
<timesince ng-model="model.lastheartbeat" />
2426
</td>

OpenFlowNodeRED/src/nodered/nodes/rpa_nodes.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export class rpa_workflow_node {
9797
private localqueue: string = "";
9898
private _onsignedin: any = null;
9999
private _onsocketclose: any = null;
100+
private originallocalqueue: string = "";
100101
constructor(public config: Irpa_workflow_node) {
101102
RED.nodes.createNode(this, config);
102103
try {
@@ -110,6 +111,9 @@ export class rpa_workflow_node {
110111

111112
WebSocketClient.instance.events.on("onsignedin", this._onsignedin);
112113
WebSocketClient.instance.events.on("onclose", this._onsocketclose);
114+
if (!NoderedUtil.IsNullEmpty(this.originallocalqueue) || this.originallocalqueue != this.config.localqueue) {
115+
this.connect();
116+
}
113117
} catch (error) {
114118
NoderedUtil.HandleError(this, error);
115119
}
@@ -248,7 +252,7 @@ export class rpa_workflow_node {
248252
}
249253
}
250254
async onclose(removed: boolean, done: any) {
251-
if (!NoderedUtil.IsNullEmpty(this.localqueue) && removed) {
255+
if ((!NoderedUtil.IsNullEmpty(this.localqueue) && removed) || this.originallocalqueue != this.config.localqueue) {
252256
NoderedUtil.CloseQueue(WebSocketClient.instance, this.localqueue);
253257
this.localqueue = "";
254258
}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.11
1+
1.1.14

0 commit comments

Comments
 (0)