* 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>
- Use a plain list to store update alerts and, where possible, fire a collection
change event only after a bulk change and not every time a single object is added
or removed.
- Fixed issue where dismissed updates were stored in the config of all connected
pools, even of those where the update did not apply.
- Corrected RBAC checks for update dismissal.
- Fixed enabled state of dismiss buttons.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
The Title and Description of HotfixEligibilityAlert involve calculation of local
time which should be done on the UI thread, otherwise the time is not localised
correctly, and additionally the application crashes when dismissing or sorting
these alerts.
Also, stop spamming the logs with each alert removal; code efficiency correction.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
it was only used when logging and only for the updates; using the Description in
its place should be adequate. Fixed bug in the formatting of XenCenterUpdateAlert.Description
and removed duplicate logging when dismissing an alert.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
applies to the latter. Converted methods from AlertSummaryPage to one Alert and
one String extension method so they can be used more widely. Code simplification
on the Updates page.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@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>