CP-11713: Storage Motion icons for stopped and suspended VMs

This commit is contained in:
Stephen Turner 2015-03-26 13:33:17 +00:00
parent 23319daeba
commit 6d3a937304
5 changed files with 44 additions and 1 deletions

View File

@ -166,6 +166,8 @@ namespace XenAdmin
ImageList16.Images.Add("virtualappliance_16.png", Properties.Resources._000_VirtualAppliance_h32bit_16);
ImageList16.Images.Add("000_MigrateVM_h32bit_16.png", Properties.Resources._000_MigrateVM_h32bit_16);
ImageList16.Images.Add("000_MigrateStoppedVM_h32bit_16.png", Properties.Resources._000_MigrateStoppedVM_h32bit_16);
ImageList16.Images.Add("000_MigrateSuspendedVM_h32bit_16.png", Properties.Resources._000_MigrateSuspendedVM_h32bit_16);
ImageList16.Images.Add("_000_ManagementInterface_h32bit_16.png", Properties.Resources._000_ManagementInterface_h32bit_16);
ImageList16.Images.Add("000_TCP_IPGroup_h32bit_16.png", Properties.Resources._000_TCP_IPGroup_h32bit_16);
@ -404,7 +406,18 @@ namespace XenAdmin
return disabled ? Icons.VmStoppedDisabled : Icons.VmStopped;
if (vm.current_operations.ContainsValue(vm_operations.migrate_send))
return Icons.VmCrossPoolMigrate;
{
switch (vm.power_state)
{
case vm_power_state.Halted:
return Icons.VmCrossPoolMigrateStopped;
case vm_power_state.Suspended:
case vm_power_state.Paused:
return Icons.VmCrossPoolMigrateSuspended;
default:
return Icons.VmCrossPoolMigrate;
}
}
// If a VM lifecycle operation is in progress, show the orange "starting" icon
foreach (vm_operations op in vm.current_operations.Values)

View File

@ -640,6 +640,26 @@ namespace XenAdmin.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _000_MigrateStoppedVM_h32bit_16 {
get {
object obj = ResourceManager.GetObject("_000_MigrateStoppedVM_h32bit_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _000_MigrateSuspendedVM_h32bit_16 {
get {
object obj = ResourceManager.GetObject("_000_MigrateSuspendedVM_h32bit_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -1099,4 +1099,10 @@
<data name="coreos_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\coreos-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_000_MigrateStoppedVM_h32bit_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\000_MigrateStoppedVM_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_000_MigrateSuspendedVM_h32bit_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\000_MigrateSuspendedVM_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -3940,6 +3940,8 @@
<None Include="Images\000_NewVirtualAppliance_h32bit_32.png" />
<None Include="Images\000_ManagementInterface_h32bit_16.png" />
<Content Include="Images\000_FilterSeverity_h32bit_16.png" />
<None Include="Images\000_MigrateStoppedVM_h32bit_16.png" />
<None Include="Images\000_MigrateSuspendedVM_h32bit_16.png" />
<Content Include="Images\000_MigrateVM_h32bit_16.png" />
<Content Include="Images\000_MigrateVM_h32bit_32.png" />
<Content Include="Images\000_Patch_h32bit_32.png" />

View File

@ -151,6 +151,8 @@ namespace XenAdmin
VmAppliance,
VmCrossPoolMigrate,
VmCrossPoolMigrateStopped,
VmCrossPoolMigrateSuspended,
PifPrimary,
PifSecondary,