You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/07/28 09:43:43 UTC
[incubator-streampipes] branch dev updated (30d277e4f -> bf076736f)
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
from 30d277e4f [hotfix] Deactivate check for columns in data explorer api
new 9894034ed [hotfix] Fix color of group titles in editor
new 964c57eaa [hotfix] Use less strict filtering for OPC nodes
new 9a0b83417 [hotfix] Add minor style improvements to schema editor
new bf076736f [hotfix] Filter transformation rules for timestamp rules
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../container/worker/management/AdapterWorkerManagement.java | 6 ++----
.../connect/container/worker/rest/AdapterWorkerResource.java | 12 ++++++++----
.../connect/iiot/adapters/opcua/OpcUaNodeBrowser.java | 5 +++--
.../model/connect/adapter/AdapterDescription.java | 4 +++-
.../schema-editor/event-schema/event-schema.component.html | 11 +++++++++++
.../loading-message/loading-message.component.html | 4 ++--
.../edit-timestamp-property.component.html | 4 ++--
.../pipeline-element-icon-stand.component.scss | 1 +
8 files changed, 32 insertions(+), 15 deletions(-)
[incubator-streampipes] 01/04: [hotfix] Fix color of group titles in editor
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 9894034ed8c3f1e87c11d257c4b659a2306a14d7
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jul 28 09:27:28 2022 +0200
[hotfix] Fix color of group titles in editor
---
.../pipeline-element-icon-stand.component.scss | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.scss b/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.scss
index 8ede96477..fcd2a84c3 100644
--- a/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.scss
+++ b/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.scss
@@ -110,6 +110,7 @@
border-radius: 3px;
font-size: small;
background: var(--color-primary);
+ color: var(--color-accent);
}
.sort-option {
[incubator-streampipes] 04/04: [hotfix] Filter transformation rules for timestamp rules
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit bf076736ffc6bf34e9e114ade234052463f394a2
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jul 28 11:43:32 2022 +0200
[hotfix] Filter transformation rules for timestamp rules
---
.../container/worker/management/AdapterWorkerManagement.java | 6 ++----
.../connect/container/worker/rest/AdapterWorkerResource.java | 12 ++++++++----
.../model/connect/adapter/AdapterDescription.java | 4 +++-
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/management/AdapterWorkerManagement.java b/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/management/AdapterWorkerManagement.java
index 1c8d6065c..f250ac7b3 100644
--- a/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/management/AdapterWorkerManagement.java
+++ b/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/management/AdapterWorkerManagement.java
@@ -80,11 +80,9 @@ public class AdapterWorkerManagement {
IAdapter<?> adapter = RunningAdapterInstances.INSTANCE.removeAdapter(elementId);
- if (adapter == null) {
- throw new AdapterException("Adapter with id " + elementId + " was not found in this container and cannot be stopped.");
+ if (adapter != null) {
+ adapter.stopAdapter();
}
-
- adapter.stopAdapter();
}
}
diff --git a/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/rest/AdapterWorkerResource.java b/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/rest/AdapterWorkerResource.java
index e4235906f..6fd89be1b 100644
--- a/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/rest/AdapterWorkerResource.java
+++ b/streampipes-connect-container-worker/src/main/java/org/apache/streampipes/connect/container/worker/rest/AdapterWorkerResource.java
@@ -82,15 +82,19 @@ public class AdapterWorkerResource extends AbstractSharedRestInterface {
@Produces(MediaType.APPLICATION_JSON)
public Response stopStreamAdapter(AdapterStreamDescription adapterStreamDescription) {
+ String responseMessage;
try {
- adapterManagement.stopStreamAdapter(adapterStreamDescription);
+ if (adapterStreamDescription.isRunning()) {
+ adapterManagement.stopStreamAdapter(adapterStreamDescription);
+ responseMessage = "Stream adapter with id " + adapterStreamDescription.getElementId() + " successfully stopped";
+ } else {
+ responseMessage = "Stream adapter with id " + adapterStreamDescription.getElementId() + " seems not to be running";
+ }
} catch (AdapterException e) {
- logger.error("Error while stopping adapter with id " + adapterStreamDescription.getUri(), e);
+ logger.error("Error while stopping adapter with id " + adapterStreamDescription.getElementId(), e);
return ok(Notifications.error(e.getMessage()));
}
- String responseMessage = "Stream adapter with id " + adapterStreamDescription.getUri() + " successfully stopped";
-
logger.info(responseMessage);
return ok(Notifications.success(responseMessage));
}
diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java
index 24eb04a32..173f2e132 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java
@@ -23,6 +23,7 @@ import org.apache.streampipes.model.base.NamedStreamPipesEntity;
import org.apache.streampipes.model.connect.rules.TransformationRuleDescription;
import org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription;
import org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription;
+import org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription;
import org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription;
import org.apache.streampipes.model.grounding.*;
import org.apache.streampipes.model.shared.annotation.TsModel;
@@ -165,8 +166,9 @@ public abstract class AdapterDescription extends NamedStreamPipesEntity {
public List<TransformationRuleDescription> getValueRules() {
var tmp = new ArrayList<TransformationRuleDescription>();
rules.forEach(rule -> {
- if(rule instanceof ValueTransformationRuleDescription)
+ if(rule instanceof ValueTransformationRuleDescription && !(rule instanceof AddTimestampRuleDescription)) {
tmp.add(rule);
+ }
});
return tmp;
}
[incubator-streampipes] 02/04: [hotfix] Use less strict filtering for OPC nodes
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 964c57eaa7f4eed0431328bcab1b0bfbf7a05adf
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jul 28 11:42:06 2022 +0200
[hotfix] Use less strict filtering for OPC nodes
---
.../streampipes/connect/iiot/adapters/opcua/OpcUaNodeBrowser.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/opcua/OpcUaNodeBrowser.java b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/opcua/OpcUaNodeBrowser.java
index f391de15e..585c849a1 100644
--- a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/opcua/OpcUaNodeBrowser.java
+++ b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/opcua/OpcUaNodeBrowser.java
@@ -25,6 +25,7 @@ import org.eclipse.milo.opcua.sdk.client.AddressSpace;
import org.eclipse.milo.opcua.sdk.client.OpcUaClient;
import org.eclipse.milo.opcua.sdk.client.model.nodes.variables.BaseVariableTypeNode;
import org.eclipse.milo.opcua.sdk.client.nodes.UaNode;
+import org.eclipse.milo.opcua.sdk.client.nodes.UaVariableNode;
import org.eclipse.milo.opcua.stack.core.UaException;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode;
@@ -81,7 +82,7 @@ public class OpcUaNodeBrowser {
UaNode node = addressSpace.getNode(nodeId);
if (node instanceof BaseVariableTypeNode) {
- UInteger value = (UInteger) ((BaseVariableTypeNode) node).getDataType().getIdentifier();
+ UInteger value = (UInteger) ((UaVariableNode) node).getDataType().getIdentifier();
return new OpcNode(node.getDisplayName().getText(), OpcUaTypes.getType(value), node.getNodeId());
}
@@ -112,6 +113,6 @@ public class OpcUaNodeBrowser {
}
private boolean isDataNode(UaNode node) {
- return node.getNodeClass().equals(NodeClass.Variable) && node instanceof BaseVariableTypeNode;
+ return (node.getNodeClass().equals(NodeClass.Variable) || (node.getNodeClass().equals(NodeClass.VariableType))) && node instanceof UaVariableNode;
}
}
[incubator-streampipes] 03/04: [hotfix] Add minor style improvements to schema editor
Posted by ri...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 9a0b83417189d5575dede251343e08db7a985351
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Thu Jul 28 11:42:55 2022 +0200
[hotfix] Add minor style improvements to schema editor
---
.../schema-editor/event-schema/event-schema.component.html | 11 +++++++++++
.../loading-message/loading-message.component.html | 4 ++--
.../edit-timestamp-property.component.html | 4 ++--
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/ui/src/app/connect/components/new-adapter/schema-editor/event-schema/event-schema.component.html b/ui/src/app/connect/components/new-adapter/schema-editor/event-schema/event-schema.component.html
index 7d2e17ae8..163fbb730 100644
--- a/ui/src/app/connect/components/new-adapter/schema-editor/event-schema/event-schema.component.html
+++ b/ui/src/app/connect/components/new-adapter/schema-editor/event-schema/event-schema.component.html
@@ -55,6 +55,17 @@
(removeSelectedPropertiesEmitter)="removeSelectedProperties()">
</sp-schema-editor-header>
</div>
+ <div header *ngIf="!isLoading && isError" fxFlex="100">
+ <div fxLayout="row" fxLayoutAlign="end center">
+ <button color="accent"
+ mat-button
+ mat-icon-button
+ matTooltip="Refresh Schema"
+ (click)="guessSchema()">
+ <mat-icon>refresh</mat-icon>
+ </button>
+ </div>
+ </div>
<div fxFlex="100">
diff --git a/ui/src/app/connect/components/new-adapter/schema-editor/loading-message/loading-message.component.html b/ui/src/app/connect/components/new-adapter/schema-editor/loading-message/loading-message.component.html
index 639fd6c29..4ef8106d2 100644
--- a/ui/src/app/connect/components/new-adapter/schema-editor/loading-message/loading-message.component.html
+++ b/ui/src/app/connect/components/new-adapter/schema-editor/loading-message/loading-message.component.html
@@ -18,9 +18,9 @@
<div fxLayout="column" >
<div fxLayoutAlign="center">
- <mat-spinner fxLayoutAlign="center" style="margin: 10px 0 5px 0" color="accent">Loading</mat-spinner>
+ <mat-spinner fxLayoutAlign="center" style="margin: 10px 0 5px 0" color="accent" [diameter]="30">Loading</mat-spinner>
</div>
<div fxLayoutAlign="center">
- <h3>Guessing the event schema...</h3>
+ <h4>Guessing the event schema...</h4>
</div>
</div>
diff --git a/ui/src/app/connect/dialog/edit-event-property/components/edit-value-transformation/edit-timestamp-property/edit-timestamp-property.component.html b/ui/src/app/connect/dialog/edit-event-property/components/edit-value-transformation/edit-timestamp-property/edit-timestamp-property.component.html
index 83c88345e..12c9ea6e1 100644
--- a/ui/src/app/connect/dialog/edit-event-property/components/edit-value-transformation/edit-timestamp-property/edit-timestamp-property.component.html
+++ b/ui/src/app/connect/dialog/edit-event-property/components/edit-value-transformation/edit-timestamp-property/edit-timestamp-property.component.html
@@ -30,12 +30,12 @@
<div fxLayout="row" fxLayoutAlign="start">
- <div class="form-group" fxFlexAlign="center">
+ <div class="form-group" fxFlexAlign="center" fxFlex="100">
<mat-form-field class="w-100"
*ngIf="cachedProperty.timestampTransformationMode === 'formatString'"
color="accent"
fxFlex="100">
- <input matInput
+ <input class="w-100" matInput
placeholder="E.g. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
data-cy="connect-timestamp-string-regex"
[(ngModel)]="cachedProperty.timestampTransformationFormatString">