Skip to content
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

fix: fetch BOS indexerdata from near RPC call and conditionally render metadata if available in databricks #873

Merged
merged 5 commits into from
Jul 17, 2024

Conversation

Kevin101Zhang
Copy link
Contributor

@Kevin101Zhang Kevin101Zhang commented Jul 16, 2024

BOS component data is fetched from NEAR RPC call 'list_all'. We use a map to set a k/v pair for indexer metadata recieved on databricks. When we render each card we check the map to see if the indexer to be rendered from NEAR RPC exist in the map. If it does exist we conditionally render metadata.

@Kevin101Zhang Kevin101Zhang changed the title fix: fixed indexerURL and myindexers fix: fetch BOS indexerdata from near RPC call and conditionally render metadata if available in databricks Jul 17, 2024
@Kevin101Zhang Kevin101Zhang marked this pull request as ready for review July 17, 2024 19:54
@Kevin101Zhang Kevin101Zhang requested a review from a team as a code owner July 17, 2024 19:54

const fetchIndexerData = () => {
Near.asyncView(`${REPL_REGISTRY_CONTRACT_ID}`, "list_all").then((data) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be replaced with indexer

Copy link
Collaborator

@darunrs darunrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! To confirm my understanding, the new code now does:

  1. Fetch active indexers using RPC
  2. Fetch usage data for all indexers from some endpoint
  3. Pass active indexer list to some component as cards
  4. For each card, look at the map of usage data and populate usage if present

Did I get that right?

@@ -175,11 +189,6 @@ return (
<ButtonLink
primary
href={editUrl}
onClick={() =>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not necessary anymore? I think we use active tab in various places?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the state did not exist on the page. I assumed maybe it was a hidden property passed from a parent but i didnt see anything of the sort. Removing it I did not see any differences.

@Kevin101Zhang Kevin101Zhang merged commit 6643318 into main Jul 17, 2024
4 checks passed
@Kevin101Zhang Kevin101Zhang deleted the 872-indexer-nav-links-are-broken branch July 17, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Augment explore indexers page with the number of requests in the past 7 days
2 participants