Commit Graph

7163 Commits

Author SHA1 Message Date
Bengang Yuan
a720105fb9 Rename private instance class fields name, add parameters changing check, etc. 2023-10-24 15:47:40 +01:00
Konstantina Chremmou
794e1f3fbd Some corrections in wording, code style, C# usage, and null checks.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-10-24 15:47:40 +01:00
Konstantina Chremmou
a20ea5ab6e Moved NRPE related files to the same folder.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-10-24 15:47:40 +01:00
Konstantina Chremmou
d941e0f533 Some layout and wording tweaks.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-10-24 15:47:40 +01:00
Bengang Yuan
64c8f43961 CP-44372: Integrate NRPE UI with backend interface 2023-10-24 15:47:40 +01:00
Konstantina Chremmou
56b6a5b26a CA-383650: Removed UI-side-only datasource avg_cpu.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-10-20 17:42:44 +01:00
Konstantina Chremmou
a3e7f4366e CA-381047: Added friendly name for the new capability 'observer'.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-10-20 17:42:34 +01:00
Konstantina Chremmou
972ebf2faa Removed erroneously added backslashes. Generate the xml files without the byte order mark (BOM).
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-10-16 22:47:12 +01:00
Konstantina Chremmou
41c1027c28 Removed ignored test.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-10-06 10:10:56 +01:00
Konstantina Chremmou
efbc55c9b6 CA-383376: Fixed layout issue on the Installation media page of the New VM wizard. Also, disabled unit test for localized resources.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-10-06 00:13:32 +01:00
Danilo Del Busso
afb419af04
CP-44767, CP-44766 & CP-44765: Refactor usage of VM restrictions and add reference_label to OVFs (#3211)
* Tidy up `VM` extension: use `var`
* Tidy up `VM` extension: remove redundant initialisers
* Tidy up `VM` extension: use type keywords when possible
* Tidy up `VM` extension: merge conditional expressions
* Tidy up `VM` extension: remove redundant qualifiers
* Tidy up `VM` extension: remove redundant type arguments
* Tidy up `VM` extension: remove redundant `else`s and parentheses
* Tidy up `VM` extension: fix naming
* Tidy up `VM` extension: misc changes
* Tidy up `VM` extension: use `null` propagation
* Tidy up `VM` extension: fix whitespace
* Tidy up `VM` extension: apply ReSharper Code Cleanup utility
* Tidy up `VM` extension: Fix naming of private string array
* CP-44767: Ignore VM restriction when fetching `MaxVCPUsAllowed`
Instead, fetch the highest available value in all templates for the host.
This means that VMs imported from vhd won't automatically default to `DEFAULT_NUM_VCPUS_ALLOWED`, and that VMs that have been kept across XenServer upgrades won't be limited to the number of vCPUs in their own (possibly outdated) restrictions
* CP-44766: Use value in template with a matching `reference_label` when checking VM restrictions
* Move restriction getters to own region
* CP-44766: Use matching templates to fetch VM restrictions
- Rewrite `GetRestrictions...` methods to perform simpler operations
- Add `GetIntRestrictionValue` and `GetBoolRestrictionValue` wrappers to `GetRestrictionValueFromMatchingTemplate`
- Now all calls to a restrictions first check the template value, with a fall-back to defaults
* CP-44765: Export `reference-label` when generating OVFs
---------

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-09-29 03:45:17 +01:00
Konstantina Chremmou
1c18cbaf21 CP-45372: Bumped branding to v5.3
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-22 16:33:59 +01:00
Danilo Del Busso
8983ce95a2 CA-382850: Catch exception when listing pipe names with invalid characters
Pipes can be created with invalid characters in their names (such as `|`). This results in an exception being thrown when those files are accessed via standard API calls such as `Directory.GetFiles`. Other processes might create these pipes and inadvertently prevent XenCenter from starting altogether.

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-09-22 15:43:08 +01:00
Danilo Del Busso
86fa2f6abf
CA-375900: Prepend \\?\ to file paths when creating streams for archive generation (#3184)
* CA-375900: Prepend `//?/` to file paths when creating streams for archive generation
The string works to enable creation of files with paths larger than 260 characters.
* CA-375900: Add directory support and rename utility method
* Fix whitespace in `ArchiveWriterTest`
* CA-375900: Explicitly enumerate files and directories in `ArchiveWriter`
`Directory.GetFiles` and `Directory.GetDirectories` do not enumerate if paths are longer than 260, even when prepended with `//?/`.
* CA-375900: Add long path tests to `ArchiveWriter`
* CA-375900: Add long path tests to `ArchiveIterator`
* CA-375900: Ensure files are added to folders in archive
* Use a recursive method to add directories and files to archive in `ArchiveIterator`
Also improves progress reporting by basing it on directory count
* Fix typos
* Expand `ArchiveWriterTests` to cover all combinations of directory and path lengths
* Ensure that directories used in recursive `Directory.Delete` calls are using long path format
If files in the directory exceed the 260 character limit, the calls will fail
* Expand `ArchiveIteratorTests` to cover all combinations of directory and path lengths
* Ensure relative path name removes `rootPath`
* Fix typo
* Do not use long paths when importing OVFs
The import uses `DiscUtils` which cannot handle paths prepended with `//?/`
* Remove use of `ToLongWindowsPath` within appliance export
This partially reverts commit 819425855c56c14b937849714b359003465bd2f4.
* Refactoring and some corrections.

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
Co-authored-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-22 15:41:54 +01:00
Konstantina Chremmou
ff0ce939f7 Separated HA and WLB prechecks so the problems can be resolved at the same time.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-19 23:56:22 +01:00
Konstantina Chremmou
884160e779 Simplified the action resolving the WLB-on problem. Also:
Fixed exception handling to avoid unnecessary exception rethrowing and possible cast crash.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-19 23:47:15 +01:00
Konstantina Chremmou
a8fe293c3e CA-383040/XSI-1500: Resume WLB when reverting resolved actions after an update or upgrade.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-19 23:47:14 +01:00
Konstantina Chremmou
9470e20808 Removed obsolete project CFUValidator.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-12 10:11:58 +01:00
Konstantina Chremmou
dbe71838da Updated to SDK v23.25.0.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-12 10:11:58 +01:00
Konstantina Chremmou
451afe6d93 Revert to using the assembly location instead of the assembly Guid.
This prevented running two XenCenters side by side.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-08 20:12:16 +01:00
Konstantina Chremmou
139186d604 Parse unit "percent" (used by pvsaccelerator_space_utilization). Minor tidy.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-08 20:10:14 +01:00
Konstantina Chremmou
3445f5ae03
Merge pull request #3220 from kc284/script
Build script corrections.
2023-09-07 15:42:38 +01:00
Konstantina Chremmou
78073c7123 Missing null check.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-07 15:24:20 +01:00
Konstantina Chremmou
560ebc5a91 Build script corrections.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-07 11:29:54 +01:00
Danilo Del Busso
bba9f43c31
CA-376887: Refactor thread management for ArchiveMaintainer (#3148)
* Tidy up `ArchiveMaintainer`: use naming conventions
* Tidy up `ArchiveMaintainer`: use `var` when possible
* Tidy up `ArchiveMaintainer`: fix typos
* Tidy up `ArchiveMaintainer`: move action methods in own region
* Tidy up `ArchiveMaintainer`: apply code formatting
* Tidy up `ArchiveMaintainer`: remove unused constant/using
* Tidy up `ArchiveMaintainer`: group methods into regions
* Tidy up `ArchiveMaintainer`: remove xmldocs
* Tidy up `ArchiveMaintainer`: miscellaneous changes
* Tidy up `ArchiveMaintainer`: move `NextArchiveDown` to correct `region`
* CA-376887: Use multiple threads to load performance tab data
This commit removes the ad-hoc use of `Thread` and instead relies on `ThreadPool` and `CancellationToken`s to handle multi-threading. To achieve this, `ArchiveMaintainer` instances are now tied to only one `XenObject`. If a user navigates to another Performance tab, a new instance of `ArchiveMaintainer` is used. This enables XenCenter to quietly cancel ongoing data fetching operations, and start a new one without affecting the UI. UI elements are simply updated to point to the new `ArchiveMaintainer` while the old one is being  closed.
Please note that follow up commits to clean up `ArchiveMaintiner` and this implementation are coming. They have been separated to make reviews easier
* CA-376887: Move initial load logic to separate method in `ArchiveMaintainer`
* CA-376887: Rename `Update` to `StartUpdateLoop` in `ArchiveMaintainer`
* CA-376887: Fix use of `Dispose` in `PerformancePage` and collapse `Stop`/`Pause` into one method
* CA-376887: Remove unused `FirstTime` variable
* Tidy up `ArchiveMaintainer`: use `switch` when possible and improve logging
* Tidy up `ArchiveMaintainer`: Move variables inline
* Tidy up `ArchiveMaintainer`: Standardize fields/properties
* Tidy up `ArchiveMaintainer`: Normalize whitespace
* CA-376887: Ensure only one thread is spawned for each `ArchiveMaintainer`
- Ensures resources are disposed of
- Fixes issues whereby quickly starting and stopping threads for the same `XenObject` `ArchiveMantainer` would cause threads from not exiting
* Improve formatting and whitespace in `ArchiveMaintainer`
* Improve logging of exceptions in `ArchiveMaintainer:Get`
* Fix `ServerNow` calls in `ArchiveMaintainer`
* Deregister `ArchiveMaintainer` events when a new one is reassigned.
Also rename methods
* Apply code review suggestions

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-09-07 10:03:43 +01:00
Konstantina Chremmou
dd98fe6732
CP-45071: Convert XenCenter build scripts to PowerShell. (#3219)
* CP-45071: Convert XenCenter build scripts to PowerShell.
* Removed obsolete variable.
* Pass the timestamp server and the certificate thumbprint as parameters to the build and sign scripts.
* Added further logging and made the verbose output of cmdlets optional.
* Updated README.
* Improved script readability.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-06 15:48:12 +01:00
Danilo Del Busso
53dd3d97ca Update links between CONTRIBUTING and MAINTAINERS
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-09-04 12:29:36 +01:00
Konstantina Chremmou
98c3814ce0
Merge pull request #3212 from kc284/oil
Refactored retrieval of values from Messages.resx.
2023-09-04 10:32:46 +01:00
Konstantina Chremmou
89fd16b903 CP-45097: Show product brand alongside the version on the General and Search tabPage.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-09-04 10:32:18 +01:00
Konstantina Chremmou
30e9924b33
Merge pull request #3209 from kc284/tech-debt
CP-40739 (build with VS 2022) and some tech debt
2023-09-01 13:09:05 +01:00
Konstantina Chremmou
49334fc425
Merge pull request #3210 from danilo-delbusso/dev/readme
Update README and CONTRIB files
2023-09-01 13:08:40 +01:00
Konstantina Chremmou
c5430d0bd1 CA-381212 : The error is not always Internal Server Error;
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-30 17:08:06 +01:00
Konstantina Chremmou
d990e37a87 Moved two WLB actions to the same folder as the rest of the WLB actions. Removed obsolete messages.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-29 20:57:21 +01:00
Konstantina Chremmou
9c37834bd0 Stop retrieving values from Messages.resx by passing hardcoded strings to the Messages.ResourceManager.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-29 20:57:21 +01:00
Danilo Del Busso
69e3c6cf42
Rename CONTRIB to CONTRIBUTING.md
File name needs to be `CONTRIBUTING` for GitHub to pick it up as a valid file for contributor guidelines. See https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors#adding-a-contributing-file

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-08-25 08:41:50 +01:00
Danilo Del Busso
78ea00e0fd
Update README.md
- Add missing rebranding change
- C++ splash screen was removed

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-08-25 08:39:45 +01:00
Konstantina Chremmou
54c2fbb3f1 Manifest updates:
- Removed target to add manifest using mt.exe. The manifest is already in the project and embedded in the executable after the build.
- Removed Windows Vista and Windows 8 as .NET Framework 4.8 is not installable there.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-24 14:19:07 +01:00
Konstantina Chremmou
adec15e2ac CP-40739: Build with VS 2022.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-24 14:19:07 +01:00
Konstantina Chremmou
214e24589a Removed obsolete project xva_verify.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-24 14:19:07 +01:00
Konstantina Chremmou
8644ed3d83 CA-381212 : The protocol is not always HTTP/1.1
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-21 13:52:32 +01:00
Konstantina Chremmou
de1120f18b
More fixes including CA-381728, CA-381618, CA-381225 (#3205)
* CA-381728: If no post-update tasks exist, XenCenter should explicitly state so.

Also, livepatches should be shown if other guidance is absent.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>

* Missing placeholders for building locally without applying branding.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>

* Missing help links.

Also removed scripts that are not used any more.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>

* CA-381618: The HA/WLB off check is a pool, not a host check.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>

* CA-381225: Corrected order of running update guidance (also uses input from CA-381718).

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>

* UPDATES_URL has been renamed to XC_UPDATES_URL.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>

---------

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-21 13:35:49 +01:00
Konstantina Chremmou
002bcbfecf
Merge pull request #3204 from kc284/cdn-fixes
CA-381212, CA-381664, CA-381215, CP-44618
2023-08-18 14:26:28 +01:00
Konstantina Chremmou
776dfc1a13 Updated introductory info for the HA configuration wizard.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-18 14:06:38 +01:00
Konstantina Chremmou
99612f2fc3 CP-44618: Bumped branding to v5.1.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-18 14:06:38 +01:00
Konstantina Chremmou
e485a0a803 CA-381215: Try waiting on host.apply_updates if it is not immediately available.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-18 14:06:38 +01:00
Konstantina Chremmou
fe8a28e970 CA-381212, CA-381664: Corrections when fetching list of available updates:
- Try waiting on get_updates if it is not immediately available.
- Log instead of failing when a known (404/500) BadServerResponseException occurs.
- Ensure the UI is refreshed after fetching the list of updates.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-08-18 14:06:38 +01:00
Konstantina Chremmou
e4b2b67cf5
Merge pull request #3198 from kc284/master
UX improvements: CA-381442, XSI-1476, CA-375740
2023-08-18 10:35:05 +01:00
Konstantina Chremmou
fdd5ca775a
Merge pull request #3202 from kc284/supp-pack
Wording change; corrections for supp-pack installation.
2023-08-17 18:45:26 +01:00
Konstantina Chremmou
351c652813
Merge pull request #3200 from kc284/CA-381502-reason
CA-381502: Show the disabled reason in a new column. Extended the messages shown.
2023-08-17 18:45:02 +01:00
Danilo Del Busso
fbdcf5f5de CA-381678: Fix misc wording issues in ManageCdnUpdatesPage export file
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-08-17 18:44:39 +01:00