-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
|
||
const fetchIndexerData = () => { | ||
Near.asyncView(`${REPL_REGISTRY_CONTRACT_ID}`, "list_all").then((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.
To be replaced with indexer
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.
LGTM! To confirm my understanding, the new code now does:
- Fetch active indexers using RPC
- Fetch usage data for all indexers from some endpoint
- Pass active indexer list to some component as cards
- 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={() => |
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.
Is this not necessary anymore? I think we use active tab
in various places?
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.
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.
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.