fix: stats panel can fail to load when an incomplete operation is in the log

This commit is contained in:
garethgeorge
2024-09-15 12:27:23 -07:00
parent 4da9d89749
commit d59c6fc1be
+5 -1
View File
@@ -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!),