mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
[ADF-5359] Improve response time for filter counters (#6800)
* [ADF-5359] Improve response time for filter counters * Improve cache * Update .travis.yml
This commit is contained in:
parent
8f8819c395
commit
a68c39a806
@ -33,6 +33,7 @@
|
|||||||
opacity: 0.54;
|
opacity: 0.54;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
|
padding: 0 5px;
|
||||||
|
|
||||||
&.adf-active {
|
&.adf-active {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
@ -98,12 +98,16 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp
|
|||||||
initFilterCounterNotifications() {
|
initFilterCounterNotifications() {
|
||||||
if (this.appName) {
|
if (this.appName) {
|
||||||
this.taskFilterCloudService.getTaskNotificationSubscription(this.appName)
|
this.taskFilterCloudService.getTaskNotificationSubscription(this.appName)
|
||||||
.pipe(debounceTime(5000))
|
.pipe(debounceTime(3000))
|
||||||
.subscribe((result: TaskCloudEngineEvent[]) => {
|
.subscribe((result: TaskCloudEngineEvent[]) => {
|
||||||
result.map((taskEvent: TaskCloudEngineEvent) => {
|
result.map((taskEvent: TaskCloudEngineEvent) => {
|
||||||
this.checkFilterCounter(taskEvent.entity);
|
this.checkFilterCounter(taskEvent.entity);
|
||||||
});
|
});
|
||||||
this.filterCounterUpdated.emit(result);
|
|
||||||
|
if (this.updatedCounters.length) {
|
||||||
|
this.updateFilterCounters();
|
||||||
|
this.filterCounterUpdated.emit(result);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,10 +118,6 @@ export class TaskFiltersCloudComponent extends BaseTaskFiltersCloudComponent imp
|
|||||||
this.addToUpdatedCounters(filter.key);
|
this.addToUpdatedCounters(filter.key);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.updatedCounters.length) {
|
|
||||||
this.updateFilterCounters();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isFilterPresent(filter: TaskFilterCloudModel, filterNotification: TaskDetailsCloudModel): boolean {
|
isFilterPresent(filter: TaskFilterCloudModel, filterNotification: TaskDetailsCloudModel): boolean {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user