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

🐞 [Bug]: Deleting some contracts listed in the current page showing no contracts available while there are many other pages #2889

Closed
1 task done
0oM4R opened this issue Jun 5, 2024 · 2 comments
Assignees
Labels
dashboard type_bug Something isn't working
Milestone

Comments

@0oM4R
Copy link
Contributor

0oM4R commented Jun 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

which package/s did you face the problem with?

Dashboard

What happened?

if you are on the first page of contracts table with page size 5
the you select all the 5 contracts and delete them you will No node contracts found on your account.

Steps To Reproduce

1, create more than 5 node contracts
2. go to contracts table and make the page size 5
3. select all of the 5 listed contracts
4. delete the selected contracts
5. you will see there is no contracts msg while you have another page

which network/s did you face the problem on?

Dev

version

10b2b62

Twin ID/s

1525

Node ID/s

No response

Farm ID/s

No response

Contract ID/s

No response

Relevant screenshots/screen records

Screencast.from.05.2024.EEST.08.03.28.webm

Relevant log output

.
@Mahmoud-Emad
Copy link
Contributor

Issue update

Work done

Enhance the contract list view:

  • Replaced the static values with ref concept to change the value when needed.
  • Cached the nodes to use it when re-request to avoid duplicated requests.
  • Enhanced the list time by using the Promise.all() and displaying what gets finished.
  • Introduced a new hint alert to inform the user that the table will be reloaded in a bit.
  • Replaced the update-options event with the update-page and update-size events to avoid requesting each change that happens on the table and only request when changing the page/size.
  • Created only one function to request to list the contracts based on it's type.
  • Returned the onMounted life cycle and called the 'loadContracts' inside it.
  • Remove the duplicate requests.
  • Updated the getNodeInfo function to request only the nodes that are not cached.

@Mahmoud-Emad Mahmoud-Emad moved this from In Progress to Pending Review in 3.14.x Jun 6, 2024
@Mahmoud-Emad Mahmoud-Emad moved this from Pending Review to In Verification in 3.14.x Jun 6, 2024
@khaledyoussef24
Copy link
Contributor

verified on devnet
version : ad30945
contracts now reloads the page after 8 to 10 seconds
a message and notifications are now popping up to the user to enhance user experience

Image
Image
https://github.com/threefoldtech/tfgrid-sdk-ts/assets/110984055/fb9ee784-5a45-480e-8b24-10a2c73333dc
https://app.testlodge.com/a/26076/projects/40893/suites/234374?expand_section=430129#case_4294999

@khaledyoussef24 khaledyoussef24 moved this from In Verification to Done in 3.14.x Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard type_bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

5 participants