From f885399994564a8b824fa2b8f746a5c25c5b98e4 Mon Sep 17 00:00:00 2001 From: Dominik Riemer Date: Thu, 21 Dec 2023 20:09:52 +0100 Subject: [PATCH] fix(#2361): Fix pipeline element template generation --- .../ps/PipelineElementTemplateResource.java | 13 +++++++------ .../dialog/customize/customize.component.html | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/streampipes-platform-services/src/main/java/org/apache/streampipes/ps/PipelineElementTemplateResource.java b/streampipes-platform-services/src/main/java/org/apache/streampipes/ps/PipelineElementTemplateResource.java index ff93e04803..1b9e52c854 100644 --- a/streampipes-platform-services/src/main/java/org/apache/streampipes/ps/PipelineElementTemplateResource.java +++ b/streampipes-platform-services/src/main/java/org/apache/streampipes/ps/PipelineElementTemplateResource.java @@ -96,9 +96,10 @@ public ResponseEntity getById(@Parameter(description = "The id of the pipelin responses = { @ApiResponse(responseCode = "200", description = "Template successfully stored") }) - public ResponseEntity create(@RequestBody(description = "The pipeline element template to be stored", - content = @Content(schema = @Schema(implementation = PipelineElementTemplate.class))) - PipelineElementTemplate entity) { + public ResponseEntity create( + @RequestBody(description = "The pipeline element template to be stored", + content = @Content(schema = @Schema(implementation = PipelineElementTemplate.class))) + @org.springframework.web.bind.annotation.RequestBody PipelineElementTemplate entity) { getPipelineElementTemplateStorage().createElement(entity); return ok(); } @@ -167,7 +168,7 @@ public ResponseEntity getPipelineElementForTemplate( @RequestBody(description = "The data sink invocation that should be configured with the template contents", content = @Content(schema = @Schema(implementation = DataSinkInvocation.class))) - DataSinkInvocation invocation) { + @org.springframework.web.bind.annotation.RequestBody DataSinkInvocation invocation) { PipelineElementTemplate template = getPipelineElementTemplateStorage().getElementById(id); return ok(new DataSinkTemplateHandler(template, invocation, Boolean.parseBoolean(overwriteNameAndDescription)) .applyTemplateOnPipelineElement()); @@ -196,7 +197,7 @@ public ResponseEntity getPipelineElementForTemplate( @RequestBody(description = "The data processor invocation that should be configured with the template contents", content = @Content(schema = @Schema(implementation = DataProcessorInvocation.class))) - DataProcessorInvocation invocation) { + @org.springframework.web.bind.annotation.RequestBody DataProcessorInvocation invocation) { PipelineElementTemplate template = getPipelineElementTemplateStorage().getElementById(id); return ok(new DataProcessorTemplateHandler(template, invocation, Boolean.parseBoolean(overwriteNameAndDescription)) .applyTemplateOnPipelineElement()); @@ -225,7 +226,7 @@ public ResponseEntity getPipelineElementForTemplate( @RequestBody(description = "The adapter that should be configured with the template contents", content = @Content(schema = @Schema(implementation = AdapterDescription.class))) - AdapterDescription adapterDescription) { + @org.springframework.web.bind.annotation.RequestBody AdapterDescription adapterDescription) { PipelineElementTemplate template = getPipelineElementTemplateStorage().getElementById(id); var desc = new AdapterTemplateHandler(template, adapterDescription, Boolean.parseBoolean(overwriteNameAndDescription)) diff --git a/ui/src/app/editor/dialog/customize/customize.component.html b/ui/src/app/editor/dialog/customize/customize.component.html index 5a0e327b5b..89d9c051be 100644 --- a/ui/src/app/editor/dialog/customize/customize.component.html +++ b/ui/src/app/editor/dialog/customize/customize.component.html @@ -25,14 +25,14 @@ class="sp-tab-bg" >
Use template