File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -823,7 +823,7 @@ <h2>VM List</h2>
823823 < div class ="vm-actions ">
824824 <!-- Dropdown menu for primary actions -->
825825 < div class ="dropdown ">
826- < button class ="dropdown-toggle " @click ="toggleDropdown($event, vm.id ) "
826+ < button class ="dropdown-toggle " @click ="toggleDropdown($event, vm) "
827827 title ="Actions ">
828828 < i class ="fas fa-cog "> </ i >
829829 </ button >
@@ -2079,16 +2079,19 @@ <h3>Derive VM</h3>
20792079 loadVMList ( ) ;
20802080 } ;
20812081
2082- const toggleDropdown = ( event , vmId ) => {
2082+ const toggleDropdown = ( event , vm ) => {
2083+ if ( ! vm . configuration ) {
2084+ loadVMDetails ( vm . id ) ;
2085+ }
20832086 // Close all other dropdowns first
20842087 document . querySelectorAll ( '.dropdown-content' ) . forEach ( dropdown => {
2085- if ( dropdown . id !== 'dropdown-' + vmId ) {
2088+ if ( dropdown . id !== 'dropdown-' + vm . id ) {
20862089 dropdown . classList . remove ( 'show' ) ;
20872090 }
20882091 } ) ;
20892092
20902093 // Toggle the clicked dropdown
2091- const dropdownContent = document . getElementById ( 'dropdown-' + vmId ) ;
2094+ const dropdownContent = document . getElementById ( 'dropdown-' + vm . id ) ;
20922095 dropdownContent . classList . toggle ( 'show' ) ;
20932096
20942097 // Stop event propagation to prevent immediate closing
You can’t perform that action at this time.
0 commit comments