Skip to content

Commit

Permalink
fix parseInt
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Nov 4, 2024
1 parent 30553b4 commit 45d3201
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/app/peers/[peerName]/lagGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function parseLSN(lsn: string): number {
if (!lsn) return 0;
const [lsn1, lsn2] = lsn.split('/');
return Number(
(BigInt(parseInt(lsn1)) << BigInt(32)) | BigInt(parseInt(lsn2))
(BigInt(parseInt(lsn1, 16)) << BigInt(32)) | BigInt(parseInt(lsn2, 16))
);
}

Expand Down Expand Up @@ -135,7 +135,7 @@ export default function LagGraph({ peerName }: LagGraphProps) {
/>
<input
type='button'
value={showLsn ? 'Show LSN' : 'Show Lag'}
value={showLsn ? 'Show Lag' : 'Show LSN'}
onClick={() => setShowLsn((val) => !val)}
/>
<ReactSelect
Expand All @@ -159,7 +159,7 @@ export default function LagGraph({ peerName }: LagGraphProps) {
categories={
showLsn ? ['redoLSN', 'restartLSN', 'confirmedLSN'] : ['Lag in GB']
}
colors={showLsn ? ['maroon', 'red', 'lime'] : ['rose']}
colors={showLsn ? ['orange', 'red', 'lime'] : ['rose']}
showXAxis={false}
/>
)}
Expand Down

0 comments on commit 45d3201

Please sign in to comment.