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
*/
updateFilterCounter(filter: ProcessFilterCloudModel): void {
if (!filter?.showCounter) {
return;
}
this.fetchProcessFilterCounter(filter)
.pipe(
tap((filterCounter) => {

View File

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

View File

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

View File

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