fix(xo-server-usage-report): handle renamed VMs (#3)
This commit is contained in:
parent
b03335eb94
commit
3662f4f256
@ -4,10 +4,9 @@ import { CronJob } from 'cron'
|
||||
import {
|
||||
assign,
|
||||
concat,
|
||||
differenceWith,
|
||||
differenceBy,
|
||||
filter,
|
||||
forEach,
|
||||
isEqual,
|
||||
isFinite,
|
||||
map,
|
||||
orderBy,
|
||||
@ -170,8 +169,8 @@ function conputePercentage (curr, prev, options) {
|
||||
|
||||
function getDiff (oldElements, newElements) {
|
||||
return {
|
||||
added: differenceWith(oldElements, newElements, isEqual),
|
||||
removed: differenceWith(newElements, oldElements, isEqual)
|
||||
added: differenceBy(oldElements, newElements, 'uuid'),
|
||||
removed: differenceBy(newElements, oldElements, 'uuid')
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user