Skip to content

Commit

Permalink
feat(#3151): Remove add nested property button (#3152)
Browse files Browse the repository at this point in the history
  • Loading branch information
tenthe authored Aug 16, 2024
1 parent dd8213e commit 5787f32
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
import java.util.List;
import java.util.Map;

/**
* @deprecated The functionlality to add nested rules was removed in version 0.97.0 form the UI
* For the next release we can also remove the functionality from the backend
*/
@Deprecated(since = "0.97.0", forRemoval = true)
public class CreateNestedTransformationRule extends SupportsNestedTransformationRule {

private final List<String> key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
import org.apache.streampipes.model.connect.rules.ITransformationRuleVisitor;
import org.apache.streampipes.model.connect.rules.TransformationRulePriority;

/**
* @deprecated The functionlality to add nested rules was removed in version 0.97.0 form the UI
* For the next release we can also remove the functionality from the backend
*/
@Deprecated(since = "0.97.0", forRemoval = true)
public class CreateNestedRuleDescription extends SchemaTransformationRuleDescription {

private String runtimeKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
fxFlex="100"
[countSelected]="countSelected"
[timestampPresent]="timestampPresent"
(addNestedPropertyEmitter)="addNestedProperty()"
(addStaticValuePropertyEmitter)="
addStaticValueProperty($event)
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,6 @@ export class EventSchemaComponent implements OnChanges {
}
}

public addNestedProperty(eventProperty?: EventPropertyNested): void {
const uuid: string = this.idGeneratorService.generate(25);
const nested: EventPropertyNested = new EventPropertyNested();
nested['@class'] =
'org.apache.streampipes.model.schema.EventPropertyNested';
nested.elementId = uuid;
nested.eventProperties = [];
nested.domainProperties = [];
nested.runtimeName = 'nested';
nested.additionalMetadata = {};
if (!eventProperty) {
this.targetSchema.eventProperties.push(nested);
} else {
eventProperty.eventProperties.push(nested);
}
this.refreshTree();
}

public removeSelectedProperties(eventProperties?: any): void {
eventProperties = eventProperties || this.targetSchema.eventProperties;
for (let i = eventProperties.length - 1; i >= 0; --i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@

<div fxLayout="row" fxFlex="100">
<div fxFlex fxLayoutAlign="start center" fxLayout="row">
<button
color="accent"
mat-button
data-cy="connect-add-nested-property"
matTooltip="Add a Nested Property"
(click)="addNestedProperty()"
>
<mat-icon>queue</mat-icon>
<span>&nbsp;Add nested</span>
</button>
<button
color="accent"
mat-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class SchemaEditorHeaderComponent {
@Input() countSelected: number;
@Input() timestampPresent = false;

@Output() addNestedPropertyEmitter = new EventEmitter();
@Output() addStaticValuePropertyEmitter = new EventEmitter<string>();
@Output() addTimestampPropertyEmitter = new EventEmitter();
@Output() guessSchemaEmitter = new EventEmitter();
Expand All @@ -46,10 +45,6 @@ export class SchemaEditorHeaderComponent {

constructor() {}

public addNestedProperty() {
this.addNestedPropertyEmitter.emit();
}

public addStaticValueProperty() {
this.addStaticValuePropertyEmitter.emit(this.staticValueKey);
this.trigger.closeMenu();
Expand Down

0 comments on commit 5787f32

Please sign in to comment.