Closed asxnlabs closed 4 months ago
Thanks. Looks like many of the buttons, functions, data and features are still under development. I've updated the request to 5,000 weights instead of 50,000. Looking forward to seeing the fully functional version of the website.
Contributions
[MRI 7] Morpheus-Lumerin Marketplace Dashboard Development:
Re-submission of #294
PR Update:
We have reduced the weights as, Due to the pending major upgrade to the Session Contract, essential data for graphs, tables, and cards in the Marketplace UI (such as Total Sessions, Avg. Response Time, No. of Active Sessions, MOR Earned, Closeout Report, and IPS) is currently unavailable. To enhance the dashboard's visual appeal, we have used dummy data in the backend as placeholders. This approach allows for the seamless integration of actual data once the upgrade is complete, as the backend endpoints are already correctly formatted. Once the contracts are upgraded, we will rapidly integrate the data from these into the hosted dashboard and update the codebase.
Here is a detailed explanation of how and where the Dashboard is fetching data from, for each component and card:
Dynamic Data from Node Contracts:
Home Page - Registered Providers Card: Retrieves data from the
getProviderCount()
method of theProviderRegistry
contract on the Lumerin Node.Home Page - Available Models Card: Gathers data from the
getModelCount()
method of theModelRegistry
contract on the Lumerin Node.Home Page - Marketplace Data Table: Fetches all models using the
modelGetAll()
method from theModelRegistry
contract, storing each model'smodelAgentId
as a mapping. Using theMarketplace
contract'sgetActiveBidsByModelAgent()
method, it retrieves thepricePerSecond
bids and provider addresses, stores this data with a complex mapping, and displays it in the Marketplace Table.Provider Page - Hosted Models Card: Utilizes the
getActiveBidsByProvider()
method of theMarketplace
contract to list models hosted by a particular provider address.Static Data:
These are data points with constant or unchanging values:
Home Page - Next Disbursement Timer Card: Calculates the time until the next disbursement, scheduled for 0 GMT.
Home Page - Morpheus Token Distribution Card: Displays the official token distribution breakdown for Capital, Code, Compute and Community Providers, and the Protection Fund using a donut chart.
Home Page - Updates Card (WIP): Currently uses sample data for alerts and community updates for Compute Providers. Dynamic alerts or updates will be integrated once the node is live, or this card can present other relevant data.
Home Page - Compute Provider Emissions Card: Refers to the documentation for Compute Node and Emissions and plots a graph for users to visualize Compute Provider Emissions.
Dummy Data:
Due to the pending major upgrade to the Session Contract, essential data for graphs, tables, and cards in the Marketplace UI (such as Total Sessions, Avg. Response Time, No. of Active Sessions, MOR Earned, Closeout Report, IPS) is currently unavailable. We have used dummy data in the backend as placeholders to enhance the dashboard's visual appeal. This approach allows us to quickly integrate actual data once the upgrade is complete, as the backend endpoints are already formatted correctly.
Models Page:
Model Graph: Utilizes dummy data from the backend API for Avg Daily Sessions vs. Active Sessions until the Session Contract is upgraded to provide live data.
Model Providers Table: Uses dummy data for Total Sessions Completed, Model Sessions Completed, and Avg. Response Time until the Node smart contracts are upgraded.
Providers Page:
Hosted Models Graph: Displays Avg. Response Time vs. Avg. Daily IPS using dummy data until the Session Contract is upgraded.
Hosted Models Earnings Table: Relies on dummy data for Total Sessions, Avg. Response Time, No. of Active Sessions, and MOR Earned until the Session Contract is upgraded.
Upcoming MOR Payout Card: Uses dummy data until the Session Contract upgrade provides live data for Upcoming MOR Payout.
Contributions
Pull Request: Added Nirmaan Dashboard : Backend and Frontend