Skip to content

Commit

Permalink
fix: stats panel can fail to load when an incomplete operation is in …
Browse files Browse the repository at this point in the history
…the log
  • Loading branch information
garethgeorge committed Sep 15, 2024
1 parent 4da9d89 commit d59c6fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webui/src/components/StatsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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!),
Expand Down

0 comments on commit d59c6fc

Please sign in to comment.