File tree Expand file tree Collapse file tree 7 files changed +232
-91
lines changed Expand file tree Collapse file tree 7 files changed +232
-91
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ struct RunningVMListItem: View {
2929
3030 func shutdown( ) {
3131 Task {
32- try await slot. stopVirtualMachine ( )
32+ try await slot. stop ( )
3333 }
3434 }
3535
Original file line number Diff line number Diff line change @@ -6,17 +6,17 @@ struct VMListItem: View {
66 var slot : VirtualMachineSlot
77
88 var body : some View {
9- switch slot. status {
9+ switch slot. state {
1010 case . empty: EmptyVMListItem ( slot: slot)
11- case . starting( let launchConfiguration) :
11+ case . starting( let launchConfiguration, _ ) :
1212 PendingVMListItem (
1313 launchConfiguration: launchConfiguration,
1414 slot: slot
1515 )
16- case . running( let launchConfiguration , let ipAddress ) :
16+ case . running( let virtualMachine ) :
1717 RunningVMListItem (
18- launchConfiguration: launchConfiguration ,
19- ipAddress: ipAddress ,
18+ launchConfiguration: virtualMachine . config ,
19+ ipAddress: virtualMachine . ip ,
2020 slot: slot
2121 )
2222 case . stopping:
Original file line number Diff line number Diff line change @@ -50,11 +50,11 @@ extension VMHost: HostmgrServerDelegate {
5050 Logger . helper. log ( " Received stop request for \( handle) " )
5151
5252 if self . primaryVMSlot. isConfiguredForHandle ( handle) {
53- try await primaryVMSlot. stopVirtualMachine ( )
53+ try await primaryVMSlot. stop ( )
5454 }
5555
5656 if self . secondaryVMSlot. isConfiguredForHandle ( handle) {
57- try await secondaryVMSlot. stopVirtualMachine ( )
57+ try await secondaryVMSlot. stop ( )
5858 }
5959 }
6060
@@ -63,8 +63,8 @@ extension VMHost: HostmgrServerDelegate {
6363
6464 repeat {
6565 do {
66- try await self . primaryVMSlot. stopVirtualMachine ( )
67- try await self . secondaryVMSlot. stopVirtualMachine ( )
66+ try await self . primaryVMSlot. stop ( )
67+ try await self . secondaryVMSlot. stop ( )
6868 return
6969 } catch {
7070 try await Task . sleep ( for: . seconds( 1 ) )
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ struct VMWindowContent: View {
1010 }
1111
1212 var body : some View {
13- switch vmSlot. status {
13+ switch vmSlot. state {
1414 case . empty: Text ( " VM not running " )
1515 case . starting: ProgressView ( )
16- case . running: VirtualMachineDisplayView ( virtualMachine: vmSlot . managedVirtualMachine ? . machine)
16+ case . running( let virtualMachine ) : VirtualMachineDisplayView ( virtualMachine: virtualMachine . machine)
1717 . onAppear {
1818 NSApp . setActivationPolicy ( . regular)
1919 NSApp . activate ( ignoringOtherApps: true )
You can’t perform that action at this time.
0 commit comments