diff --git a/Dockerfile b/Dockerfile index 157c5374..8090b4c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM node:lts-alpine as builder - -RUN npm install --omit=optional gulp typescript browserify tsify -g +# --omit=optional +RUN npm install gulp typescript browserify tsify -g RUN mkdir /app WORKDIR /app COPY package*.json /app/ -RUN npm install --omit=optional +RUN npm install COPY . /app/ RUN gulp sass @@ -13,13 +13,14 @@ RUN gulp RUN tsc --build OpenFlow/tsconfig.json FROM node:lts-alpine +ENV NODE_ENV=production RUN apk add --no-cache bash EXPOSE 3000 EXPOSE 5858 WORKDIR /data COPY --from=builder /app/package*.json . COPY --from=builder /app/dist/ . -# RUN npm install --omit=optional --omit=dev +# RUN npm install --omit=dev # RUN npm install mongodb RUN npm install --omit=dev --production diff --git a/OpenFlow/src/DBHelper.ts b/OpenFlow/src/DBHelper.ts index 70c16c4f..6d5e9abd 100644 --- a/OpenFlow/src/DBHelper.ts +++ b/OpenFlow/src/DBHelper.ts @@ -777,7 +777,7 @@ export class DBHelper { "$or": [ { robotqueue: { "$exists": true, $nin: [null, "", "(empty)"] }, workflowid: { "$exists": true, $nin: [null, "", "(empty)"] } }, { amqpqueue: { "$exists": true, $nin: [null, "", "(empty)"] } }] - }, collectionname: "mq", jwt: Crypt.rootToken() + }, top:1000, collectionname: "mq", jwt: Crypt.rootToken() }, span); } public async GetPushableQueues(parent: Span): Promise { diff --git a/OpenFlow/src/DatabaseConnection.ts b/OpenFlow/src/DatabaseConnection.ts index fa653749..63d1a86c 100644 --- a/OpenFlow/src/DatabaseConnection.ts +++ b/OpenFlow/src/DatabaseConnection.ts @@ -206,8 +206,8 @@ export class DatabaseConnection extends events.EventEmitter { public ensureQueueMonitoring() { if (Config.workitem_queue_monitoring_enabled) { if (this.queuemonitoringhandle == null) { - this.queuemonitoringhandle = setInterval(this.queuemonitoring.bind(this), Config.workitem_queue_monitoring_interval); - // this.queuemonitoringhandle = setTimeout(this.queuemonitoring.bind(this), Config.workitem_queue_monitoring_interval); + // this.queuemonitoringhandle = setInterval(this.queuemonitoring.bind(this), Config.workitem_queue_monitoring_interval); + this.queuemonitoringhandle = setTimeout(this.queuemonitoring.bind(this), Config.workitem_queue_monitoring_interval); // } else { // Logger.instanse.warn("DatabaseConnection", "ensureQueueMonitoring", "queue monitoring restarted, clearing handle " + this.queuemonitoringhandle); // try { @@ -222,8 +222,8 @@ export class DatabaseConnection extends events.EventEmitter { Logger.instanse.warn("queue monitoring stopeed, clearing enabled: " + Config.workitem_queue_monitoring_enabled + " handle: " + this.queuemonitoringhandle, null); try { - clearInterval(this.queuemonitoringhandle); - // clearTimeout(this.queuemonitoringhandle); + // clearInterval(this.queuemonitoringhandle); + clearTimeout(this.queuemonitoringhandle); } catch (error) { } this.queuemonitoringhandle = null; @@ -240,8 +240,10 @@ export class DatabaseConnection extends events.EventEmitter { const jwt = Crypt.rootToken(); const collectionname = "workitems"; var queues = await Logger.DBHelper.GetPushableQueues(null); - for (var _wiq = 0; _wiq < queues.length; _wiq++) { - const wiq = queues[_wiq]; + var test = queues.find(x => x._id == "63b6a9b41e86860136c2cc8b"); + // wiq._id == "63b6a9b41e86860136c2cc8b" + for (let i = 0; i < queues.length; i++) { + const wiq = queues[i]; const count = await Logger.DBHelper.GetPendingWorkitemsCount(wiq._id, null); if (count < 1) continue; const query = { "wiqid": wiq._id, state: "new", "_type": "workitem", "nextrun": { "$lte": new Date(new Date().toISOString()) } }; @@ -257,7 +259,7 @@ export class DatabaseConnection extends events.EventEmitter { if (!NoderedUtil.IsNullEmpty(wiq.amqpqueue)) { queueid = wiq.amqpqueue.toLowerCase(); } - if (NoderedUtil.IsNullEmpty(queueid)) return; + if (NoderedUtil.IsNullEmpty(queueid)) { continue;} for (var _cid = 0; _cid < WebSocketServer._clients.length; _cid++) { const client = WebSocketServer._clients[_cid]; if (NoderedUtil.IsNullUndefinded(client.user)) continue; @@ -296,8 +298,8 @@ export class DatabaseConnection extends events.EventEmitter { Logger.instanse.error(error, null); } finally { - // this.queuemonitoringhandle = null; - // this.ensureQueueMonitoring(); + this.queuemonitoringhandle = null; + this.ensureQueueMonitoring(); } } async GlobalWatchCallback(collectionname: string, next: any) { diff --git a/OpenFlow/src/Messages/Message.ts b/OpenFlow/src/Messages/Message.ts index faf1e48c..5028f7d4 100644 --- a/OpenFlow/src/Messages/Message.ts +++ b/OpenFlow/src/Messages/Message.ts @@ -4565,6 +4565,7 @@ export class Message { if (typeof wi.payload !== 'object') wi.payload = { "value": wi.payload }; wi.priority = msg.priority; wi.nextrun = msg.nextrun; + if (!NoderedUtil.IsNullEmpty(msg.wipriority)) wi.priority = msg.wipriority; if (NoderedUtil.IsNullEmpty(wi.priority)) wi.priority = 2; wi.failed_wiq = msg.failed_wiq; wi.failed_wiqid = msg.failed_wiqid; @@ -4760,6 +4761,8 @@ export class Message { wi.payload = item.payload ? item.payload : {}; if (typeof wi.payload !== 'object') wi.payload = { "value": wi.payload }; wi.priority = item.priority; + if (!NoderedUtil.IsNullEmpty(msg.wipriority)) wi.priority = msg.wipriority; + if (NoderedUtil.IsNullEmpty(wi.priority)) wi.priority = 2; wi.nextrun = item.nextrun; wi.state = "new" wi.retries = 0; @@ -4920,6 +4923,7 @@ export class Message { if (NoderedUtil.IsNullEmpty(msg.errortype)) wi.errortype = "application"; } if (!NoderedUtil.IsNullUndefinded(msg.errorsource)) wi.errorsource = msg.errorsource; + if (!NoderedUtil.IsNullEmpty(msg.wipriority)) wi.priority = msg.wipriority; if (NoderedUtil.IsNullEmpty(wi.priority)) wi.priority = 2; var oldstate = wi.state; @@ -4944,6 +4948,9 @@ export class Message { wi.username = null; wi.nextrun = new Date(new Date().toISOString()); wi.nextrun.setSeconds(wi.nextrun.getSeconds() + wiq.retrydelay); + if(!NoderedUtil.IsNullEmpty(msg.nextrun)) { + wi.nextrun = new Date(msg.nextrun); + } } else { wi.state = "failed"; } diff --git a/OpenFlow/src/dockerdriver.ts b/OpenFlow/src/dockerdriver.ts index afb5e5fc..e675d058 100644 --- a/OpenFlow/src/dockerdriver.ts +++ b/OpenFlow/src/dockerdriver.ts @@ -14,7 +14,8 @@ export class dockerdriver implements i_nodered_driver { await docker.listContainers(); return true; } catch (error) { - Logger.instanse.error(error, null); + Logger.instanse.info("Docker not detected: " + error.message, null); + // Logger.instanse.error(error, null); } return false; } diff --git a/OpenFlow/src/public/CommonControllers.ts b/OpenFlow/src/public/CommonControllers.ts index 6e07a63e..a0007486 100644 --- a/OpenFlow/src/public/CommonControllers.ts +++ b/OpenFlow/src/public/CommonControllers.ts @@ -285,7 +285,7 @@ export class textarea implements ng.IDirective { } } -export class ngtype implements ng.IDirective { +export class ngtype { // implements ng.IDirective restrict = 'A'; require = '?ngModel'; constructor(public $location: ng.ILocationService, public $timeout: ng.ITimeoutService) { @@ -295,24 +295,29 @@ export class ngtype implements ng.IDirective { var mytype = ""; scope.$watch((newValue) => { if (ngModelCtrl.$viewValue === null || ngModelCtrl.$viewValue === undefined) { return; } + if(mytype != "") return;; if (typeof ngModelCtrl.$modelValue === 'number') { mytype = "number"; element.attr("type", "number"); } else if (typeof ngModelCtrl.$modelValue === 'boolean') { mytype = "boolean"; element.attr("type", "checkbox"); + } else { + mytype = "text"; + element.attr("type", "text"); } + }); var toModelb = function (value) { - if (mytype == "text") { - return value; - } else if (mytype == "boolean") { - if (String(value).toLowerCase() == "true") { value = true; return true; } - { value = false; return false; } + if (mytype == "boolean") { + if (String(value).toLowerCase() == "true") { value = true; } + else { value = false; } } else if (mytype == "number") { - if (value === "" || value === null || value === undefined) return value; - return parseInt(value); + if(!NoderedUtil.IsNullEmpty(value)) { + if(value.toString().indexOf(".")>=0) { value = parseFloat(value); } + else { value = parseInt(value); } + } } return value; } @@ -329,14 +334,14 @@ export class ngtype implements ng.IDirective { element.attr("type", "text"); } } - if (mytype == "text") { - return value; - } else if (mytype == "boolean") { - if (String(value).toLowerCase() == "true") { value = true; return true; } - { value = false; return false; } + if (mytype == "boolean") { + if (String(value).toLowerCase() == "true") { value = true; } + else { value = false; } } else if (mytype == "number") { - if (value === "" || value === null || value === undefined) return value; - return parseInt(value); + if(NoderedUtil.IsNullEmpty(value)) { + if(value.toString().indexOf(".")>=0) { value = parseFloat(value); } + else { value = parseInt(value); } + } } return value; } @@ -368,7 +373,7 @@ async function getString(locale: any, lib: string, key: string): Promise { }); } const global_translate_notfound: string[] = []; -export class translate implements ng.IDirective { +export class translate { // implements ng.IDirective require = '?ngModel'; replace = true; diff --git a/OpenFlow/src/public/Controllers.ts b/OpenFlow/src/public/Controllers.ts index 83388b85..7b5ef726 100644 --- a/OpenFlow/src/public/Controllers.ts +++ b/OpenFlow/src/public/Controllers.ts @@ -3976,6 +3976,21 @@ export class EntityCtrl extends entityCtrl { } }); } + cached = {} + getstep(key, obj) { + if(this.gettype(obj) == "number") + { + if (obj.toString().indexOf(".") > -1) { + var decimals = obj.toString().split(".")[1].length; + this.cached[key] = 1 / Math.pow(10, decimals); + return this.cached[key]; + } else { + if (this.cached[key]) return this.cached[key]; + } + } + this.cached[key] = 1; + return 1; + } gettype(obj) { return typeof obj; } @@ -6723,7 +6738,7 @@ export class WorkitemsCtrl extends entitiesCtrl { this.basequery = { _type: "workitem" }; this.collection = "workitems"; this.searchfields = ["name", "state", "wiq"]; - this.baseprojection = { name: 1, state: 1, wiq: 1, retries: 1, lastrun: 1, nextrun: 1 }; + this.baseprojection = { name: 1, state: 1, wiq: 1, retries: 1, lastrun: 1, nextrun: 1, priority: 1 }; this.postloadData = this.processData; if (this.userdata.data.WorkitemsCtrl) { this.basequery = this.userdata.data.WorkitemsCtrl.basequery; @@ -6851,6 +6866,7 @@ export class WorkitemCtrl extends entityCtrl { this.model.retries = 0; this.model.state = "new"; this.model.payload = {}; + this.model.priority = 2; if (this.userdata.data && this.userdata.data.WorkitemsCtrl) this.model.wiq = this.userdata.data.WorkitemsCtrl.queue; if (!this.$scope.$$phase) { this.$scope.$apply(); } } @@ -6881,6 +6897,7 @@ export class WorkitemCtrl extends entityCtrl { q.name = model.name; q.wiq = model.wiq; q.payload = model.payload; + q.wipriority = model.priority; _msg.command = 'addworkitem'; _msg.data = JSON.stringify(q); const result: AddWorkitemMessage = await WebSocketClient.instance.Send(_msg, 1); @@ -6891,6 +6908,7 @@ export class WorkitemCtrl extends entityCtrl { q.name = model.name; q.state = model.state; q.payload = model.payload; + q.wipriority = model.priority; _msg.command = 'updateworkitem'; _msg.data = JSON.stringify(q); const result: UpdateWorkitemMessage = await WebSocketClient.instance.Send(_msg, 1); @@ -6930,7 +6948,7 @@ export class WorkitemQueuesCtrl extends entitiesCtrl { this.basequery = { _type: "workitemqueue" }; this.collection = "mq"; this.searchfields = ["name"]; - this.baseprojection = { name: 1, maxretries: 1, projectid: 1, workflowid: 1, robotqueue: 1, amqpqueue: 1 }; + this.baseprojection = { name: 1, maxretries: 1, projectid: 1, workflowid: 1, robotqueue: 1, amqpqueue: 1, _createdby:1 }; this.postloadData = this.processData; if (this.userdata.data.WorkitemQueuesCtrl) { @@ -7021,6 +7039,7 @@ export class WorkitemQueueCtrl extends entityCtrl { public users: Base[] = []; public amqpqueues: Base[] = []; public workitemqueues: Base[] = []; + public stats: string = "calculating..."; constructor( public $rootScope: ng.IRootScopeService, public $scope: ng.IScope, @@ -7086,6 +7105,23 @@ export class WorkitemQueueCtrl extends entityCtrl { if (NoderedUtil.IsNullEmpty(this.model.failed_wiqid)) this.model.failed_wiqid = ""; await this.loadselects(); if (!this.$scope.$$phase) { this.$scope.$apply(); } + var total = await NoderedUtil.Count({ collectionname: "workitems", query: { "wiqid": this.id } }); + // this.stats = total + " items"; + // if (!this.$scope.$$phase) { this.$scope.$apply(); } + if(total > 0) { + var newitems = await NoderedUtil.Count({ collectionname: "workitems", query: { "wiqid": this.id, "state": "new" } }); + var successfulitems = await NoderedUtil.Count({ collectionname: "workitems", query: { "wiqid": this.id, "state": "successful" } }); + var faileditems = await NoderedUtil.Count({ collectionname: "workitems", query: { "wiqid": this.id, "state": "failed" } }); + var processingitems = await NoderedUtil.Count({ collectionname: "workitems", query: { "wiqid": this.id, "state": "processing" } }); + this.stats = ""; + if(newitems > 0) this.stats += "New: " + newitems; + if(successfulitems > 0) this.stats += " Successful: " + successfulitems; + if(faileditems > 0) this.stats += " Failed: " + faileditems; + if(processingitems > 0) this.stats += " Processing: " + processingitems; + } else { + this.stats = "No items"; + } + if (!this.$scope.$$phase) { this.$scope.$apply(); } } async submit(): Promise { diff --git a/OpenFlow/src/public/Entity.html b/OpenFlow/src/public/Entity.html index a1fcb3ea..6325a5f8 100644 --- a/OpenFlow/src/public/Entity.html +++ b/OpenFlow/src/public/Entity.html @@ -124,9 +124,16 @@

detailsfor {{ctrl.model.n
- + + +
diff --git a/OpenFlow/src/public/Workitem.html b/OpenFlow/src/public/Workitem.html index 46feaf88..76e9f015 100644 --- a/OpenFlow/src/public/Workitem.html +++ b/OpenFlow/src/public/Workitem.html @@ -82,6 +82,12 @@

{{ctrl.model.name}}

+
+ +
+ +
+
diff --git a/OpenFlow/src/public/WorkitemQueue.html b/OpenFlow/src/public/WorkitemQueue.html index e38aaffe..988fb98a 100644 --- a/OpenFlow/src/public/WorkitemQueue.html +++ b/OpenFlow/src/public/WorkitemQueue.html @@ -12,6 +12,13 @@

{{ctrl.model.name}}

+
+ +
+
{{ctrl.stats}}
+
+
+
diff --git a/OpenFlow/src/public/WorkitemQueues.html b/OpenFlow/src/public/WorkitemQueues.html index c0ec6d00..fb3c261a 100644 --- a/OpenFlow/src/public/WorkitemQueues.html +++ b/OpenFlow/src/public/WorkitemQueues.html @@ -21,6 +21,7 @@

{{ctrl.queue}} workitemqueues

name maxretries projectid + createdby @@ -35,6 +36,7 @@

{{ctrl.queue}} workitemqueues

{{model.projectid}} + {{model._createdby}}
diff --git a/OpenFlow/src/public/Workitems.html b/OpenFlow/src/public/Workitems.html index 432f664f..183c4355 100644 --- a/OpenFlow/src/public/Workitems.html +++ b/OpenFlow/src/public/Workitems.html @@ -54,6 +54,7 @@

{{ctrl.queue}} workitems

name state retries + priority queue lastrun nextrun @@ -67,6 +68,7 @@

{{ctrl.queue}} workitems

{{model.name}}
{{model.state}} {{model.retries}} + {{model.priority}} {{model.wiq}} diff --git a/OpenFlowNodeRED/Dockerfile b/OpenFlowNodeRED/Dockerfile index c96f65e9..6b7c8039 100644 --- a/OpenFlowNodeRED/Dockerfile +++ b/OpenFlowNodeRED/Dockerfile @@ -1,14 +1,14 @@ FROM node:lts-alpine as builder - -RUN npm install --omit=optional gulp typescript browserify tsify -g +# --omit=optional +RUN npm install gulp typescript browserify tsify -g RUN mkdir /app RUN mkdir /app/OpenFlowNodeRED WORKDIR /app COPY package*.json /app/ -RUN npm install --omit=optional +RUN npm install COPY OpenFlowNodeRED/package*.json /app/OpenFlowNodeRED WORKDIR /app/OpenFlowNodeRED -RUN npm install --omit=optional +RUN npm install COPY . /app/ RUN tsc --build tsconfig.json WORKDIR /app @@ -16,6 +16,7 @@ RUN gulp copyfiles1 FROM node:lts-alpine +ENV NODE_ENV=production RUN apk add --no-cache bash git WORKDIR /data diff --git a/OpenFlowNodeRED/package.json b/OpenFlowNodeRED/package.json index 87e27ac6..137fc1a4 100644 --- a/OpenFlowNodeRED/package.json +++ b/OpenFlowNodeRED/package.json @@ -26,7 +26,7 @@ "dependencies": { "@node-saml/passport-saml": "^4.0.1", "@nodemailer/mailparser2": "^1.0.3", - "@openiap/openflow-api": "^2.1.7", + "@openiap/openflow-api": "^2.1.9", "@opentelemetry/api-metrics": "^0.33.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/exporter-metrics-otlp-grpc": "^0.34.0", @@ -57,4 +57,4 @@ "@types/compression": "^1.7.2", "@types/node": "^18.11.9" } -} \ No newline at end of file +} diff --git a/OpenFlowNodeRED/src/nodered/nodes/amqp.html b/OpenFlowNodeRED/src/nodered/nodes/amqp.html index 8367bbb3..b0246058 100644 --- a/OpenFlowNodeRED/src/nodered/nodes/amqp.html +++ b/OpenFlowNodeRED/src/nodered/nodes/amqp.html @@ -163,19 +163,16 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.queuetype === 'val') $("#node-input-queuetype").val('str'); $("#node-input-queue").typedInput({ default: 'str', typeField: $("#node-input-queuetype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.exchangetype === 'val') $("#node-input-exchangetype").val('str'); $("#node-input-exchange").typedInput({ default: 'str', typeField: $("#node-input-exchangetype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.routingkeytype === 'val') $("#node-input-routingkeytype").val('str'); $("#node-input-routingkey").typedInput({ default: 'str', typeField: $("#node-input-routingkeytype"), diff --git a/OpenFlowNodeRED/src/nodered/nodes/api.html b/OpenFlowNodeRED/src/nodered/nodes/api.html index c0771ade..97e75a04 100644 --- a/OpenFlowNodeRED/src/nodered/nodes/api.html +++ b/OpenFlowNodeRED/src/nodered/nodes/api.html @@ -171,43 +171,36 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.querytype === null) $("#node-input-querytype").val('str'); $("#node-input-query").typedInput({ default: 'str', typeField: $("#node-input-querytype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.projectiontype === null) $("#node-input-projectiontype").val('str'); $("#node-input-projection").typedInput({ default: 'str', typeField: $("#node-input-projectiontype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.orderbytype === null) $("#node-input-orderbytype").val('str'); $("#node-input-orderby").typedInput({ default: 'str', typeField: $("#node-input-orderbytype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.collectiontype === null) $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.toptype === null) $("#node-input-toptype").val('num'); $("#node-input-top").typedInput({ default: 'num', typeField: $("#node-input-toptype"), types: ['msg', 'num', 'flow', 'global'] }); - if (this.skiptype === null) $("#node-input-skiptype").val('num'); $("#node-input-skip").typedInput({ default: 'num', typeField: $("#node-input-skiptype"), types: ['msg', 'num', 'flow', 'global'] }); - if (this.resultfieldtype === null) $("#node-input-resultfieldtype").val('msg'); $("#node-input-resultfield").typedInput({ default: 'msg', typeField: $("#node-input-resultfieldtype"), @@ -294,19 +287,16 @@ }, oneditprepare: function () { - if (this.collectiontype === 'val') $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.entitytypetype === 'val') $("#node-input-entitytypetype").val('str'); $("#node-input-entitytype").typedInput({ default: 'str', typeField: $("#node-input-entitytypetype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.entitiestype === 'val') $("#node-input-entitiestype").val('str'); $("#node-input-entities").typedInput({ default: 'msg', typeField: $("#node-input-entitiestype"), @@ -398,19 +388,16 @@ }, oneditprepare: function () { - if (this.entitytypetype === 'val') $("#node-input-entitytypetype").val('str'); $("#node-input-entitytype").typedInput({ default: 'str', typeField: $("#node-input-entitytypetype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.collectiontype === 'val') $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.entitiestype === 'val') $("#node-input-entitiestype").val('str'); $("#node-input-entities").typedInput({ default: 'msg', typeField: $("#node-input-entitiestype"), @@ -493,19 +480,16 @@ }, oneditprepare: function () { - if (this.entitytypetype === 'val') $("#node-input-entitytypetype").val('str'); $("#node-input-entitytype").typedInput({ default: 'str', typeField: $("#node-input-entitytypetype"), types: ['msg', 'str', 'flow', 'global'] }); - if (this.collectiontype === 'val') $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global'] }); - if (this.entitiestype === 'val') $("#node-input-entitiestype").val('str'); $("#node-input-entities").typedInput({ default: 'msg', typeField: $("#node-input-entitiestype"), @@ -602,25 +586,21 @@ }, oneditprepare: function () { - if (this.entitytypetype === 'val') $("#node-input-entitytypetype").val('str'); $("#node-input-entitytype").typedInput({ default: 'str', typeField: $("#node-input-entitytypetype"), types: ['msg', 'str', 'flow', 'global'] }); - if (this.collectiontype === 'val') $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global'] }); - if (this.entitiestype === 'val') $("#node-input-entitiestype").val('str'); $("#node-input-entities").typedInput({ default: 'msg', typeField: $("#node-input-entitiestype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.uniqenesstype === 'val') $("#node-input-uniqenesstype").val('str'); $("#node-input-uniqeness").typedInput({ default: 'str', typeField: $("#node-input-uniqenesstype"), @@ -681,22 +661,17 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.collectiontype === 'val') $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global'] }); - - if (this.entitiestype === 'val') $("#node-input-entitiestype").val('str'); $("#node-input-entities").typedInput({ default: 'msg', typeField: $("#node-input-entitiestype"), types: ['msg'] }); - }, - }); @@ -749,21 +724,17 @@ // https://nodered.org/docs/api/ui/typedInput/ oneditprepare: function () { - if (this.querytype === 'val') $("#node-input-querytype").val('str'); $("#node-input-query").typedInput({ default: 'msg', typeField: $("#node-input-querytype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.collectiontype === 'val') $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global'] }); - } - }); @@ -1396,27 +1367,22 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.collectiontype === 'val') $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global'] }); - if (this.querytype === 'val') $("#node-input-querytype").val('str'); $("#node-input-query").typedInput({ default: 'str', typeField: $("#node-input-querytype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.updatedocumenttype === 'val') $("#node-input-updatedocumenttype").val('str'); $("#node-input-updatedocument").typedInput({ default: 'str', typeField: $("#node-input-updatedocumenttype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - }, - }); @@ -1476,21 +1442,17 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.aggregatestype === 'val') $("#node-input-aggregatestype").val('str'); $("#node-input-aggregates").typedInput({ default: 'json', typeField: $("#node-input-aggregatestype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.collectiontype === 'val') $("#node-input-collectiontype").val('str'); $("#node-input-collection").typedInput({ default: 'str', typeField: $("#node-input-collectiontype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - }, - }); @@ -1553,25 +1515,21 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.fileidtype === 'val') $("#node-input-fileidtype").val('str'); $("#node-input-fileid").typedInput({ default: 'str', typeField: $("#node-input-fileidtype"), types: ['msg', 'str', 'flow', 'global'] }); - if (this.filenametype === 'val') $("#node-input-filenametype").val('str'); $("#node-input-filename").typedInput({ default: 'str', typeField: $("#node-input-filenametype"), types: ['msg', 'str', 'flow', 'global'] }); - if (this.resulttype === 'val') $("#node-input-resulttype").val('str'); $("#node-input-result").typedInput({ default: 'str', typeField: $("#node-input-resulttype"), types: ['msg', 'flow', 'global'] }); - }, }); @@ -1637,25 +1595,21 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.filenametype === 'val') $("#node-input-filenametype").val('str'); $("#node-input-filename").typedInput({ default: 'msg', typeField: $("#node-input-filenametype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.contenttype === 'val') $("#node-input-contenttype").val('str'); $("#node-input-content").typedInput({ default: 'msg', typeField: $("#node-input-contenttype"), types: ['msg'] }); - if (this.mimeTypetype === 'val') $("#node-input-mimeTypetype").val('str'); $("#node-input-mimeType").typedInput({ default: 'str', typeField: $("#node-input-mimeTypetype"), types: ['msg', 'str', 'flow', 'global', 'json'] }); - if (this.entitytype === 'val') $("#node-input-entitytype").val('str'); $("#node-input-entity").typedInput({ default: 'msg', typeField: $("#node-input-entitytype"), @@ -1820,7 +1774,6 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.resultstype === 'val') $("#node-input-resultstype").val('str'); $("#node-input-results").typedInput({ default: 'msg', typeField: $("#node-input-resultstype"), @@ -1867,8 +1820,6 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.collectionametype === null) $("#node-input-collectionametype").val('msg'); - if (this.collectionametype === 'val') $("#node-input-collectionametype").val('str'); $("#node-input-collectioname").typedInput({ default: 'msg', typeField: $("#node-input-collectionametype"), @@ -2032,29 +1983,21 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.commandtype === null) $("#node-input-commandtype").val('msg'); - if (this.commandtype === 'val') $("#node-input-commandtype").val('str'); $("#node-input-command").typedInput({ default: 'msg', typeField: $("#node-input-commandtype"), types: ['msg', 'str'] }); - if (this.payloadtype === null) $("#node-input-payloadtype").val('msg'); - if (this.payloadtype === 'val') $("#node-input-payloadtype").val('str'); $("#node-input-payload").typedInput({ default: 'msg', typeField: $("#node-input-payloadtype"), types: ['msg', 'str'] }); - if (this.commandidtype === null) $("#node-input-commandidtype").val('msg'); - if (this.commandidtype === 'val') $("#node-input-commandidtype").val('str'); $("#node-input-commandid").typedInput({ default: 'msg', typeField: $("#node-input-commandidtype"), types: ['msg', 'str'] }); - if (this.commandtype === null) $("#node-input-commandtype").val('msg'); - if (this.commandtype === 'val') $("#node-input-commandtype").val('str'); $("#node-input-command").typedInput({ default: 'msg', typeField: $("#node-input-commandtype"), diff --git a/OpenFlowNodeRED/src/nodered/nodes/workflow.html b/OpenFlowNodeRED/src/nodered/nodes/workflow.html index d5080e40..5efd2d0d 100644 --- a/OpenFlowNodeRED/src/nodered/nodes/workflow.html +++ b/OpenFlowNodeRED/src/nodered/nodes/workflow.html @@ -1,3 +1,17 @@ + @@ -419,9 +452,9 @@ name: { value: "" }, download: { value: "false", required: true }, config: { value: "", type: "iworkitemqueue-config", required: true }, - workitem: { value: "payload", validate: validate("workitemtype") }, + workitem: { value: "payload", validate: validate("workitem") }, workitemtype: { value: "" }, - files: { value: "files", validate: validate("filestype") }, + files: { value: "files", validate: validate("files") }, filestype: { value: "msg" }, }, inputs: 1, @@ -435,13 +468,11 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.workitemtype === null) $("#node-input-workitemtype").val('msg'); $("#node-input-workitem").typedInput({ default: 'msg', typeField: $("#node-input-workitemtype"), types: ['msg'] }); - if (this.filestype === null) $("#node-input-filestype").val('msg'); $("#node-input-files").typedInput({ default: 'msg', typeField: $("#node-input-filestype"), @@ -473,7 +504,7 @@ color: "#a6bbcf", defaults: { name: { value: "" }, - workitem: { value: "payload", validate: validate("workitemtype") }, + workitem: { value: "payload", validate: validate("workitem") }, workitemtype: { value: "" }, }, inputs: 1, @@ -486,7 +517,6 @@ return this.name ? "node_label_italic" : ""; }, oneditprepare: function () { - if (this.workitemtype === null) $("#node-input-workitemtype").val('msg'); $("#node-input-workitem").typedInput({ default: 'msg', typeField: $("#node-input-workitemtype"), diff --git a/OpenFlowNodeRED/src/nodered/nodes/workitem_nodes.ts b/OpenFlowNodeRED/src/nodered/nodes/workitem_nodes.ts index 9cee036f..9f586918 100644 --- a/OpenFlowNodeRED/src/nodered/nodes/workitem_nodes.ts +++ b/OpenFlowNodeRED/src/nodered/nodes/workitem_nodes.ts @@ -58,7 +58,7 @@ export class addworkitem { const files = await Util.EvaluateNodeProperty(this, msg, "files"); const topic = await Util.EvaluateNodeProperty(this, msg, "topic"); const nextrun = await Util.EvaluateNodeProperty(this, msg, "nextrun"); - const priority = await Util.EvaluateNodeProperty(this, msg, "priority"); + const wipriority = await Util.EvaluateNodeProperty(this, msg, "priority"); const success_wiq = await Util.EvaluateNodeProperty(this, msg, "success_wiq"); const failed_wiq = await Util.EvaluateNodeProperty(this, msg, "failed_wiq"); const { wiq, wiqid } = this.workitemqueue_config; @@ -81,7 +81,7 @@ export class addworkitem { } } } - const result = await NoderedUtil.AddWorkitem({ payload, files, wiqid, wiq, name: topic, nextrun, priority, success_wiq, failed_wiq }) + const result = await NoderedUtil.AddWorkitem({ payload, files, wiqid, wiq, name: topic, nextrun, wipriority, success_wiq, failed_wiq }) if (!NoderedUtil.IsNullEmpty(this.config.payload)) { Util.SetMessageProperty(msg, this.config.payload, result); } @@ -128,14 +128,14 @@ export class addworkitems { this.node.status({ fill: "blue", shape: "dot", text: "Processing" }); const items = await Util.EvaluateNodeProperty(this, msg, "workitems"); const nextrun = await Util.EvaluateNodeProperty(this, msg, "nextrun"); - const priority = await Util.EvaluateNodeProperty(this, msg, "priority"); + const wipriority = await Util.EvaluateNodeProperty(this, msg, "priority"); const success_wiq = await Util.EvaluateNodeProperty(this, msg, "success_wiq"); const failed_wiq = await Util.EvaluateNodeProperty(this, msg, "failed_wiq"); const { wiq, wiqid } = this.workitemqueue_config; if (!Array.isArray(items)) throw new Error("workitems must be an array of Workitems") items.forEach(item => { if (!NoderedUtil.IsNullEmpty(nextrun)) item.nextrun = nextrun; - if (!NoderedUtil.IsNullEmpty(priority)) item.priority = priority; + if (!NoderedUtil.IsNullEmpty(wipriority)) item.priority = wipriority; if (!NoderedUtil.IsNullUndefinded(item.files)) { for (var i = 0; i < item.files.length; i++) { @@ -197,10 +197,15 @@ export class updateworkitem { const workitem = await Util.EvaluateNodeProperty(this, msg, "workitem"); const files = await Util.EvaluateNodeProperty(this, msg, "files"); const state: any = await Util.EvaluateNodeProperty(this, msg, "state"); + const wipriority = await Util.EvaluateNodeProperty(this, msg, "priority"); const _errormessage = await Util.EvaluateNodeProperty(this, msg, "error"); const ignoremaxretries = await Util.EvaluateNodeProperty(this, msg, "ignoremaxretries"); const success_wiq = await Util.EvaluateNodeProperty(this, msg, "success_wiq"); const failed_wiq = await Util.EvaluateNodeProperty(this, msg, "failed_wiq"); + const _nextrun = await Util.EvaluateNodeProperty(this, msg, "nextrun"); + var nextrun = undefined; + if(!NoderedUtil.IsNullEmpty(_nextrun)) nextrun = new Date(_nextrun); + var errorsource: string = ""; if (!NoderedUtil.IsNullEmpty(msg.error) && (NoderedUtil.IsNullUndefinded(workitem) || NoderedUtil.IsNullEmpty(workitem._id))) { @@ -210,7 +215,7 @@ export class updateworkitem { let { _id, name, payload, errortype, errormessage } = workitem; if (!NoderedUtil.IsNullEmpty(_errormessage) && NoderedUtil.IsNullEmpty(errormessage)) errormessage = _errormessage.toString(); - const result = await NoderedUtil.UpdateWorkitem({ _id, name, files, state, payload, ignoremaxretries, errormessage, errorsource, errortype, success_wiq, failed_wiq }) + const result = await NoderedUtil.UpdateWorkitem({ _id, name, files, state, payload, ignoremaxretries, wipriority, errormessage, errorsource, errortype, success_wiq, failed_wiq, nextrun }) if (!NoderedUtil.IsNullEmpty(this.config.workitem)) { Util.SetMessageProperty(msg, this.config.workitem, result); } diff --git a/docker-compose.yml b/docker-compose.yml index 9edf2cee..3a5d562b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,79 +1,83 @@ version: "3.3" services: - registry: - image: registry:2 - restart: always - ports: - - "5000:5000" + # registry: + # image: registry:2 + # # network_mode: "host" + # ports: + # - "5000:5000" mongodb: image: "mongo" - restart: always volumes: - mongodb_data:/data/db - traefik: - image: "traefik" - container_name: "traefik" - command: - - "--providers.docker=true" - - "--providers.docker.exposedbydefault=false" - - "--entrypoints.web.address=:80" + # network_mode: "host" ports: - - "80:80" - restart: always - volumes: - - "//var/run/docker.sock:/var/run/docker.sock:ro" + - "27017:27017" + # traefik: + # image: "traefik" + # container_name: "traefik" + # command: + # - "--providers.docker=true" + # - "--providers.docker.exposedbydefault=false" + # - "--entrypoints.web.address=:80" + # # network_mode: "host" + # ports: + # - "80:80" + # volumes: + # - "//var/run/docker.sock:/var/run/docker.sock:ro" rabbitmq: image: "rabbitmq:3-management" container_name: "rabbitmq" - restart: always - api: - labels: - - "traefik.enable=true" - - "traefik.http.routers.api.rule=Host(`localhost.openiap.io`)" - - "traefik.http.routers.api.entrypoints=web" - - "traefik.http.services.api.loadbalancer.server.port=3000" - - "traefik.frontend.passHostHeader=true" - image: localhost:5000/openiap/openflow:staging - build: - context: . - dockerfile: Dockerfile - # entrypoint: sleep infinity - deploy: - replicas: 1 - pull_policy: always - restart: always - volumes: - - "//var/run/docker.sock:/var/run/docker.sock" - depends_on: - - rabbitmq - - mongodb - environment: - - auto_create_users=true - - allow_personal_nodered=true - - log_with_colors=false - - enable_web_tours=false - - enable_nodered_tours=false - - enable_openflow_amqp=true + # network_mode: "host" + ports: + - "5672:5672" + - "15672:15672" + # api: + # labels: + # - "traefik.enable=true" + # - "traefik.http.routers.api.rule=Host(`localhost.openiap.io`)" + # - "traefik.http.routers.api.entrypoints=web" + # - "traefik.http.services.api.loadbalancer.server.port=3000" + # - "traefik.frontend.passHostHeader=true" + # image: localhost:5000/openiap/openflow:staging + # build: + # context: . + # dockerfile: Dockerfile + # # entrypoint: sleep infinity + # deploy: + # replicas: 1 + # pull_policy: always + # volumes: + # - "/var/run/docker.sock:/var/run/docker.sock" + # depends_on: + # - rabbitmq + # - mongodb + # environment: + # - auto_create_users=true + # - allow_personal_nodered=true + # - log_with_colors=false + # - enable_web_tours=false + # - enable_nodered_tours=false + # - enable_openflow_amqp=true - - nodered_images=[{"name":"Latest Plain Nodered", - "image":"localhost:5000/openiap/nodered:staging"}] - - nodered_ws_url=ws://api:3000 + # - nodered_images=[{"name":"Latest Plain Nodered", + # "image":"localhost:5000/openiap/nodered:staging"}] + # - nodered_ws_url=ws://api:3000 - - domain=localhost.openiap.io - - saml_federation_metadata=http://api:3000/issue/FederationMetadata/2007-06/FederationMetadata.xml - - nodered_saml_entrypoint=http://localhost.openiap.io/issue - - saml_issuer=uri:localhost.openiap.io + # - domain=localhost.openiap.io + # - saml_federation_metadata=http://api:3000/issue/FederationMetadata/2007-06/FederationMetadata.xml + # - nodered_saml_entrypoint=http://localhost.openiap.io/issue + # - saml_issuer=uri:localhost.openiap.io - - aes_secret=7TXsxf7cn9EkUqm5h4MEWGjzkxkNCk2K - - signing_crt=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURZRENDQWtpZ0F3SUJBZ0lKQUsrSll6OGQ1bURxTUEwR0NTcUdTSWIzRFFFQkN3VUFNRVV4Q3pBSkJnTlYKQkFZVEFrRlZNUk13RVFZRFZRUUlEQXBUYjIxbExWTjBZWFJsTVNFd0h3WURWUVFLREJoSmJuUmxjbTVsZENCWAphV1JuYVhSeklGQjBlU0JNZEdRd0hoY05NVGt3TnpFd01UZ3dPVEl4V2hjTk1Ua3dPREE1TVRnd09USXhXakJGCk1Rc3dDUVlEVlFRR0V3SkJWVEVUTUJFR0ExVUVDQXdLVTI5dFpTMVRkR0YwWlRFaE1COEdBMVVFQ2d3WVNXNTAKWlhKdVpYUWdWMmxrWjJsMGN5QlFkSGtnVEhSa01JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQgpDZ0tDQVFFQTZrcEo4eHFUUU9pRzVmTUt4T1U5VzZDbVVSSWJnb2ZoSHZwVVZWVDBoMnRsakFsc2Z2cWRzSk5MClZBd3dySW55V2ZNYlVHZGE3M21MTG9XdEM0L3RYUlNEQktnK2J6MXhRSHNzcjVaMmVueDhYdGtRSDVHZ1crOVQKajdhbVNZL0l0SUFiME5qL1NRaVozK0JPN0tpeTJpMWFVdlJBeVp5UVpVcyt1aWlIRkNJekhBbXltV0ovNXdrdwptb2ZUYjUxWWlqZ2xiaGdZVllUcXdVdmpscEIvbWFnWjV3VENuOWpmbG16bGY1aSs5aTAxSHU1U1RXNW9JSnovCm9oQ25Mam4wM2c4NXA5dllFaTJLUkM2dW84Nnp5Y1pxL1lKQzVNTlVPTzZRanlZYXQ4RjBYWVVQ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rCno5ZFdIUW1xS1dpNzFob3krbHBqM0FwRnhBQ3lPY2dmZE03VFQyb25rcXB1c0NUNlliZThXT3BrWWxIMGlpUmQKWkVISC9zakhySzNEaktJWEIvSEVyVEdrOVJNaTdiNUd4NGYweVVkM2hqd0E2Y2dGRDlyd0l6VyszMjM0Z2xlNwphdzlIRFpxVjRRS0JnQVBiOXVjMkRSd3dlK1NtaFNLeEJ5Z0VVaWJQM1gwelJXQVZLQWJjU0NEb0w2UjVlK0lYCmdxTThLUGFmM3RkNnpZNmxBTHlSWnhiYnRlQnBsRHdpWGJ1VnB1V0lmZS9UdE1uVWs2dkt0cEh4VVh6TEdtdWoKWGU0N3lGVklSN25PdXE3NzNNdmFFMUxROHFxTEZtYjNHcm5tY0pJbHZPcWNnQmpmdHZJd0pzZ2xBb0dBU1RtWQoyZlJEbEptOFhrUnlzamtySzdmZDk2cGc4blBpMmpmRXN3b3M3UUtzV3oxN1JQak5YczB2RUc4YnF6Z3p5V3JvCnRMN3JZOTZ3TndkWWJqNGxMTE9KMTBtbEk3Nk1NUytqWVp4SGhaNGNaWlJUd0dONmpmSWhST0F6a2gwWU9Da1EKUjB5bmpVYU11ZGFKVXdtdk9pM3hieHBhUWpzeEZQOGdiQTg0aE9FQ2dZRUExbXZjSStZeDZITW00WkVjMU9yaworNXJoUHJrdGNMT0JHR3pZZGZIZGRZMytVdFZydUpCRmt5R2pCU2t2YmVtcUZxRlluMHFZckpXZVlUS2hMbUlwClkyRk1Gd29abWxpSkpONTA1eStTemdPbUVxN2wzT1Z4R0NwTTd1ODNyWFBXRGRERnc5WVNYVU1ueFRDUGsyRW0KekEyUzVkWjlWRld2NlR6VHg3cTIyc2c9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K - dummynodered: - image: localhost:5000/openiap/nodered:staging - build: - context: . - dockerfile: ./OpenFlowNodeRED/Dockerfile - # fake it, and keep it alive so we can push to local registry - entrypoint: sleep infinity + # - aes_secret=7TXsxf7cn9EkUqm5h4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qd0E2Y2dGRDlyd0l6VyszMjM0Z2xlNwphdzlIRFpxVjRRS0JnQVBiOXVjMkRSd3dlK1NtaFNLeEJ5Z0VVaWJQM1gwelJXQVZLQWJjU0NEb0w2UjVlK0lYCmdxTThLUGFmM3RkNnpZNmxBTHlSWnhiYnRlQnBsRHdpWGJ1VnB1V0lmZS9UdE1uVWs2dkt0cEh4VVh6TEdtdWoKWGU0N3lGVklSN25PdXE3NzNNdmFFMUxROHFxTEZtYjNHcm5tY0pJbHZPcWNnQmpmdHZJd0pzZ2xBb0dBU1RtWQoyZlJEbEptOFhrUnlzamtySzdmZDk2cGc4blBpMmpmRXN3b3M3UUtzV3oxN1JQak5YczB2RUc4YnF6Z3p5V3JvCnRMN3JZOTZ3TndkWWJqNGxMTE9KMTBtbEk3Nk1NUytqWVp4SGhaNGNaWlJUd0dONmpmSWhST0F6a2gwWU9Da1EKUjB5bmpVYU11ZGFKVXdtdk9pM3hieHBhUWpzeEZQOGdiQTg0aE9FQ2dZRUExbXZjSStZeDZITW00WkVjMU9yaworNXJoUHJrdGNMT0JHR3pZZGZIZGRZMytVdFZydUpCRmt5R2pCU2t2YmVtcUZxRlluMHFZckpXZVlUS2hMbUlwClkyRk1Gd29abWxpSkpONTA1eStTemdPbUVxN2wzT1Z4R0NwTTd1ODNyWFBXRGRERnc5WVNYVU1ueFRDUGsyRW0KekEyUzVkWjlWRld2NlR6VHg3cTIyc2c9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K + # dummynodered: + # image: localhost:5000/openiap/nodered:staging + # build: + # context: . + # dockerfile: ./OpenFlowNodeRED/Dockerfile + # # fake it, and keep it alive so we can push to local registry + # entrypoint: sleep infinity volumes: mongodb_data: driver: local diff --git a/gulpfile.js b/gulpfile.js index 4eb377de..983e687c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -230,6 +230,8 @@ gulp.task("browserify", function () { // ])); gulp.task("compose", shell.task([ // docker buildx create --name openiap --use + // linux workaround ? + // docker run -it --rm --privileged tonistiigi/binfmt --install all // docker buildx use default // docker buildx build --platform linux/amd64 -t openiap/openflow:edge . `docker buildx build -t openiap/openflow:edge -t openiap/openflow:` + version + ` --platform linux/amd64 --push .`, diff --git a/package.json b/package.json index b89a9339..073f3344 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@fortawesome/fontawesome-free": "^5.15.3", "@kubernetes/client-node": "0.17.1", "@node-saml/passport-saml": "^4.0.1", - "@openiap/openflow-api": "^2.1.7", + "@openiap/openflow-api": "^2.1.9", "@opentelemetry/api-metrics": "^0.33.0", "@opentelemetry/exporter-metrics-otlp-grpc": "^0.34.0", "@opentelemetry/sdk-metrics-base": "^0.31.0", @@ -122,4 +122,4 @@ "watchify": "^4.0.0", "wtfnode": "^0.9.1" } -} \ No newline at end of file +}