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 35697b07d7 fix: Keep asset filters when modifying pipelines anda 
adapters, improve data lake paging (#3519)
35697b07d7 is described below

commit 35697b07d753d435850c85d8a1687e48108cc4ab
Author: Dominik Riemer <[email protected]>
AuthorDate: Fri Mar 7 10:15:14 2025 +0100

    fix: Keep asset filters when modifying pipelines anda adapters, improve 
data lake paging (#3519)
---
 ui/cypress/support/utils/connect/ConnectUtils.ts   |  2 +-
 .../datalake-configuration.component.ts            | 31 ++++++++++++----------
 .../existing-adapters.component.ts                 |  8 +++---
 ...ta-explorer-widget-data-settings.component.html |  4 ++-
 ...ta-explorer-widget-data-settings.component.scss |  2 ++
 ui/src/app/pipelines/pipelines.component.ts        |  4 ++-
 6 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/ui/cypress/support/utils/connect/ConnectUtils.ts 
b/ui/cypress/support/utils/connect/ConnectUtils.ts
index 7b9458feaa..44f432fb47 100644
--- a/ui/cypress/support/utils/connect/ConnectUtils.ts
+++ b/ui/cypress/support/utils/connect/ConnectUtils.ts
@@ -386,7 +386,7 @@ export class ConnectUtils {
             amountOfProperties,
         );
 
-        cy.dataCy('live-preview-table-no-data', { timout: 5000 }).should(
+        cy.dataCy('live-preview-table-no-data', { timout: 10000 }).should(
             'not.exist',
         );
     }
diff --git 
a/ui/src/app/configuration/datalake-configuration/datalake-configuration.component.ts
 
b/ui/src/app/configuration/datalake-configuration/datalake-configuration.component.ts
index 93b7c72e55..f21ed50d1d 100644
--- 
a/ui/src/app/configuration/datalake-configuration/datalake-configuration.component.ts
+++ 
b/ui/src/app/configuration/datalake-configuration/datalake-configuration.component.ts
@@ -48,7 +48,8 @@ export class DatalakeConfigurationComponent implements OnInit 
{
     @ViewChild(MatPaginator) paginator: MatPaginator;
     @ViewChild(MatSort) sort: MatSort;
 
-    dataSource: MatTableDataSource<DataLakeConfigurationEntry>;
+    dataSource: MatTableDataSource<DataLakeConfigurationEntry> =
+        new MatTableDataSource([]);
     availableMeasurements: DataLakeConfigurationEntry[] = [];
 
     displayedColumns: string[] = [
@@ -61,6 +62,7 @@ export class DatalakeConfigurationComponent implements OnInit 
{
     ];
 
     pageSize = 15;
+    pageIndex = 0;
 
     constructor(
         private datalakeRestService: DatalakeRestService,
@@ -112,10 +114,8 @@ export class DatalakeConfigurationComponent implements 
OnInit {
                         this.availableMeasurements.sort((a, b) =>
                             a.name.localeCompare(b.name),
                         );
-                        this.receiveMeasurementSizes(0);
-                        this.dataSource = new MatTableDataSource(
-                            this.availableMeasurements,
-                        );
+                        this.receiveMeasurementSizes(this.pageIndex);
+                        this.dataSource.data = this.availableMeasurements;
                         setTimeout(() => {
                             this.dataSource.paginator = this.paginator;
                             this.dataSource.sort = this.sort;
@@ -176,7 +176,8 @@ export class DatalakeConfigurationComponent implements 
OnInit {
     }
 
     onPageChange(event: any) {
-        this.receiveMeasurementSizes(event.pageIndex);
+        this.pageIndex = event.pageIndex;
+        this.receiveMeasurementSizes(this.pageIndex);
     }
 
     receiveMeasurementSizes(pageIndex: number) {
@@ -186,14 +187,16 @@ export class DatalakeConfigurationComponent implements 
OnInit {
             .slice(start, end)
             .filter(m => m.events === -1)
             .map(m => m.name);
-        this.datalakeRestService
-            .getMeasurementEntryCounts(measurements)
-            .subscribe(res => {
-                this.availableMeasurements.forEach(m => {
-                    if (res[m.name] !== undefined) {
-                        m.events = res[m.name];
-                    }
+        if (measurements.length > 0) {
+            this.datalakeRestService
+                .getMeasurementEntryCounts(measurements)
+                .subscribe(res => {
+                    this.availableMeasurements.forEach(m => {
+                        if (res[m.name] !== undefined) {
+                            m.events = res[m.name];
+                        }
+                    });
                 });
-            });
+        }
     }
 }
diff --git 
a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
 
b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
index c8d2f29db3..56c6f560d9 100644
--- 
a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
+++ 
b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
@@ -83,6 +83,7 @@ export class ExistingAdaptersComponent implements OnInit, 
OnDestroy {
 
     userSubscription: Subscription;
     tutorialActiveSubscription: Subscription;
+    currentFilterIds: Set<string> = new Set<string>();
 
     constructor(
         private adapterService: AdapterService,
@@ -249,7 +250,7 @@ export class ExistingAdaptersComponent implements OnInit, 
OnDestroy {
         this.adapterService.getAdapters().subscribe(adapters => {
             this.existingAdapters = adapters;
             this.existingAdapters.sort((a, b) => a.name.localeCompare(b.name));
-            this.applyAdapterFilters();
+            this.applyAdapterFilters(this.currentFilterIds);
             this.getMonitoringInfos(adapters);
             setTimeout(() => {
                 this.dataSource.sort = this.sort;
@@ -257,7 +258,8 @@ export class ExistingAdaptersComponent implements OnInit, 
OnDestroy {
         });
     }
 
-    applyAdapterFilters(elementIds: Set<string> = new Set<string>()): void {
+    applyAdapterFilters(elementIds: Set<string>): void {
+        this.currentFilterIds = elementIds;
         this.filteredAdapters = this.adapterFilter
             .transform(this.existingAdapters, this.currentFilter)
             .filter(a => {
@@ -283,7 +285,7 @@ export class ExistingAdaptersComponent implements OnInit, 
OnDestroy {
     applyFilter(filter: AdapterFilterSettingsModel) {
         this.currentFilter = filter;
         if (this.dataSource) {
-            this.applyAdapterFilters();
+            this.applyAdapterFilters(this.currentFilterIds);
         }
     }
 
diff --git 
a/ui/src/app/data-explorer/components/chart-view/designer-panel/data-settings/data-explorer-widget-data-settings.component.html
 
b/ui/src/app/data-explorer/components/chart-view/designer-panel/data-settings/data-explorer-widget-data-settings.component.html
index f8c59a7f3e..bbc8cfc1e0 100644
--- 
a/ui/src/app/data-explorer/components/chart-view/designer-panel/data-settings/data-explorer-widget-data-settings.component.html
+++ 
b/ui/src/app/data-explorer/components/chart-view/designer-panel/data-settings/data-explorer-widget-data-settings.component.html
@@ -198,7 +198,9 @@
                                                     pipeline.pipelineName
                                                 }}</span
                                                 ><br />
-                                                {{ pipeline.measureName }}
+                                                <span class="measure-name">{{
+                                                    pipeline.measureName
+                                                }}</span>
                                             </mat-option>
                                         </mat-select>
                                     </mat-form-field>
diff --git 
a/ui/src/app/data-explorer/components/chart-view/designer-panel/data-settings/data-explorer-widget-data-settings.component.scss
 
b/ui/src/app/data-explorer/components/chart-view/designer-panel/data-settings/data-explorer-widget-data-settings.component.scss
index 8eaa6928e0..9ddec88b47 100644
--- 
a/ui/src/app/data-explorer/components/chart-view/designer-panel/data-settings/data-explorer-widget-data-settings.component.scss
+++ 
b/ui/src/app/data-explorer/components/chart-view/designer-panel/data-settings/data-explorer-widget-data-settings.component.scss
@@ -18,10 +18,12 @@
 
 .pipeline-name {
     font-weight: bold;
+    font-size: 9pt;
 }
 
 .measure-name {
     font-weight: normal;
+    font-size: 9pt;
 }
 
 .selection-radio-group {
diff --git a/ui/src/app/pipelines/pipelines.component.ts 
b/ui/src/app/pipelines/pipelines.component.ts
index a80eedffd3..b59bea31c8 100644
--- a/ui/src/app/pipelines/pipelines.component.ts
+++ b/ui/src/app/pipelines/pipelines.component.ts
@@ -61,6 +61,7 @@ export class PipelinesComponent implements OnInit, OnDestroy {
     tutorialActive = false;
     tutorialActiveSubscription: Subscription;
     userSubscription: Subscription;
+    currentFilters: Set<string> = new Set<string>();
 
     constructor(
         private pipelineService: PipelineService,
@@ -112,11 +113,12 @@ export class PipelinesComponent implements OnInit, 
OnDestroy {
         this.pipelines = [];
         this.pipelineService.getPipelines().subscribe(pipelines => {
             this.pipelines = pipelines;
-            this.applyPipelineFilters(new Set<string>());
+            this.applyPipelineFilters(this.currentFilters);
         });
     }
 
     applyPipelineFilters(elementIds: Set<string>) {
+        this.currentFilters = elementIds;
         if (elementIds.size == 0) {
             this.filteredPipelines = this.pipelines;
         } else {

Reply via email to