This is an automated email from the ASF dual-hosted git repository.
dominikriemer 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 40d0ac4229 fix(#4640): Add missing sorting to adapter and dataset
columns (#4645)
40d0ac4229 is described below
commit 40d0ac4229dd665c3e1f86e085af96d9cd2d5ccc
Author: Sven Oehler <[email protected]>
AuthorDate: Fri Jun 26 16:00:22 2026 +0200
fix(#4640): Add missing sorting to adapter and dataset columns (#4645)
---
.../existing-adapters.component.html | 7 +++--
.../existing-adapters.component.ts | 31 ++++++++++++++++------
.../datalake-configuration.component.ts | 12 +++++++++
3 files changed, 40 insertions(+), 10 deletions(-)
diff --git
a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
index ac68fa8b6f..935b295329 100644
---
a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
+++
b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
@@ -170,7 +170,9 @@
</td>
</ng-container>
<ng-container matColumnDef="adapterBase">
- <th mat-header-cell *matHeaderCellDef>Adapter</th>
+ <th mat-header-cell mat-sort-header *matHeaderCellDef>
+ Adapter
+ </th>
<td mat-cell *matCellDef="let adapter">
@if (getIconUrl(adapter) && !adapter.icon) {
<img
@@ -202,6 +204,7 @@
<ng-container matColumnDef="messagesSent">
<th
mat-header-cell
+ mat-sort-header
*matHeaderCellDef
matTooltip="Messages sent since last start"
>
@@ -222,7 +225,7 @@
</ng-container>
<ng-container matColumnDef="lastMessage">
- <th mat-header-cell *matHeaderCellDef>
+ <th mat-header-cell mat-sort-header *matHeaderCellDef>
{{ 'Last message' | translate }}
</th>
<td mat-cell *matCellDef="let adapter">
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 25c7340a41..ff39d474de 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
@@ -158,6 +158,28 @@ export class ExistingAdaptersComponent implements OnInit,
OnDestroy {
private adapterMonitoringService = inject(AdapterMonitoringService);
private assetFilterService = inject(SpAssetBrowserService);
+ constructor() {
+ this.dataSource.sortingDataAccessor = (adapter, column) => {
+ if (column === 'status') {
+ return Number(adapter.running);
+ } else if (column === 'adapterBase') {
+ return adapter.appId;
+ } else if (column === 'lastModified') {
+ return adapter.createdAt;
+ } else if (column === 'messagesSent') {
+ return (
+ this.adapterMetrics[adapter.elementId]?.messagesOut
+ ?.counter ?? 0
+ );
+ } else if (column === 'lastMessage') {
+ return (
+ this.adapterMetrics[adapter.elementId]?.lastTimestamp ?? 0
+ );
+ }
+ return adapter[column];
+ };
+ }
+
ngOnInit(): void {
this.assetFilterService.applyAssetLinkType('adapter');
this.assetFilter$ =
@@ -176,14 +198,6 @@ export class ExistingAdaptersComponent implements OnInit,
OnDestroy {
this.tutorialActive = tutorialActive;
},
);
- this.dataSource.sortingDataAccessor = (adapter, column) => {
- if (column === 'status') {
- return adapter.running;
- } else if (column === 'lastModified') {
- return adapter.createdAt;
- }
- return adapter[column];
- };
}
startAdapter(adapter: AdapterSummaryDto): void {
@@ -295,6 +309,7 @@ export class ExistingAdaptersComponent implements OnInit,
OnDestroy {
.getMetricsInfoForAdapters(filteredElementIds)
.subscribe(metrics => {
this.adapterMetrics = metrics;
+ this.dataSource.data = [...this.filteredAdapters];
});
}
diff --git
a/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.ts
b/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.ts
index f6d042fd70..3428ec876c 100644
---
a/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.ts
+++
b/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.ts
@@ -189,6 +189,18 @@ export class DatalakeConfigurationComponent
currentTime = Date.now();
currentFilterIds: Set<string> = new Set<string>();
+ constructor() {
+ this.dataSource.sortingDataAccessor = (configurationEntry, column) => {
+ if (column === 'pipeline') {
+ return configurationEntry.pipelines.join(', ');
+ } else if (column === 'lastEvent') {
+ return configurationEntry.lastEvent ?? 0;
+ }
+
+ return configurationEntry[column];
+ };
+ }
+
ngOnInit(): void {
this.assetFilterService.applyAssetLinkType('measurement');
this.assetFilter$ =