Hide all counters in Workspace which do not provide value

This commit is contained in:
Enrico Hilgendorf 2025-05-26 12:01:12 +02:00
parent 06921783bf
commit 34e32019d1
No known key found for this signature in database
GPG Key ID: 63E3DFC416653562
4 changed files with 18 additions and 6 deletions

View File

@ -278,6 +278,10 @@ export class ProcessFiltersCloudComponent implements OnInit, OnChanges {
* @param filter filter * @param filter filter
*/ */
updateFilterCounter(filter: ProcessFilterCloudModel): void { updateFilterCounter(filter: ProcessFilterCloudModel): void {
if (!filter?.showCounter) {
return;
}
this.fetchProcessFilterCounter(filter) this.fetchProcessFilterCounter(filter)
.pipe( .pipe(
tap((filterCounter) => { tap((filterCounter) => {

View File

@ -28,7 +28,8 @@ export const fakeProcessCloudFilters = [
appName: 'mock-appName', appName: 'mock-appName',
sort: 'startDate', sort: 'startDate',
status: 'MOCK_ALL', status: 'MOCK_ALL',
order: 'DESC' order: 'DESC',
showCounter: true
}, },
{ {
name: 'MOCK_PROCESS_NAME_2', name: 'MOCK_PROCESS_NAME_2',
@ -38,7 +39,8 @@ export const fakeProcessCloudFilters = [
appName: 'mock-appName', appName: 'mock-appName',
sort: 'startDate', sort: 'startDate',
status: 'MOCK-RUNNING', status: 'MOCK-RUNNING',
order: 'DESC' order: 'DESC',
showCounter: false
}, },
{ {
name: 'MOCK_PROCESS_NAME_3', name: 'MOCK_PROCESS_NAME_3',
@ -48,7 +50,8 @@ export const fakeProcessCloudFilters = [
appName: 'mock-appName', appName: 'mock-appName',
sort: 'startDate', sort: 'startDate',
status: 'MOCK-COMPLETED', status: 'MOCK-COMPLETED',
order: 'DESC' order: 'DESC',
showCounter: false
} }
]; ];

View File

@ -49,6 +49,7 @@ export class ProcessFilterCloudModel {
suspendedDateType: DateCloudFilterType; suspendedDateType: DateCloudFilterType;
completedDate: Date; completedDate: Date;
environmentId?: string; environmentId?: string;
showCounter: boolean;
processDefinitionNames: string[] | null; processDefinitionNames: string[] | null;
processNames: string[] | null; processNames: string[] | null;
@ -74,6 +75,7 @@ export class ProcessFilterCloudModel {
this.name = obj.name || null; this.name = obj.name || null;
this.key = obj.key || null; this.key = obj.key || null;
this.environmentId = obj.environmentId; this.environmentId = obj.environmentId;
this.showCounter = obj.showCounter || false;
this.icon = obj.icon || null; this.icon = obj.icon || null;
this.index = obj.index || null; this.index = obj.index || null;
this.appName = obj.appName || obj.appName === '' ? obj.appName : null; this.appName = obj.appName || obj.appName === '' ? obj.appName : null;

View File

@ -378,7 +378,8 @@ export class ProcessFilterCloudService {
appName, appName,
sort: 'startDate', sort: 'startDate',
status: 'RUNNING', status: 'RUNNING',
order: 'DESC' order: 'DESC',
showCounter: true
}), }),
new ProcessFilterCloudModel({ new ProcessFilterCloudModel({
name: 'ADF_CLOUD_PROCESS_FILTERS.COMPLETED_PROCESSES', name: 'ADF_CLOUD_PROCESS_FILTERS.COMPLETED_PROCESSES',
@ -387,7 +388,8 @@ export class ProcessFilterCloudService {
appName, appName,
sort: 'startDate', sort: 'startDate',
status: 'COMPLETED', status: 'COMPLETED',
order: 'DESC' order: 'DESC',
showCounter: false
}), }),
new ProcessFilterCloudModel({ new ProcessFilterCloudModel({
name: 'ADF_CLOUD_PROCESS_FILTERS.ALL_PROCESSES', name: 'ADF_CLOUD_PROCESS_FILTERS.ALL_PROCESSES',
@ -396,7 +398,8 @@ export class ProcessFilterCloudService {
appName, appName,
sort: 'startDate', sort: 'startDate',
status: '', status: '',
order: 'DESC' order: 'DESC',
showCounter: false
}) })
]; ];
} }