* CP-36392: Add several `null` checks
All were flagged by SonarQube
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Specify `namespace` for `SettingsUpdate`
Added to `XenAdmin`
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Collapse useless condition check
Also use pattern matching for type cast
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Specify `namespace` for `ProduceConsumerQueue`
Add to `XenAdmin.Actions`
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Rename field in `BugToolPageSelectCapabilties` to avoid name clash
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Add explicit `null` check
While the `null` check in `GraphDetailsDialog.cs` is not strictly necessary, it has been added to fix a SonarQube issue
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Remove unused field in `WlbPoolConfiguration.cs`
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Replace useless self-assignment with ad-hoc method
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Simplify dictionary key assignment in `WlbScheduledTask.cs`
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Fix minor formatting issues
Add newline at end of file, and reformat content of if statement
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Tidy up latest flagged bugs changes
- Fix whitespace/braces in a few affected files
- Add missing null check in `ValueMaps.cs`
- Check for args length in `RbacCollectorProxy.cs`
- Fix logic in `MainWindow.cs` to revert to previous behaviour
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
* CP-36392: Tidy up setter in `ChangeableList.cs`
Also update whitespace inconsitencies in `PerfmonAlertEditPage.cs` and `VMHAEditPage.cs`
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Removed ApplyLicenseEditionCommand as it was unnecessary (there was no
button/menuitem calling it). Use the ApplyLicenseEditionAction instead.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
prevent them from being serialised alongside the API properties. This will also
be useful for moving the API bindings out of XenModel.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Try to match the alerts by message type, not by title, because for pooled hosts the title contains the host name followed by the friendly name, while for standalone hosts the host name is not included
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Setting Host or Pool on the ApplyLicenseEditionAction when there is one XenObject in the list
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
The problem was that the License Manager was listening to PropertyChanged events on the master only, not on slaves.
When the master's properties change (e.g. edition) we update the row in the license manager; but in some cases a slave (or more) hasn't been updated yet (as it may be updated in another event.from) and we think that the pool is partially updated.
Our solution is to listen to Host BatchCollectionChanged event, which is triggered once per cache update for the host collection (it any property changed for any of the hosts).
The sleep in the ApplyLicenseEditionAction is not needed anymore, nor is the extra call to update the cell after the action is completed, because the cell is getting updated correctly on the BatchCollectionChanged event.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
The reason for the error dialog appearing behind License Manager dialog was that we used MainWindow as parent of the Licensing Error dialog (in ShowLicensingFailureDialog method in ApplyLicenseEditionCommand)
and there were already 3 other modal dialogs displayed one on top of each other: License Manager, Apply License and Action Progress.
Fixed by calling the ShowLicensingFailureDialog from the command, on action.Completed event (instead of action.Run) and passing the Parent as a parameter, so that we can use the correct parent when displaying the error dialog.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
used to access the alerts list. The list itself should be private as there is a
risk to access it and forgetting to use the lock.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
1. Updated XenModel.csproj following update to XenAPI.
2. Host.apply_edition requires three parameters now: pass false in the last parameter (_force parameter).
Signed-off-by: Adrian Jachacy <Adrian.Jachacy@citrix.com>