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

Project Dropdown in Dashboard takes minutes to load #9679

Open
btzq opened this issue Sep 13, 2024 · 13 comments · Fixed by #9711
Open

Project Dropdown in Dashboard takes minutes to load #9679

btzq opened this issue Sep 13, 2024 · 13 comments · Fixed by #9711
Assignees

Comments

@btzq
Copy link

btzq commented Sep 13, 2024

ISSUE TYPE
  • Bug Report
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.19.1.1
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

When logging in as Admin, Domain Admin or User, when clicking on the Project Drop down, it doesnt display info at first.

Screenshot 2024-09-13 at 9 15 21 PM

It shows 0 for a long time (around 30s-1min) in order for the project list to be fully loaded.

But after loading, if you click on the dropdown again, it shows 0 again.

STEPS TO REPRODUCE
1. Login to Cloudstack Dashboard
2. Select 'Project' dropdown
3. Notice it display 0 and No Data
4. Wait for 30s-1min and the project list will be loaded
EXPECTED RESULTS
Project Dropdown to load faster (eg. 1-3 seconds)
ACTUAL RESULTS
Project Dropdown takes 30s-1min to load
@DaanHoogland
Copy link
Contributor

@btzq , how many projects and project members do you have?

@btzq
Copy link
Author

btzq commented Sep 16, 2024

@btzq , how many projects and project members do you have?

Only around 20 Projects. I dont think its alot.
As for accounts, you can assume 1 Account for 1 Project.

@DaanHoogland
Copy link
Contributor

@btzq I tried to reproduce it but my list filles within a second, of course this is a lab enironment so extra conditions may be needed to reproduce this. Our dev-lab has 72 projects atm and is very dynamically changing this number. It also has no problems displaying the dropdown within a second in a new private window. The logging on process takes more time so not disturbing at all. I think you'll need to investigate more.

@btzq
Copy link
Author

btzq commented Sep 17, 2024

@DaanHoogland ive recorded a video of what im seeing.

ProjectLoadLong.mov

Notice That:

  • Before opening, it shows 0, with a loading icon on the right
  • It loads for 45 seconds, even after opening and closing
  • When it loads, and i scroll, you can see theres not many projects.

Strangely, our login process is very fast. No lags there.

Just the Project Dropdown is slow.

Which version are you using? Could it be you guys are using a newer version that has this issue resolved?

@DaanHoogland
Copy link
Contributor

Which version are you using? Could it be you guys are using a newer version that has this issue resolved?

4.19.1.0-SNAPSHOT it is from just before the 4.19.1 release, I'll update it and try again. I do see the same as you but for less than a second.

@DaanHoogland
Copy link
Contributor

now tried 4.19.2.0-SNAPSHOT from last night and also it loads almost instantly, sorry @btzq . Can you see any strangities in the console log of the browser?

@btzq
Copy link
Author

btzq commented Sep 18, 2024

@DaanHoogland does this help?

Note, ive turned off my adblocker just in case. But results still the same.

Screenshot 2024-09-18 at 9 54 59 PM Screenshot 2024-09-18 at 9 54 08 PM

@weizhouapache
Copy link
Member

probably a simple fix

diff --git a/ui/src/components/header/ProjectMenu.vue b/ui/src/components/header/Proj
+ectMenu.vue
index e2f365344d9..c55db5ff925 100644
--- a/ui/src/components/header/ProjectMenu.vue
+++ b/ui/src/components/header/ProjectMenu.vue
@@ -81,7 +81,7 @@ export default {
       const projects = []
       const getNextPage = () => {
         this.loading = true
-        api('listProjects', { listAll: true, page: page, pageSize: 500, showIcon: tr
+ue }).then(json => {
+        api('listProjects', { listAll: true, page: page, pageSize: 500, showIcon: tr
+ue, details: 'min' }).then(json => {
           if (json?.listprojectsresponse?.project) {
             projects.push(...json.listprojectsresponse.project)
           }

@weizhouapache weizhouapache self-assigned this Sep 19, 2024
@weizhouapache
Copy link
Member

I will try to reproduce the issue and verify the fix
assigned to myself

@weizhouapache
Copy link
Member

@btzq
can you run the following commands on mgmt server if you have downloaded cmk ?

time cmk list projects listall=true filter=id,name >/dev/null
time cmk list projects listall=true filter=id,name details=min >/dev/null

@btzq
Copy link
Author

btzq commented Sep 19, 2024

@weizhouapache here you go

WhatsApp Image 2024-09-19 at 11 30 52 PM

First command take around 36sec
Second command take 0.4sec+

@weizhouapache
Copy link
Member

@weizhouapache here you go

WhatsApp Image 2024-09-19 at 11 30 52 PM

First command take around 36sec
Second command take 0.4sec+

@btzq
if so, I think #9711 is what you need

@btzq
Copy link
Author

btzq commented Sep 19, 2024

Awesome, thanks @weizhouapache !

@JoaoJandre JoaoJandre linked a pull request Sep 19, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants