mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CA-205791: Added detail to the action migrating a VM that's not resident on a host.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
f1a43abbf0
commit
1acc717417
@ -63,11 +63,6 @@ namespace XenAdmin.Actions.VMActions
|
||||
this.copy = copy;
|
||||
}
|
||||
|
||||
public VMCrossPoolMigrateAction(VM vm, Host destinationHost, XenAPI.Network transferNetwork, VmMapping mapping)
|
||||
: this(vm, destinationHost, transferNetwork, mapping, false)
|
||||
{
|
||||
}
|
||||
|
||||
public static RbacMethodList StaticRBACDependencies
|
||||
{
|
||||
get
|
||||
@ -88,13 +83,10 @@ namespace XenAdmin.Actions.VMActions
|
||||
return string.Format(Messages.ACTION_VM_CROSS_POOL_COPY_TITLE, vm.Name, toHost.Name);
|
||||
|
||||
Host residentOn = vm.Connection.Resolve(vm.resident_on);
|
||||
if (residentOn == null)
|
||||
{
|
||||
return Messages.ACTION_VM_MIGRATING;
|
||||
}
|
||||
|
||||
return string.Format(Messages.ACTION_VM_MIGRATING_TITLE, vm.Name, Helpers.GetName(residentOn), toHost.Name);
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
|
@ -50,15 +50,11 @@ namespace XenAdmin.Actions.VMActions
|
||||
|
||||
private static string GetTitle(VM vm, Host toHost)
|
||||
{
|
||||
XenAPI.Host residentOn = vm.Connection.Resolve(vm.resident_on);
|
||||
if (residentOn == null)
|
||||
{
|
||||
return Messages.ACTION_VM_MIGRATING;
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format(Messages.ACTION_VM_MIGRATING_TITLE, vm.Name, Helpers.GetName(residentOn), toHost.Name);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
|
13
XenModel/Messages.Designer.cs
generated
13
XenModel/Messages.Designer.cs
generated
@ -2886,12 +2886,21 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Migrating VM '{0}' to '{1}'.
|
||||
/// </summary>
|
||||
public static string ACTION_VM_MIGRATING_NON_RESIDENT {
|
||||
get {
|
||||
return ResourceManager.GetString("ACTION_VM_MIGRATING_NON_RESIDENT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Migrating VM '{0}' from '{1}' to '{2}'.
|
||||
/// </summary>
|
||||
public static string ACTION_VM_MIGRATING_TITLE {
|
||||
public static string ACTION_VM_MIGRATING_RESIDENT {
|
||||
get {
|
||||
return ResourceManager.GetString("ACTION_VM_MIGRATING_TITLE", resourceCulture);
|
||||
return ResourceManager.GetString("ACTION_VM_MIGRATING_RESIDENT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1074,7 +1074,10 @@
|
||||
<data name="ACTION_VM_MIGRATING" xml:space="preserve">
|
||||
<value>Migrating</value>
|
||||
</data>
|
||||
<data name="ACTION_VM_MIGRATING_TITLE" xml:space="preserve">
|
||||
<data name="ACTION_VM_MIGRATING_NON_RESIDENT" xml:space="preserve">
|
||||
<value>Migrating VM '{0}' to '{1}'</value>
|
||||
</data>
|
||||
<data name="ACTION_VM_MIGRATING_RESIDENT" xml:space="preserve">
|
||||
<value>Migrating VM '{0}' from '{1}' to '{2}'</value>
|
||||
</data>
|
||||
<data name="ACTION_VM_MOVING" xml:space="preserve">
|
||||
|
@ -81,7 +81,7 @@ namespace XenAPI
|
||||
// Titles["VM.export"] = ...;
|
||||
Titles["VM.hard_reboot"] = Messages.ACTION_VM_REBOOTING_TITLE;
|
||||
Titles["VM.hard_shutdown"] = Messages.ACTION_VM_SHUTTING_DOWN_TITLE;
|
||||
Titles["VM.migrate_send"] = Messages.ACTION_VM_MIGRATING_TITLE;
|
||||
Titles["VM.migrate_send"] = Messages.ACTION_VM_MIGRATING_RESIDENT;
|
||||
Titles["VM.resume"] = Messages.ACTION_VM_RESUMING_ON_TITLE;
|
||||
Titles["VM.resume_on"] = Messages.ACTION_VM_RESUMING_ON_TITLE;
|
||||
Titles["VM.start"] = Messages.ACTION_VM_STARTING_ON_TITLE;
|
||||
|
Loading…
Reference in New Issue
Block a user