Skip to content

Commit

Permalink
issue with get hardware info (#180)
Browse files Browse the repository at this point in the history
* fixed an issue where the hardware would be null if only one machine was present

* updated changelog
  • Loading branch information
cjlapao authored Jul 9, 2024
1 parent 16b667d commit acf8910
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

## [0.8.5] - 2024-07-09

### Fixed

- Issue where the hardware info would crash if only one VM was present

## [0.8.4] - 2024-06-19

### Fixed
Expand Down
7 changes: 6 additions & 1 deletion src/serviceprovider/parallelsdesktop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,12 @@ func (s *ParallelsService) RunCustomCommand(ctx basecontext.ApiContext, vm *mode
}

func (s *ParallelsService) GetHardwareUsage(ctx basecontext.ApiContext) (*models.SystemUsageResponse, error) {
result := &models.SystemUsageResponse{}
result := &models.SystemUsageResponse{
TotalInUse: &models.SystemUsageItem{},
TotalReserved: &models.SystemUsageItem{},
SystemReserved: &models.SystemUsageItem{},
Total: &models.SystemUsageItem{},
}

vms, err := s.GetCachedVms(ctx, "")
if err != nil {
Expand Down

0 comments on commit acf8910

Please sign in to comment.