meshery icon indicating copy to clipboard operation
meshery copied to clipboard

[UI] Registry: Same model count is reported for each Registrant

Open leecalcote opened this issue 1 year ago • 15 comments

Current Behavior

All registrants have the same model count.

Expected Behavior

The model counts in parentheses should not be the same between registrants. https://playground.meshery.io/api/meshmodels/registrants This endpoint is intended to display the count.

Screenshots/Logs

Screenshot 2024-10-04 at 2 21 03 PM

Environment

  • Host OS: Mac Linux Windows
  • Platform: Docker or Kubernetes
  • Meshery Server Version: stable-v
  • Meshery Client Version: stable-v

Contributor Guides and Handbook

leecalcote avatar Oct 04 '24 19:10 leecalcote

This issue has been labeled with 'component/ui'. 🧰 Here are docs on Contributing to Meshery UI. 🎨 Here is the Meshery UI Figma File File. Lastly, here are docs on Contributing to Meshery's End-to-End Tests.


        Be sure to join the community, if you haven't yet and please leave a :star: star on the project :smile:

github-actions[bot] avatar Oct 04 '24 19:10 github-actions[bot]

I want to work on this, @leecalcote can you please assign me

prachinandi avatar Oct 04 '24 19:10 prachinandi

@prachinandi, sounds great. Thanks much for jumping in and volunteering. In an effort to help guarantee your success in undertaking assignment of the issue, will you:

  1. confirm that you're able to build the project, specifically, the components necessary to resolve this issue.
  2. confirm the approach you intend to take to resolve the issue.

leecalcote avatar Oct 04 '24 21:10 leecalcote

@prachinandi, sounds great. Thanks much for jumping in and volunteering. In an effort to help guarantee your success in undertaking assignment of the issue, will you:

  1. confirm that you're able to build the project, specifically, the components necessary to resolve this issue.
  2. confirm the approach you intend to take to resolve the issue.

Yes @leecalcote I have almost set up the project locally, have some issues in build trying to resolve it actually.

And regarding the approach I think it might be a simple fix. If the API is returning correct model count the issue might be in the frontend in displaying this data. (Chances that the data mapped from API to frontend is incorrect not sure).

If the issue is with API then need to check the backend logic, that if you can confirm that what response are we getting?

prachinandi avatar Oct 05 '24 22:10 prachinandi

I got this issue "unable to download meshery.tar.gz file from https://github.com/meshery/meshery/releases/download/v0.7.114/mesheryctl_0.7.114_Darwin_arm64.tar.gz. Set MESHERY_VERSION environment variable to a different version and re-run. For example: export MESHERY_VERSION=v0.1.6" when I try to deploy in docker

prachinandi avatar Oct 05 '24 22:10 prachinandi

@leecalcote if no one working, i would like to take this one. Screenshot 2024-10-11 182601 I think it will have to display the model count according to model count mentioned in summary for that individual registrant(e.g-534 for Artifact Hub) in advance details section which is the fetched data.But it is mentioning the global count of model which is common for all the registrants making them all same. Let me know if I am wrong anywhere.

Aryan4884 avatar Oct 11 '24 13:10 Aryan4884

@Aryan4884 how's your Golang and your React? Are you comfortable with both or one more than the next or neither?

leecalcote avatar Oct 11 '24 13:10 leecalcote

@prachinandi, my apologies, I completely missed your prior messages. Do post on https://discuss.layer5.io, if you're still experiencing challenges getting setup.

leecalcote avatar Oct 11 '24 13:10 leecalcote

@leecalcote I have an experience of 1.5 years in React and a beginner in Golang.

Aryan4884 avatar Oct 11 '24 20:10 Aryan4884

@Aryan4884, ok, very good. Depending upon what you find, it might be the API (golang) that needs ultimately enhanced or it might just be the client's handling of the responses. Aggregation and computation should be (must be) handled server-side. Let me (and the other contributors) know what you find. 👍

leecalcote avatar Oct 11 '24 20:10 leecalcote

@Aryan4884 whats the progress? Its an urgent item.

sudhanshutech avatar Oct 17 '24 13:10 sudhanshutech

@Yashsharma1911, help, help. 🙏

leecalcote avatar Oct 17 '24 13:10 leecalcote

@leecalcote Sorry for inconvenience caused ,wasn't aware that this issue is an urgent one. I am new to the codebase and having little hard time in getting through it.I will let u know as soon as I make any progress.In the mean time, since its an urgent one ,u may unassign me and assign others who can solve this quickly.

Aryan4884 avatar Oct 17 '24 18:10 Aryan4884

@leecalcote i tried to resolve this issue the problem is that each registrants type has some models count but this models count contains the data of all types of registrants. so i have filtered the models based on the kind(artifacthub,meshery and etc...) of the registrants. so it is showing correct result.

screenshot Screenshot 2024-10-18 at 1 07 27 AM

kingdarabahmad avatar Oct 17 '24 19:10 kingdarabahmad

@leecalcote @sudhanshutech should i proceed with the solution or not??

kingdarabahmad avatar Oct 19 '24 08:10 kingdarabahmad

@leecalcote @sudhanshutech please assign this to me.

eyeaadil avatar Oct 30 '24 19:10 eyeaadil

@leecalcote i tried to resolve this issue the problem is that each registrants type has some models count but this models count contains the data of all types of registrants. so i have filtered the models based on the kind(artifacthub,meshery and etc...) of the registrants. so it is showing correct result.

screenshot Screenshot 2024-10-18 at 1 07 27 AM

Thanks, everyone for raising your hand on this issue, @kingdarabahmad incase you have changes already please feel free to raise a quick PR for review and if possible by today.

Considering the urgency, I'll start working on this issue by this morning or afternoon in case we don't get a response.

Yashsharma1911 avatar Oct 31 '24 21:10 Yashsharma1911