Skip to content

Commit

Permalink
3.11.0 (Vienna Jaguarundi) - March 2020 (#125)
Browse files Browse the repository at this point in the history
* feat: datalake only

* chore: prepare for release

* 3.11.0

* chore: fixed the year
  • Loading branch information
sn0wcat authored Mar 20, 2021
1 parent 357fb18 commit 018f16a
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 92 deletions.
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# Changelog

## 3.11.0 (Vienna Jaguarundi) - March 2020
## 3.11.0 (Vienna Jaguarundi) - March 2021

## New Features 3.11.0

- **Important** Bugfix for Unitless Mapping (see below)
- Implemented Support for EU2 Data Lake
- New setting: **Data Lake Only** - the node will not try to retrieve configuration if it only used for data lake
- New setting: **Emit control message** - the node will emit a message which can be used to control the data ingest
- New setting: **Hide request statatus information** - reduces the node verbosity
- New example flows on [https://playgound.mindconnect.rocks](https://playgound.mindconnect.rocks) - queing the messages, handling ingest pressure
- Node now emits control messages which can be used to control the behavior of your data ingestion flow
- New switch to reduce the node verbosity
- Documented how to manage the node configuration from the flow on playground.
- Bumped all dependencies
- Restructured files for better readability
- Upgraded json schema definitions for ajv v7 reqirements

## Bugfix 3.11.0

- **Important** - There is now a new type of mapping in MindSphere (unitless mapping) which versions before 3.11.0 are not aware of and which was causing the node to create mappings with the *"null"* unit. (that is "null" as a string). This is fixed in version 3.11.0. It is **strongly recommended** to upgrade to 3.11.0 if you are using automatic mapping feature.

## 3.10.0 (Vienna European Shorthair) - November 2020

## New Features 3.10.0
Expand Down
257 changes: 179 additions & 78 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mindconnect/node-red-contrib-mindconnect",
"version": "3.11.0-2",
"version": "3.11.0",
"description": "node red mindconnect node using mindconnect-nodejs library.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -57,7 +57,7 @@
}
},
"dependencies": {
"@mindconnect/mindconnect-nodejs": "^3.11.0",
"@mindconnect/mindconnect-nodejs": "^3.11.2",
"ajv": "^7.2.1",
"ajv-formats": "^1.5.1",
"debug": "^4.3.1",
Expand Down
7 changes: 7 additions & 0 deletions src/mindconnect-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ export const remoteConfigurationSchema = {
default: false,
examples: [true],
},
datalakeonly: {
$id: "#/properties/datalakeonly",
type: "boolean",
title: "The datalakeonly Schema",
default: false,
examples: [true],
},
supressverbosity: {
$id: "#/properties/supressverbosity",
type: "boolean",
Expand Down
4 changes: 4 additions & 0 deletions src/mindconnect-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const copyConfiguration = (node: IConfigurationInfo, config: IConfigurati
node.chunk = config.chunk;
node.disablekeepalive = config.disablekeepalive;
node.emitcontrol = config.emitcontrol;
node.datalakeonly = config.datalakeonly;
node.supressverbosity = config.supressverbosity;
node.retry = config.retry;
node.parallel = config.parallel;
Expand Down Expand Up @@ -66,6 +67,9 @@ export const configureAgent = (mcnode: IConfigurationInfo, newConfig?: IConfigur
mcnode.supressverbosity = mcnode.supressverbosity || false;
startlogmessage += ` verbose info: ${mcnode.supressverbosity ? "disabled" : "enabled"}`;

mcnode.datalakeonly = mcnode.datalakeonly || false;
startlogmessage += ` data lake only: ${mcnode.datalakeonly}`;

mcnode.parallel = mcnode.parallel || "1";
mcnode.asyncduration = mcnode.asyncduration || "10";
startlogmessage += ` parallel requests: ${mcnode.parallel} async requests wait: ${mcnode.asyncduration}s`;
Expand Down
16 changes: 15 additions & 1 deletion src/mindconnect.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
&nbsp;&nbsp;<a href="https://opensource.mindsphere.io/docs/node-red-contrib-mindconnect/index.html" target="_new" class="headerLink" title="Documentation">
<i class="fa fa-globe"></i> MindConnect Node-RED Agent
</a>
</span> <span style="color:#aaaaaa !important">v3.11.0 (alpha)</span>
</span> <span style="color:#aaaaaa !important">v3.11.0</span>
</div>

<div class="form-row">
Expand Down Expand Up @@ -174,6 +174,13 @@
</div>


<div class="form-row node-text-editor-row">
<label for="node-input-datalakeonly"></label>
<label for="node-input-datalakeonly" style="width:70%" data-toggle="tooltip" data-placement="top" title="The node is only used to send data to data lake.">
<input type="checkbox" id="node-input-datalakeonly" style="display:inline-block; width:22px; vertical-align:baseline;">Data lake only.</label>
</div>


<div class="form-tips">
<i class="fa fa-info-circle"></i> <b>Tip:</b>
Use Agent Configuration to automatically configure and map the agent to a selected asset or
Expand Down Expand Up @@ -209,6 +216,10 @@
If switched on, the node will stop showing the status of every single message below the node.
This setting can greatly reduce node verbosity. It is recommended to turn this on if you are ingesting a lot of data at the same time.
<br/><br/>
<i class="fa fa-info-circle"></i> <b>Data Lake Only:</b>
If the node is marked as data lake only, it will not try to get the configuration from MindSphere. Use this
if you are only sending data to the MindSphere integrated data lake.
<br/><br/>
</div>
</script>

Expand Down Expand Up @@ -726,6 +737,9 @@
emitcontrol: {
value: false,
},
datalakeonly: {
value:false,
},
supressverbosity: {
value: false,
},
Expand Down
24 changes: 16 additions & 8 deletions src/mindconnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,22 @@ export = function (RED: any): void {
await retryWithNodeLog(node.retry, () => agent.OnBoard(), "OnBoard", node);
}

if (!agent.HasDataSourceConfiguration() || (msg._forceGetConfig && msg._forceGetConfig === true)) {
node.status({ fill: "grey", shape: "dot", text: `getting configuration` });
node.model = await retryWithNodeLog(
node.retry,
() => agent.GetDataSourceConfiguration(),
"GetConfiguration",
node
);
if (!node.datalakeonly) {
if (
!agent.HasDataSourceConfiguration() ||
(msg._forceGetConfig && msg._forceGetConfig === true)
) {
node.status({ fill: "grey", shape: "dot", text: `getting configuration` });
node.model = await retryWithNodeLog(
node.retry,
() => agent.GetDataSourceConfiguration(),
"GetConfiguration",
node
);
}
} else {
!node.supressverbosity &&
node.status({ fill: "green", shape: "dot", text: `Data lake communication only` });
}

let timestamp = msg._time ? msg._time : new Date();
Expand Down
1 change: 1 addition & 0 deletions test/mindconnect-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe("MindConnect Utils", () => {
parallel: "1",
asyncduration: "3",
emitcontrol: false,
datalakeonly: false,
supressverbosity: false,
};

Expand Down

0 comments on commit 018f16a

Please sign in to comment.