-
Notifications
You must be signed in to change notification settings - Fork 3
gui: send txn counts, boot timestamp #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
3d5762d
to
261b05d
Compare
@@ -324,7 +325,7 @@ function SlotCardRow({ slot, active }: SlotCardRowProps) { | |||
className={`${styles.rowText} ${active ? styles.active : ""}`} | |||
align="right" | |||
> | |||
{getText(values?.nonVoteTxns)} | |||
{getText(values?.userTxns)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to do any renaming on the labels to user txn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right nonVote is more clear
query.response?.publish.success_user_transaction_cnt && | ||
query.response?.publish.success_vote_transaction_cnt | ||
? query.response?.publish.success_user_transaction_cnt + | ||
query.response?.publish.success_vote_transaction_cnt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in getLinks
there is a success = totalTransactions - failedTransactions
. Here totalTransactions
is now only success_vote + success_user
not including failed. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea your're right
@@ -119,6 +130,11 @@ function SlotStats() { | |||
|
|||
if (!selectedSlot) return; | |||
|
|||
// right-align txn counts by inserting invisible numbers as padding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're trying to left align by putting invisible text afterwards? Why do we want a different alignment than how it is currently? Think we can probably get it aligned without invisible text too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going for displaying all 4 counts in the slot progression card. I think I'll just revert the visual change and let you guys figure it out since this stuff isn't my strong suit lol
export const uptimeAtom = atom< | ||
{ uptimeNanos: UptimeNanos; ts: DateTime } | undefined | ||
export const startupTimeAtom = atom< | ||
{ startupTimeNanos: StartupTimeNanos } | undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it now sends a constant start time vs a moving uptime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, this would be for the timestamp we put on the tooltip when we hover over the green flag.
88dbeb5
to
4d3a278
Compare
@@ -153,9 +164,20 @@ function SlotStats() { | |||
<RowSeparator my="0" /> | |||
</div> | |||
<Text>Vote Transactions</Text> | |||
<Text align="right">{values?.voteTxns?.toLocaleString() ?? "-"}</Text> | |||
<Text align="right"> | |||
{(values?.failedVoteTxns != null && values?.successfulVoteTxns != null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just values
that can be undefined? Not the actual values failedVoteTxns
and successfulVoteTxns
. So just check for values ? ... : undefined
. Since how this looks is that if only one of the 2 are null then it'll just not show a value vs showing the remaining. Same below for nonvote
query.response?.publish?.success_nonvote_transaction_cnt != null && | ||
query.response?.publish?.success_vote_transaction_cnt != null && | ||
query.response?.publish?.failed_vote_transaction_cnt && | ||
query.response?.publish?.failed_nonvote_transaction_cnt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do need to check for != null
vs just truthy since they can be 0, same below. Just var out the failed above it'll read clearer const failedTransactions = ...
4d3a278
to
e0b622f
Compare
query.response?.publish.failed_nonvote_transaction_cnt != null && | ||
query.response?.publish.failed_vote_transaction_cnt != null | ||
? query.response?.publish.failed_nonvote_transaction_cnt + | ||
query.response?.publish.failed_vote_transaction_cnt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit but don't think you need the ?
here anymore after the previous check, unless typescript can't see it for some reason. Same above
e0b622f
to
d737d34
Compare
No description provided.