Improve chart performance (#7360)
* wip * wip * wip * wip * wip * Update chart.ts * wip * Improve server performance * wip * wip
This commit is contained in:
parent
0d19c2d42e
commit
4f249159d3
32 changed files with 889 additions and 161 deletions
|
@ -18,6 +18,18 @@ export default class PerUserReactionsChart extends Chart<PerUserReactionsLog> {
|
|||
return {};
|
||||
}
|
||||
|
||||
@autobind
|
||||
protected aggregate(logs: PerUserReactionsLog[]): PerUserReactionsLog {
|
||||
return {
|
||||
local: {
|
||||
count: logs.reduce((a, b) => a + b.local.count, 0),
|
||||
},
|
||||
remote: {
|
||||
count: logs.reduce((a, b) => a + b.remote.count, 0),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@autobind
|
||||
protected async fetchActual(group: string): Promise<DeepPartial<PerUserReactionsLog>> {
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue