CharlesQueiroz commented on issue #7181:
URL: https://github.com/apache/cloudstack/issues/7181#issuecomment-1681869807

   Guys, I was able to reproduce the problem. And it happens because, after you 
create a new project, the project list that is located in the `ProjectMenu.vue` 
component is not updated with this new project, and the code below cannot find 
the project with the ID that has just been created:
   
   <img width="1180" alt="Screenshot 2023-08-17 at 09 26 01" 
src="https://github.com/apache/cloudstack/assets/2192264/83a943ab-46a6-4b80-a02b-cf52f7ecc127";>
   
   
https://github.com/apache/cloudstack/blob/e8b491177f16882879bbcff4bfd7022dd61bae67/ui/src/components/header/ProjectMenu.vue#L80
   
   So, the solution is when the project is created, in some way (that I still 
don't know how), call the fetchData() function of the ProjectMenu.vue component 
so that the recently created project is in the list and JS doesn't return -1.
   
   I tried to create a new global state called ReloadAllProjects and use 
something like (In the `AutogenView.vue` component):
   
   <img width="1008" alt="Screenshot 2023-08-17 at 09 32 39" 
src="https://github.com/apache/cloudstack/assets/2192264/3f75506a-ae12-435c-8e77-b8d281158d15";>
   
   And in the ProjectMenu.vue component:
   
   <img width="1118" alt="Screenshot 2023-08-17 at 09 35 20" 
src="https://github.com/apache/cloudstack/assets/2192264/c77db623-4fc3-447f-b68f-8cd29ff3d44b";>
   
   But it still didn't work (yet). I'm not sure if I'm going in the right 
direction. Please let me know if someone with more experience could guide me if 
this type of solution is consistent or if I have to go in a different direction.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to