Skip to content

Commit e1fe47e

Browse files
committed
updates
1 parent 4a391b5 commit e1fe47e

9 files changed

Lines changed: 22 additions & 23 deletions

File tree

OpenFlow.code-workspace

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
{
44
"name": "OpenFlow",
55
"path": "."
6-
},
7-
{
8-
"path": "..\\openflow-api"
96
}
107
]
118
}

OpenFlow/src/public/Queue.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ <h1 translate lib="web">{{ctrl.model.name}}</h1>
1212
<th scope="col"><b translate lib="web">active</b></th>
1313
<th scope="col"><b translate lib="web">consumer_tag</b></th>
1414
<th scope="col"><b translate lib="web">clientname</b></th>
15+
<th scope="col"><b translate lib="web">remoteip</b></th>
1516
<th scope="col"><b translate lib="web"></b></th>
1617
</tr>
1718
</thead>
@@ -21,6 +22,7 @@ <h1 translate lib="web">{{ctrl.model.name}}</h1>
2122
<td>{{model.active}}</td>
2223
<td>{{model.consumer_tag}}</td>
2324
<td>{{model.clientname}}</td>
25+
<td>{{model.remoteip}}</td>
2426
<td class="btn-cell">
2527
<a href ng-click="ctrl.DeleteQueue(model)" ng-disabled="ctrl.loading==true"><i class="az-trash"></i></a>
2628
</td>

OpenFlowNodeRED/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openflow-nodered",
3-
"version": "1.1.15",
3+
"version": "1.1.17",
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": {
@@ -33,13 +33,12 @@
3333
"cookie-session": "^1.4.0",
3434
"envfile": "^6.12.0",
3535
"express": "^4.17.1",
36-
"file-system-cache": "^1.0.5",
3736
"google-auth-library": "^6.0.6",
3837
"jsonwebtoken": "^8.5.1",
3938
"morgan": "^1.10.0",
4039
"node-red": "^1.2.1",
4140
"node-red-node-email": "^1.7.8",
42-
"openflow-api": "^1.0.25",
41+
"openflow-api": "^1.0.40",
4342
"os-service": "^2.2.0",
4443
"passport-saml": "^1.3.4",
4544
"passport-saml-metadata": "^2.3.0",

OpenFlowNodeRED/src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import { Logger } from "./Logger";
77
import { WebServer } from "./WebServer";
88
import { Config } from "./Config";
99
import { Crypt } from "./nodeclient/Crypt";
10-
const fileCache = require('file-system-cache').default;
11-
const backupStore = fileCache({ basePath: path.join(Config.logpath, '.cache') });
10+
import { FileSystemCache } from "openflow-api";
11+
12+
const backupStore = new FileSystemCache(path.join(Config.logpath, '.cache'));
1213
const logger: winston.Logger = Logger.configure();
1314
logger.info("starting openflow nodered");
1415

@@ -30,7 +31,7 @@ let server: http.Server = null;
3031
(async function (): Promise<void> {
3132
try {
3233
const filename: string = Config.nodered_id + "_flows.json";
33-
const json = await backupStore.get(filename);
34+
const json = await backupStore.get(filename, null);
3435
if (!NoderedUtil.IsNullEmpty(json)) {
3536
server = await WebServer.configure(logger, socket);
3637
var baseurl = Config.saml_baseurl;

OpenFlowNodeRED/src/node-red-contrib-auth-saml.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import * as retry from "async-retry";
77
import { Logger } from "./Logger";
88
import { Config } from "./Config";
99
export const logger = Logger.configure();
10-
const fileCache = require('file-system-cache').default;
11-
const backupStore = fileCache({ basePath: path.join(Config.logpath, '.cache') });
10+
import { FileSystemCache } from "openflow-api";
11+
const backupStore = new FileSystemCache(path.join(Config.logpath, '.cache'));
1212
// tslint:disable-next-line: class-name
1313
export class samlauthstrategyoptions {
1414
public callbackUrl: string = "auth/strategy/callback/";

OpenFlowNodeRED/src/node-red-contrib-openflow-storage.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { nodered_settings } from "./nodered_settings";
66
import { Config } from "./Config";
77
import { WebSocketClient, NoderedUtil, Base } from "openflow-api";
88
import * as nodered from "node-red";
9-
const fileCache = require('file-system-cache').default;
10-
const backupStore = fileCache({ basePath: path.join(Config.logpath, '.cache') });
9+
import { FileSystemCache } from "openflow-api";
10+
const backupStore = new FileSystemCache(path.join(Config.logpath, '.cache'));
1111
export class noderednpmrc {
1212
public _id: string;
1313
public _type: string = "npmrc";
@@ -310,7 +310,7 @@ export class noderedcontribopenflowstorage {
310310
try {
311311
const filename: string = Config.nodered_id + "_npmrc.txt";
312312
if (this.npmrc == null) {
313-
const json = await backupStore.get(filename);
313+
const json = await backupStore.get<string>(filename, null);
314314
if (!NoderedUtil.IsNullEmpty(json)) {
315315
this.npmrc = JSON.parse(json);
316316
}
@@ -371,7 +371,7 @@ export class noderedcontribopenflowstorage {
371371
}
372372
const filename: string = Config.nodered_id + "_flows.json";
373373
if (result.length == 0) {
374-
const json = await backupStore.get(filename);
374+
const json = await backupStore.get<string>(filename, null);
375375
if (!NoderedUtil.IsNullEmpty(json)) {
376376
this._flows = JSON.parse(json);
377377
result = this._flows;
@@ -433,7 +433,7 @@ export class noderedcontribopenflowstorage {
433433
}
434434
const filename: string = Config.nodered_id + "_credentials";
435435
if (cred.length == 0) {
436-
let json = await backupStore.get(filename);
436+
let json = await backupStore.get<string>(filename, null);
437437
if (!NoderedUtil.IsNullEmpty(json)) {
438438
json = noderedcontribopenflowstorage.decrypt(json);
439439
this._credentials = JSON.parse(json);
@@ -517,7 +517,7 @@ export class noderedcontribopenflowstorage {
517517
}
518518
if (settings == null) {
519519
settings = {};
520-
const json = await backupStore.get(filename);
520+
const json = await backupStore.get<string>(filename, null);
521521
if (!NoderedUtil.IsNullEmpty(json)) {
522522
this._settings = JSON.parse(json);
523523
settings = this._settings;
@@ -761,7 +761,7 @@ export class noderedcontribopenflowstorage {
761761
}
762762
const filename: string = Config.nodered_id + "_sessions";
763763
if (item == null || item.length == 0) {
764-
const json = await backupStore.get(filename);
764+
const json = await backupStore.get<string>(filename, null);
765765
if (!NoderedUtil.IsNullEmpty(json)) {
766766
item = JSON.parse(json);
767767
}

OpenFlowNodeRED/src/nodered/nodes/api_nodes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Config } from "../../Config";
55
import { Logger } from "../../Logger";
66
import { NoderedUtil, SigninMessage, TokenUser, Message, WebSocketClient, Base, mapFunc, reduceFunc, finalizeFunc, UpdateOneMessage } from "openflow-api";
77
import * as path from "path";
8-
const fileCache = require('file-system-cache').default;
9-
const backupStore = fileCache({ basePath: path.join(Config.logpath, '.cache') });
8+
import { FileSystemCache } from "openflow-api";
9+
const backupStore = new FileSystemCache(path.join(Config.logpath, '.cache'));
1010

1111
export interface Iapi_credentials {
1212
}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.15
1+
1.1.17

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openiap",
3-
"version": "1.1.15",
3+
"version": "1.1.17",
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": {
@@ -62,7 +62,7 @@
6262
"multer": "^1.4.2",
6363
"multer-gridfs-storage": "^4.2.0",
6464
"oauth2-server": "^3.1.1",
65-
"openflow-api": "^1.0.25",
65+
"openflow-api": "^1.0.40",
6666
"os-service": "^2.2.0",
6767
"passport": "^0.4.1",
6868
"passport-google-oauth20": "^2.0.0",

0 commit comments

Comments
 (0)