Skip to content

Commit

Permalink
UI: Fix slot page screen (#1430)
Browse files Browse the repository at this point in the history
The slot and activity page became centered via #1418 
This PR restores it to its original state
Also portrays slot graph in GB not MB
  • Loading branch information
Amogh-Bharadwaj authored Mar 4, 2024
1 parent 1432b4d commit 81c9320
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ui/app/peers/[peerName]/lagGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function LagGraph({ slotNames }: { slotNames: string[] }) {
]);
return lagDataDot.map((data) => ({
time: formatGraphLabel(new Date(data[0]!), timeSince),
'Lag in MB': data[1],
'Lag in GB': parseInt(data[1] || '0', 10) / 1000,
}));
}, [lagPoints, timeSince]);

Expand Down Expand Up @@ -108,8 +108,9 @@ function LagGraph({ slotNames }: { slotNames: string[] }) {
<LineChart
index='time'
data={graphValues}
categories={['Lag in MB']}
categories={['Lag in GB']}
colors={['rose']}
showXAxis={false}
/>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion ui/app/peers/[peerName]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ const PeerData = async ({ params: { peerName } }: DataConfigProps) => {
<div
style={{
padding: '2rem',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
}}
>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
Expand Down

0 comments on commit 81c9320

Please sign in to comment.