Skip to content

Commit

Permalink
fix(#2361): Fix pipeline element template generation
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikriemer committed Dec 21, 2023
1 parent 75714c4 commit f885399
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ public ResponseEntity<?> getById(@Parameter(description = "The id of the pipelin
responses = {
@ApiResponse(responseCode = "200", description = "Template successfully stored")
})
public ResponseEntity<Void> create(@RequestBody(description = "The pipeline element template to be stored",
content = @Content(schema = @Schema(implementation = PipelineElementTemplate.class)))
PipelineElementTemplate entity) {
public ResponseEntity<Void> 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();
}
Expand Down Expand Up @@ -167,7 +168,7 @@ public ResponseEntity<DataSinkInvocation> 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());
Expand Down Expand Up @@ -196,7 +197,7 @@ public ResponseEntity<DataProcessorInvocation> 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());
Expand Down Expand Up @@ -225,7 +226,7 @@ public ResponseEntity<AdapterDescription> 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))
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/editor/dialog/customize/customize.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
class="sp-tab-bg"
>
<div
fxFlex
fxLayoutAlign="start center"
class="form-field-small"
*ngIf="availableTemplates && availableTemplates.length > 0"
>
<mat-form-field
class="form-field"
floatLabel="never"
color="accent"
appearance="outline"
>
<mat-label>Use template</mat-label>
<mat-select
Expand Down

0 comments on commit f885399

Please sign in to comment.