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/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 79244dcfeb fix: Various minor improvements and bug fixes (#3953)
79244dcfeb is described below
commit 79244dcfebd81fb067d8fe744c773eae93d0aa37
Author: Dominik Riemer <[email protected]>
AuthorDate: Sun Nov 23 19:32:20 2025 +0100
fix: Various minor improvements and bug fixes (#3953)
---
.../streampipes/client/api/DataStreamApi.java | 2 +-
.../rest/impl/pe/DataStreamResource.java | 15 ++++++++++++++
.../asset-link-configuration.component.html | 23 ++++++++++++++++------
.../edit-unit-transformation.component.html | 11 ++++++++---
.../static-file-input.component.ts | 2 +-
5 files changed, 42 insertions(+), 11 deletions(-)
diff --git
a/streampipes-client/src/main/java/org/apache/streampipes/client/api/DataStreamApi.java
b/streampipes-client/src/main/java/org/apache/streampipes/client/api/DataStreamApi.java
index d992ce6d02..9dddcb9611 100644
---
a/streampipes-client/src/main/java/org/apache/streampipes/client/api/DataStreamApi.java
+++
b/streampipes-client/src/main/java/org/apache/streampipes/client/api/DataStreamApi.java
@@ -79,7 +79,7 @@ public class DataStreamApi extends
AbstractTypedClientApi<SpDataStream> implemen
@Override
public void update(SpDataStream element) {
-
+
put(getBaseResourcePath().addToPath(URLEncoder.encode(element.getElementId(),
StandardCharsets.UTF_8)), element);
}
@Override
diff --git
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
index 2210e0563d..f087549c61 100644
---
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
+++
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
@@ -26,6 +26,7 @@ import
org.apache.streampipes.resource.management.DataStreamResourceManager;
import
org.apache.streampipes.rest.core.base.impl.AbstractAuthGuardedRestResource;
import org.apache.streampipes.rest.security.AuthConstants;
+import org.apache.http.client.HttpResponseException;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PostFilter;
@@ -34,6 +35,7 @@ import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -75,6 +77,19 @@ public class DataStreamResource extends
AbstractAuthGuardedRestResource {
}
}
+ @PutMapping(path = "/{elementId}", produces =
MediaType.APPLICATION_JSON_VALUE)
+ @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
+ public ResponseEntity<Message> update(@PathVariable("elementId") String
elementId,
+ @RequestBody SpDataStream
updatedElement) throws HttpResponseException {
+ if (!elementId.equals(updatedElement.getElementId())) {
+ throw new HttpResponseException(400,
+ "Element ID in path variable does not match element ID in request
body");
+ } else {
+ getDataStreamResourceManager().update(updatedElement);
+ return
constructSuccessMessage(NotificationType.STORAGE_SUCCESS.uiNotification());
+ }
+ }
+
@PostMapping(
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE
diff --git
a/ui/projects/streampipes/shared-ui/src/lib/components/asset-link-configuration/asset-link-configuration.component.html
b/ui/projects/streampipes/shared-ui/src/lib/components/asset-link-configuration/asset-link-configuration.component.html
index db309f64f4..55a377e7b8 100644
---
a/ui/projects/streampipes/shared-ui/src/lib/components/asset-link-configuration/asset-link-configuration.component.html
+++
b/ui/projects/streampipes/shared-ui/src/lib/components/asset-link-configuration/asset-link-configuration.component.html
@@ -41,9 +41,15 @@
: 'chevron_right'
}}</mat-icon>
</button>
- <span [class.selected-node]="isSelected(node)">{{
- node.assetName
- }}</span>
+ <span
+ [class.selected-node]="isSelected(node)"
+ fxLayoutAlign="start center"
+ >
+ {{ node.assetName }}
+ @if (isSelected(node)) {
+ <i
class="material-icons">check_circle</i>
+ }
+ </span>
</div>
<div *ngIf="treeControl.isExpanded(node)" role="group">
<ng-container matTreeNodeOutlet></ng-container>
@@ -56,9 +62,14 @@
<span class="mat-icon-button placeholder-icon">
<mat-icon class="invisible"></mat-icon>
</span>
- <span [class.selected-node]="isSelected(node)">{{
- node.assetName
- }}</span>
+ <span
+ [class.selected-node]="isSelected(node)"
+ fxLayoutAlign="start center"
+ >{{ node.assetName }}
+ @if (isSelected(node)) {
+ <i
class="material-icons">check_circle</i>
+ }
+ </span>
</div>
</mat-tree-node>
</mat-tree>
diff --git
a/ui/src/app/connect/dialog/edit-event-property/components/edit-unit-transformation/edit-unit-transformation.component.html
b/ui/src/app/connect/dialog/edit-event-property/components/edit-unit-transformation/edit-unit-transformation.component.html
index 2c577334f1..44bece0053 100644
---
a/ui/src/app/connect/dialog/edit-event-property/components/edit-unit-transformation/edit-unit-transformation.component.html
+++
b/ui/src/app/connect/dialog/edit-event-property/components/edit-unit-transformation/edit-unit-transformation.component.html
@@ -27,7 +27,12 @@
>
<div fxLayout="row">
<div class="w-100" fxLayoutAlign="start center" fxFlex="45">
- <mat-form-field class="w-100" color="accent" fxFlex="100">
+ <mat-form-field
+ class="w-100"
+ color="accent"
+ fxFlex="100"
+ subscriptSizing="dynamic"
+ >
<input
matInput
placeholder="Unit"
@@ -55,13 +60,12 @@
</div>
<div fxFlex="10" fxLayoutAlign="center center">
<button
- mat-button
+ mat-icon-button
[disabled]="!this.cachedProperty.measurementUnit"
(click)="transformUnit()"
color="accent"
class="form-group"
fxFlexAlign="center"
- style="min-width: 60px; max-width: 60px"
data-cy="connect-schema-unit-transform-btn"
>
@if (!transformUnitEnable) {
@@ -80,6 +84,7 @@
class="w-100"
color="accent"
fxFlex="100"
+ subscriptSizing="dynamic"
>
<mat-select
placeholder="New Unit"
diff --git
a/ui/src/app/core-ui/static-properties/static-file-input/static-file-input.component.ts
b/ui/src/app/core-ui/static-properties/static-file-input/static-file-input.component.ts
index 2013dd55ea..e7892e5675 100644
---
a/ui/src/app/core-ui/static-properties/static-file-input/static-file-input.component.ts
+++
b/ui/src/app/core-ui/static-properties/static-file-input/static-file-input.component.ts
@@ -68,7 +68,7 @@ export class StaticFileInputComponent
}
ngOnInit() {
- this.fetchFileMetadata();
+ this.fetchFileMetadata(this.staticProperty.locationPath);
this.addValidator(
this.staticProperty.locationPath,
this.collectValidators(),