(vm: VmListItem)
| 1176 | } |
| 1177 | |
| 1178 | function toggleDetails(vm: VmListItem) { |
| 1179 | if (expandedVMs.value.has(vm.id)) { |
| 1180 | expandedVMs.value.delete(vm.id); |
| 1181 | } else { |
| 1182 | // Close all other expanded VMs |
| 1183 | expandedVMs.value.clear(); |
| 1184 | expandedVMs.value.add(vm.id); |
| 1185 | loadVMDetails(vm.id); |
| 1186 | refreshNetworkInfo(vm); |
| 1187 | } |
| 1188 | } |
| 1189 | |
| 1190 | async function refreshNetworkInfo(vm: VmListItem) { |
| 1191 | if (vm.status !== 'running' || !imageFeatures(vm).network_info) { |
nothing calls this directly
no test coverage detected