You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2022/03/31 07:28:46 UTC
[incubator-streampipes] branch dev updated: [STREAMPIPES-521] Filter can not be deleted in data explorer
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 3747148 [STREAMPIPES-521] Filter can not be deleted in data explorer
3747148 is described below
commit 3747148a3de1b842460464e3e7956491c222a290
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Mar 31 09:27:46 2022 +0200
[STREAMPIPES-521] Filter can not be deleted in data explorer
---
.../src/lib/model/datalake/data-lake-query-config.model.ts | 1 -
.../filter-selection-panel/filter-selection-panel.component.html | 4 ++--
.../filter-selection-panel/filter-selection-panel.component.ts | 3 ++-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ui/projects/streampipes/platform-services/src/lib/model/datalake/data-lake-query-config.model.ts b/ui/projects/streampipes/platform-services/src/lib/model/datalake/data-lake-query-config.model.ts
index 9497a1c..f7b0d83 100644
--- a/ui/projects/streampipes/platform-services/src/lib/model/datalake/data-lake-query-config.model.ts
+++ b/ui/projects/streampipes/platform-services/src/lib/model/datalake/data-lake-query-config.model.ts
@@ -43,7 +43,6 @@ export interface FieldConfig {
}
export interface SelectedFilter {
- index: number;
field?: DataExplorerField;
operator: string;
value: any;
diff --git a/ui/src/app/data-explorer/components/designer-panel/data-settings/filter-selection-panel/filter-selection-panel.component.html b/ui/src/app/data-explorer/components/designer-panel/data-settings/filter-selection-panel/filter-selection-panel.component.html
index 236855a..c72c804 100644
--- a/ui/src/app/data-explorer/components/designer-panel/data-settings/filter-selection-panel/filter-selection-panel.component.html
+++ b/ui/src/app/data-explorer/components/designer-panel/data-settings/filter-selection-panel/filter-selection-panel.component.html
@@ -25,7 +25,7 @@
style="margin-right:10px;margin-bottom: 15px;">Add Filter
</button>
</div>
- <div *ngFor="let filter of sourceConfig.queryConfig.selectedFilters" fxFlex="100"
+ <div *ngFor="let filter of sourceConfig.queryConfig.selectedFilters; let i = index" fxFlex="100"
fxLayout="column">
<div fxFlex="100" fxLayout="column">
<div fxFlex="100" fxLayout="row" fxLayoutAlign="start center">
@@ -91,7 +91,7 @@
</mat-autocomplete>
</mat-form-field>
<button mat-icon-button color="accent"
- (click)="remove(sourceConfig, filter.index)"
+ (click)="remove(sourceConfig, i)"
data-cy="design-panel-data-settings-remove-filter">
<i class="material-icons">remove</i>
</button>
diff --git a/ui/src/app/data-explorer/components/designer-panel/data-settings/filter-selection-panel/filter-selection-panel.component.ts b/ui/src/app/data-explorer/components/designer-panel/data-settings/filter-selection-panel/filter-selection-panel.component.ts
index 7b6eff3..49444d1 100644
--- a/ui/src/app/data-explorer/components/designer-panel/data-settings/filter-selection-panel/filter-selection-panel.component.ts
+++ b/ui/src/app/data-explorer/components/designer-panel/data-settings/filter-selection-panel/filter-selection-panel.component.ts
@@ -61,7 +61,6 @@ export class FilterSelectionPanelComponent implements OnInit {
addFilter() {
const newFilter: SelectedFilter = {
- index: this.sourceConfig.queryConfig.selectedFilters.length,
operator: '=',
value: ''
};
@@ -72,6 +71,8 @@ export class FilterSelectionPanelComponent implements OnInit {
remove(sourceConfig: any, index: number) {
sourceConfig.queryConfig.selectedFilters.splice(index, 1);
+
+ this.widgetConfigService.notify({widgetId: this.widgetId, refreshData: true, refreshView: true});
this.updateWidget();
}