mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
CA-339273: Mention source Host/Pool in VM cross-pool migration and copy actions
Also amended connected string resource and removed initial description. Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
parent
4f2a6f8995
commit
73f1f620da
@ -55,7 +55,6 @@ namespace XenAdmin.Actions.VMActions
|
||||
: base(vm.Connection, GetTitle(vm, destinationHost, copy))
|
||||
{
|
||||
Session = vm.Connection.Session;
|
||||
Description = Messages.ACTION_PREPARING;
|
||||
VM = vm;
|
||||
Host = destinationHost;
|
||||
Pool = Helpers.GetPool(vm.Connection);
|
||||
@ -80,13 +79,16 @@ namespace XenAdmin.Actions.VMActions
|
||||
public static string GetTitle(VM vm, Host toHost, bool copy)
|
||||
{
|
||||
if (copy)
|
||||
return string.Format(Messages.ACTION_VM_CROSS_POOL_COPY_TITLE, vm.Name(), toHost.Name());
|
||||
return string.Format(Messages.ACTION_VM_CROSS_POOL_COPY_TITLE,
|
||||
vm.NameWithLocation(),
|
||||
Helpers.GetPool(vm.Connection)?.Name() ?? vm.Connection.Name,
|
||||
toHost.NameWithLocation());
|
||||
|
||||
Host residentOn = vm.Connection.Resolve(vm.resident_on);
|
||||
|
||||
|
||||
return residentOn == null
|
||||
? string.Format(Messages.ACTION_VM_MIGRATING_NON_RESIDENT, vm.Name(), toHost.Name())
|
||||
: string.Format(Messages.ACTION_VM_MIGRATING_RESIDENT, vm.Name(), Helpers.GetName(residentOn), toHost.Name());
|
||||
? string.Format(Messages.ACTION_VM_MIGRATING_NON_RESIDENT, vm.NameWithLocation(), toHost.NameWithLocation())
|
||||
: string.Format(Messages.ACTION_VM_MIGRATING_RESIDENT, vm.Name(), residentOn.NameWithLocation(), toHost.NameWithLocation());
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
@ -114,7 +116,7 @@ namespace XenAdmin.Actions.VMActions
|
||||
Description = string.Format(copy
|
||||
? Messages.ACTION_VM_CROSS_POOL_COPY_CANCELLED
|
||||
: Messages.ACTION_VM_MIGRATE_CANCELLED,
|
||||
VM.Name());
|
||||
VM.NameWithLocation());
|
||||
throw;
|
||||
}
|
||||
catch (Failure ex)
|
||||
|
2
XenModel/Messages.Designer.cs
generated
2
XenModel/Messages.Designer.cs
generated
@ -3067,7 +3067,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copying VM '{0}' to '{1}'.
|
||||
/// Looks up a localized string similar to Copying VM '{0}' from '{1}' to '{2}'.
|
||||
/// </summary>
|
||||
public static string ACTION_VM_CROSS_POOL_COPY_TITLE {
|
||||
get {
|
||||
|
@ -1141,7 +1141,7 @@
|
||||
<value>Copying {0} canceled</value>
|
||||
</data>
|
||||
<data name="ACTION_VM_CROSS_POOL_COPY_TITLE" xml:space="preserve">
|
||||
<value>Copying VM '{0}' to '{1}'</value>
|
||||
<value>Copying VM '{0}' from '{1}' to '{2}'</value>
|
||||
</data>
|
||||
<data name="ACTION_VM_DELETE_SNAPSHOTS_TITLE" xml:space="preserve">
|
||||
<value>Deleting snapshots</value>
|
||||
|
Loading…
Reference in New Issue
Block a user