Skip to content

Commit 95c70d3

Browse files
committed
Add powershell agent
1 parent a448047 commit 95c70d3

6 files changed

Lines changed: 14 additions & 3 deletions

File tree

OpenFlow/src/Messages/Message.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,9 @@ export class Message {
737737
if (cli.clientagent == "nodered") {
738738
user._lastnoderedclientversion = cli.clientversion;
739739
}
740+
if (cli.clientagent == "powershell") {
741+
user._lastpowershellclientversion = cli.clientversion;
742+
}
740743
await DBHelper.Save(user, Crypt.rootToken());
741744
}
742745
} catch (error) {

OpenFlow/src/WebSocketServer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ export class WebSocketServer {
108108
console.error(err);
109109
});
110110
}
111+
if (cli.clientagent == "powershell") {
112+
Config.db.db.collection("users").updateOne({ _id: cli.user._id },
113+
{ $set: { _powershellheartbeat: new Date(new Date().toISOString()), _heartbeat: new Date(new Date().toISOString()) } }).catch((err) => {
114+
console.error(err);
115+
});
116+
}
111117
if (cli.clientagent == "mobileapp" || cli.clientagent == "aiotmobileapp") {
112118
Config.db.db.collection("users").updateOne({ _id: cli.user._id },
113119
{ $set: { _webheartbeat: new Date(new Date().toISOString()), _mobilheartbeat: new Date(new Date().toISOString()), _heartbeat: new Date(new Date().toISOString()) } }).catch((err) => {

OpenFlow/src/WebSocketServerClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ export class WebSocketServerClient {
221221
qname = "web." + Math.random().toString(36).substr(2, 9); autoDelete = true;
222222
} else if (this.clientagent == "openrpa") {
223223
qname = "openrpa." + Math.random().toString(36).substr(2, 9); autoDelete = true;
224+
} else if (this.clientagent == "powershell") {
225+
qname = "powershell." + Math.random().toString(36).substr(2, 9); autoDelete = true;
224226
} else {
225227
qname = "unknown." + Math.random().toString(36).substr(2, 9); autoDelete = true;
226228
}

OpenFlowNodeRED/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openflow-nodered",
3-
"version": "1.0.96",
3+
"version": "1.0.97",
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": {

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.96
1+
1.0.97

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openiap",
3-
"version": "1.0.96",
3+
"version": "1.0.97",
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)