mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-09-25 17:35:45 +00:00
fix: stats panel can fail to load when an incomplete operation is in the log
This commit is contained in:
@@ -50,13 +50,17 @@ const StatsPanel = ({ repoId }: { repoId: string }) => {
|
||||
);
|
||||
}
|
||||
|
||||
const statsOperations = operations.filter((v) => {
|
||||
return v.op.case === "operationStats" && v.op.value.stats;
|
||||
});
|
||||
|
||||
const dataset: {
|
||||
time: number;
|
||||
totalSizeBytes: number;
|
||||
compressionRatio: number;
|
||||
snapshotCount: number;
|
||||
totalBlobCount: number;
|
||||
}[] = operations.map((op) => {
|
||||
}[] = statsOperations.map((op) => {
|
||||
const stats = (op.op.value! as OperationStats).stats!;
|
||||
return {
|
||||
time: Number(op.unixTimeEndMs!),
|
||||
|
||||
Reference in New Issue
Block a user