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 {
|
import {
|
||||||
assign,
|
assign,
|
||||||
concat,
|
concat,
|
||||||
differenceWith,
|
differenceBy,
|
||||||
filter,
|
filter,
|
||||||
forEach,
|
forEach,
|
||||||
isEqual,
|
|
||||||
isFinite,
|
isFinite,
|
||||||
map,
|
map,
|
||||||
orderBy,
|
orderBy,
|
||||||
@ -170,8 +169,8 @@ function conputePercentage (curr, prev, options) {
|
|||||||
|
|
||||||
function getDiff (oldElements, newElements) {
|
function getDiff (oldElements, newElements) {
|
||||||
return {
|
return {
|
||||||
added: differenceWith(oldElements, newElements, isEqual),
|
added: differenceBy(oldElements, newElements, 'uuid'),
|
||||||
removed: differenceWith(newElements, oldElements, isEqual)
|
removed: differenceBy(newElements, oldElements, 'uuid')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user