-
Notifications
You must be signed in to change notification settings - Fork 56
feat(frontend): Expose whole pools list #661
Conversation
Your Render PR Server URL is https://near-explorer-frontend-with-indexer-pr-5l2p.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-c34aq3bpekqod0qg9io0. |
ed92d43
to
f7d342a
Compare
2cccbcb
to
8dad62e
Compare
f1b5627
to
852601f
Compare
4640b54
to
ef21314
Compare
The table does not fit and has a horizontal scrollIdeas:
The page is super slowI feel it does too much re-renders, my browser (Firefox) is barely responsive on the page. The telemetry data is missingAdd a tooltip to the flags to display the country nameIt is not realistic that people would know all the flags by heart. |
@frol Hey Vlad! I have finished issues above except of "The telemetry data is missing" because it wasn't reproduced. On my local machine all data is available |
493cf64
to
a7ccb82
Compare
Oh, my bad, indeed 🤦 |
16366d9
to
f01e7da
Compare
@shelegdmitriy The page performance is now reasonable, great job! We need to address the following:
|
adf5404
to
72eef76
Compare
277c950
to
b7c4efb
Compare
@@ -101,13 +101,17 @@ | |||
"component": { | |||
"nodes": { | |||
"Validators": { | |||
"location": "Location", |
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.
Need to translate
"pending": { | ||
"title": "Đang chờ", | ||
"proposal": { | ||
"title": "Proposal", |
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.
Need to translate title, explain text will be same
"title": "Idle", | ||
"text": "idle node" |
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.
Need to translate
"ValidatorTelemetryRow": { | ||
"uptime": { | ||
"title": "Uptime", | ||
"text": "Uptime is estimated by the ratio of the number of produced blocks to the number of expected blocks" | ||
"text": "Uptime is estimated by the ratio of the number of produced blocks to the number of expected blocks.", | ||
"title": "Uptime" | ||
}, | ||
"latest_block": { | ||
"title": "Latest block", | ||
"text": "The block height the validation node reported in the most recent telemetry heartbeat." | ||
"latest_produced_block": { | ||
"text": "The block height the validation node reported in the most recent telemetry heartbeat.", | ||
"title": "Latest block" | ||
}, | ||
"latest_telemetry_update": { | ||
"title": "Latest Telemetry Update", | ||
"text": "Telemetry is a regular notification coming from the nodes which includes generic information like the latest known block height, and the version of NEAR Protocol agent (nearcore)." | ||
"text": "Telemetry is a regular notification coming from the nodes which includes generic information like the latest known block height, and the version of NEAR Protocol agent (nearcore).", | ||
"title": "Latest Telemetry Update" | ||
}, | ||
"node_agent_name": { | ||
"title": "Node Agent Name", | ||
"text": "NEAR Protocol could have multiple implementations, so agent is the name of that implementation, where 'near-rs' is <a href=\"https://github.com/near/nearcore\">the official implementation</a>. " | ||
"text": "NEAR Protocol could have multiple implementations, so agent is the name of that implementation, where 'near-rs' is ${agent_name_url}.", | ||
"url_text": "the official implementation", | ||
"title": "Node Agent Name" | ||
}, | ||
"node_agent_version_or_build": { | ||
"title": "Node Agent Version / Build" | ||
}, | ||
"warning_tip": "Các node xác thực 1 - ${node_tip_max} đang tích lũy stake trên 33%. Việc ký gửi cho những node xác thực bên dưới sẽ cải thiện tính phân tán cho mạng lưới." | ||
} | ||
}, | ||
"ValidatorMetadataRow": { | ||
"pool_info": { |
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.
Need to translate
@@ -101,13 +101,17 @@ | |||
"component": { | |||
"nodes": { | |||
"Validators": { | |||
"location": "Location", |
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.
Need to translate
"pending": { | ||
"title": "待定", | ||
"proposal": { | ||
"title": "Proposal", |
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.
Need to translate only title
"idle": { | ||
"title": "Idle", | ||
"text": "idle node" | ||
} | ||
}, | ||
"same_proposed_stake": "same" |
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.
Need to translate
"ValidatorMetadataRow": { | ||
"pool_info": { | ||
"website": "Web", | ||
"email": "Email", | ||
"twitter": "Twitter", | ||
"discord": "Discord", | ||
"description": "Description" | ||
}, | ||
"pool_info_tip": { | ||
"text": "If you are node owner feel free to fill all ${pool_info_url} to promote your own node!", | ||
"url_text": "data" | ||
} |
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.
Need to translate
84620bc
to
aa1530c
Compare
validatorsList.some((validator: N.ValidationNodeInfo, index: number) => | ||
totalStake && | ||
validator.cumulativeStakeAmount && | ||
validator.cumulativeStakeAmount.gt(totalStake.divn(3)) | ||
? (validatorsList[index].networkHolder = true) | ||
: false | ||
); |
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.
Let's not abuse some
here (mutations inside some
callback function is a way to shoot your leg). In fact, I don't see a need for this networkHolder
flag since you can move this whole condition right to the component render stage.
Boolean(agentVersion) || | ||
Boolean(agentBuild); | ||
|
||
if (isTelemetryAvailable) return 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.
if (isTelemetryAvailable) return null; | |
if (!isTelemetryAvailable) return null; |
: false | ||
); | ||
|
||
// console.log(validatorsList); |
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.
Let's clean it up
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.
@shelegdmitriy Well done! Thanks for improving the code clarity and getting through all the subtle details that are super important for the clear picture and improves visibility of the validators network!
Particulary resolves #646
Test Plan: