Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Jan 20, 2025
1 parent a93191b commit bd9bbfd
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions CountItems/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,28 @@ function consolidateDataMetrics(target, source) {
return resTarget;
}
const { usedCapacity, objectCount, accountOwnerID } = source;
resTarget.usedCapacity.current += usedCapacity && usedCapacity.current ? BigInt(usedCapacity.current) : BigInt(0);
resTarget.usedCapacity.nonCurrent += usedCapacity && usedCapacity.nonCurrent ? BigInt(usedCapacity.nonCurrent) : BigInt(0);
resTarget.usedCapacity._currentCold += usedCapacity && usedCapacity._currentCold ? BigInt(usedCapacity._currentCold) : BigInt(0);
resTarget.usedCapacity._nonCurrentCold += usedCapacity && usedCapacity._nonCurrentCold ? BigInt(usedCapacity._nonCurrentCold) : BigInt(0);
resTarget.usedCapacity._currentRestoring += usedCapacity && usedCapacity._currentRestoring ? BigInt(usedCapacity._currentRestoring) : BigInt(0);
resTarget.usedCapacity._currentRestored += usedCapacity && usedCapacity._currentRestored ? BigInt(usedCapacity._currentRestored) : BigInt(0);
resTarget.usedCapacity._nonCurrentRestoring += usedCapacity && usedCapacity._nonCurrentRestoring ? BigInt(usedCapacity._nonCurrentRestoring) : BigInt(0);
resTarget.usedCapacity._nonCurrentRestored += usedCapacity && usedCapacity._nonCurrentRestored ? BigInt(usedCapacity._nonCurrentRestored) : BigInt(0);
resTarget.usedCapacity._incompleteMPUParts += usedCapacity && usedCapacity._incompleteMPUParts ? BigInt(usedCapacity._incompleteMPUParts) : BigInt(0);
resTarget.usedCapacity.current += usedCapacity && usedCapacity.current ? usedCapacity.current : BigInt(0);
resTarget.usedCapacity.nonCurrent += usedCapacity && usedCapacity.nonCurrent ? usedCapacity.nonCurrent : BigInt(0);
resTarget.usedCapacity._currentCold += usedCapacity && usedCapacity._currentCold ? usedCapacity._currentCold : BigInt(0);
resTarget.usedCapacity._nonCurrentCold += usedCapacity && usedCapacity._nonCurrentCold ? usedCapacity._nonCurrentCold : BigInt(0);
resTarget.usedCapacity._currentRestoring += usedCapacity && usedCapacity._currentRestoring ? usedCapacity._currentRestoring : BigInt(0);
resTarget.usedCapacity._currentRestored += usedCapacity && usedCapacity._currentRestored ? usedCapacity._currentRestored : BigInt(0);
resTarget.usedCapacity._nonCurrentRestoring += usedCapacity && usedCapacity._nonCurrentRestoring ? usedCapacity._nonCurrentRestoring : BigInt(0);
resTarget.usedCapacity._nonCurrentRestored += usedCapacity && usedCapacity._nonCurrentRestored ? usedCapacity._nonCurrentRestored : BigInt(0);
resTarget.usedCapacity._incompleteMPUParts += usedCapacity && usedCapacity._incompleteMPUParts ? usedCapacity._incompleteMPUParts : BigInt(0);

resTarget.objectCount.current += objectCount && objectCount.current ? BigInt(objectCount.current) : BigInt(0);
resTarget.objectCount.nonCurrent += objectCount && objectCount.nonCurrent ? BigInt(objectCount.nonCurrent) : BigInt(0);
resTarget.objectCount.deleteMarker += objectCount && objectCount.deleteMarker ? BigInt(objectCount.deleteMarker) : BigInt(0);
resTarget.objectCount._currentCold += objectCount && objectCount._currentCold ? BigInt(objectCount._currentCold) : BigInt(0);
resTarget.objectCount._nonCurrentCold += objectCount && objectCount._nonCurrentCold ? BigInt(objectCount._nonCurrentCold) : BigInt(0);
resTarget.objectCount._currentRestoring += objectCount && objectCount._currentRestoring ? BigInt(objectCount._currentRestoring) : BigInt(0);
resTarget.objectCount._currentRestored += objectCount && objectCount._currentRestored ? BigInt(objectCount._currentRestored) : BigInt(0);
resTarget.objectCount._nonCurrentRestoring += objectCount && objectCount._nonCurrentRestoring ? BigInt(objectCount._nonCurrentRestoring) : BigInt(0);
resTarget.objectCount._nonCurrentRestored += objectCount && objectCount._nonCurrentRestored ? BigInt(objectCount._nonCurrentRestored) : BigInt(0);
resTarget.objectCount._incompleteMPUUploads += objectCount && objectCount._incompleteMPUUploads ? BigInt(objectCount._incompleteMPUUploads) : BigInt(0);
resTarget.objectCount.current += objectCount && objectCount.current ? objectCount.current : BigInt(0);
resTarget.objectCount.nonCurrent += objectCount && objectCount.nonCurrent ? objectCount.nonCurrent : BigInt(0);
resTarget.objectCount.deleteMarker += objectCount && objectCount.deleteMarker ? objectCount.deleteMarker : BigInt(0);
resTarget.objectCount._currentCold += objectCount && objectCount._currentCold ? objectCount._currentCold : BigInt(0);
resTarget.objectCount._nonCurrentCold += objectCount && objectCount._nonCurrentCold ? objectCount._nonCurrentCold : BigInt(0);
resTarget.objectCount._currentRestoring += objectCount && objectCount._currentRestoring ? objectCount._currentRestoring : BigInt(0);
resTarget.objectCount._currentRestored += objectCount && objectCount._currentRestored ? objectCount._currentRestored : BigInt(0);
resTarget.objectCount._nonCurrentRestoring += objectCount && objectCount._nonCurrentRestoring ? objectCount._nonCurrentRestoring : BigInt(0);
resTarget.objectCount._nonCurrentRestored += objectCount && objectCount._nonCurrentRestored ? objectCount._nonCurrentRestored : BigInt(0);
resTarget.objectCount._incompleteMPUUploads += objectCount && objectCount._incompleteMPUUploads ? objectCount._incompleteMPUUploads : BigInt(0);

resTarget.usedCapacity._inflightsPreScan += usedCapacity && usedCapacity._inflightsPreScan ? BigInt(usedCapacity._inflightsPreScan) : BigInt(0);
resTarget.usedCapacity._inflightsPreScan += usedCapacity && usedCapacity._inflightsPreScan ? usedCapacity._inflightsPreScan : BigInt(0);
if (accountOwnerID) {
resTarget.accountOwnerID = accountOwnerID;
}
Expand Down

0 comments on commit bd9bbfd

Please sign in to comment.