mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Merge pull request #762 from GaborApatiNagy/master_winupdate_CP-15034_2
CP-15034: UI: Search: show new search & filter (Windows Update capability)
This commit is contained in:
commit
5602f1129f
@ -79,6 +79,7 @@ namespace XenAdmin.Controls.XenSearch
|
||||
potentialGroups.Add(new XenModelObjectPropertyGroupingType<VDI>(ObjectTypes.VM, PropertyNames.disks, srGroup));
|
||||
potentialGroups.Add(new PropertyGroupingType<VM.HA_Restart_Priority>(ObjectTypes.VM, PropertyNames.ha_restart_priority));
|
||||
potentialGroups.Add(new BoolGroupingType(ObjectTypes.VM, PropertyNames.read_caching_enabled));
|
||||
potentialGroups.Add(new BoolGroupingType(ObjectTypes.VM, PropertyNames.vendor_device_state));
|
||||
potentialGroups.Add(applianceGroup);
|
||||
potentialGroups.Add(new PropertyGroupingType<String>(ObjectTypes.AllExcFolders, PropertyNames.tags));
|
||||
potentialGroups.Add(new XenModelObjectPropertyGroupingType<VM>(
|
||||
|
@ -79,6 +79,7 @@ namespace XenAdmin.Controls.XenSearch
|
||||
queryTypes.Add(new ValuePropertyQueryType(3, ObjectTypes.VM, PropertyNames.os_name));
|
||||
queryTypes.Add(new EnumPropertyQueryType<VM.HA_Restart_Priority>(3, ObjectTypes.VM, PropertyNames.ha_restart_priority));
|
||||
queryTypes.Add(new BooleanQueryType(3, ObjectTypes.VM, PropertyNames.read_caching_enabled));
|
||||
queryTypes.Add(new BooleanQueryType(3, ObjectTypes.VM, PropertyNames.vendor_device_state));
|
||||
queryTypes.Add(new EnumPropertyQueryType<SR.SRTypes>(3, /*ObjectTypes.LocalSR | ObjectTypes.RemoteSR*/ ObjectTypes.None, PropertyNames.sr_type));
|
||||
|
||||
queryTypes.Add(new LongQueryType(4, ObjectTypes.VDI, Messages.SIZE, PropertyNames.size, Util.BINARY_GIGA, Messages.VAL_GIGB));
|
||||
|
27
XenModel/Messages.Designer.cs
generated
27
XenModel/Messages.Designer.cs
generated
@ -34327,6 +34327,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to VMs by Windows Update Capability.
|
||||
/// </summary>
|
||||
public static string VMS_BY_WINDOWS_UPDATE_CAPABILITY {
|
||||
get {
|
||||
return ResourceManager.GetString("VMS_BY_WINDOWS_UPDATE_CAPABILITY", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to VMs in pool '{0}':.
|
||||
/// </summary>
|
||||
@ -34687,6 +34696,24 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Windows Update capable.
|
||||
/// </summary>
|
||||
public static string WINDOWS_UPDATE_CAPABLE {
|
||||
get {
|
||||
return ResourceManager.GetString("WINDOWS_UPDATE_CAPABLE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Not Windows Update capable.
|
||||
/// </summary>
|
||||
public static string WINDOWS_UPDATE_CAPABLE_NOT {
|
||||
get {
|
||||
return ResourceManager.GetString("WINDOWS_UPDATE_CAPABLE_NOT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to &Next >.
|
||||
/// </summary>
|
||||
|
@ -12017,6 +12017,15 @@ To learn more about the XenServer Dynamic Workload Balancing feature or to start
|
||||
<data name="WEEKLY_SCHEDULE_FORMAT" xml:space="preserve">
|
||||
<value>Weekly; at {0} every {1}</value>
|
||||
</data>
|
||||
<data name="VMS_BY_WINDOWS_UPDATE_CAPABILITY" xml:space="preserve">
|
||||
<value>VMs by Windows Update Capability</value>
|
||||
</data>
|
||||
<data name="WINDOWS_UPDATE_CAPABLE" xml:space="preserve">
|
||||
<value>Windows Update capable</value>
|
||||
</data>
|
||||
<data name="WINDOWS_UPDATE_CAPABLE_NOT" xml:space="preserve">
|
||||
<value>Not Windows Update capable</value>
|
||||
</data>
|
||||
<data name="WIZARD_BUTTON_NEXT" xml:space="preserve">
|
||||
<value>&Next ></value>
|
||||
</data>
|
||||
|
@ -1920,6 +1920,15 @@ namespace XenAPI
|
||||
this.IsHVM && BoolKey(this.platform, "viridian");
|
||||
}
|
||||
}
|
||||
|
||||
public bool WindowsUpdateCapable
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
this.has_vendor_device && this.IsWindows;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct VMStartupOptions
|
||||
|
@ -169,7 +169,10 @@ namespace XenAdmin.XenSearch
|
||||
has_custom_fields,
|
||||
|
||||
[HelpString("Whether the VM is in any vApp")]
|
||||
in_any_appliance
|
||||
in_any_appliance,
|
||||
|
||||
[HelpString("Windows Update capability")]
|
||||
vendor_device_state,
|
||||
}
|
||||
|
||||
public enum ColumnNames
|
||||
@ -268,6 +271,8 @@ namespace XenAdmin.XenSearch
|
||||
PropertyNames_i18n[PropertyNames.folders] = Messages.ANCESTOR_FOLDERS;
|
||||
PropertyNames_i18n[PropertyNames.has_custom_fields] = Messages.HAS_CUSTOM_FIELDS;
|
||||
PropertyNames_i18n[PropertyNames.in_any_appliance] = Messages.IN_ANY_APPLIANCE;
|
||||
PropertyNames_i18n[PropertyNames.vendor_device_state] = Messages.WINDOWS_UPDATE_CAPABLE;
|
||||
PropertyNames_i18n_false[PropertyNames.vendor_device_state] = Messages.WINDOWS_UPDATE_CAPABLE_NOT;
|
||||
|
||||
VM_power_state_images[vm_power_state.Halted] = Icons.PowerStateHalted;
|
||||
VM_power_state_images[vm_power_state.Paused] = Icons.PowerStateSuspended;
|
||||
@ -325,6 +330,15 @@ namespace XenAdmin.XenSearch
|
||||
return vm.power_state;
|
||||
});
|
||||
};
|
||||
|
||||
properties[PropertyNames.vendor_device_state] = delegate(IXenObject o)
|
||||
{
|
||||
return GetForRealVM(o, delegate(VM vm, IXenConnection conn)
|
||||
{
|
||||
return (bool?)vm.WindowsUpdateCapable;
|
||||
});
|
||||
};
|
||||
|
||||
properties[PropertyNames.virtualisation_status] = delegate(IXenObject o)
|
||||
{
|
||||
return GetForRealVM(o, delegate(VM vm, IXenConnection conn)
|
||||
|
@ -868,6 +868,18 @@ namespace XenAdmin.XenSearch
|
||||
|
||||
searches["dead-beef-1234-snapshotsbyvm"] = SnapshotsByVM;
|
||||
|
||||
// VMs by Windows Update capability
|
||||
|
||||
Search VMsByWindowsUpdateCapability = new Search(
|
||||
new Query(
|
||||
new QueryScope(ObjectTypes.VM),
|
||||
null),
|
||||
new PropertyGrouping<bool>(PropertyNames.vendor_device_state, null),
|
||||
false, Messages.VMS_BY_WINDOWS_UPDATE_CAPABILITY, "dead-beef-1234-vmsbywinupdate", true
|
||||
);
|
||||
|
||||
searches["dead-beef-1234-vmsbywinupdate"] = VMsByWindowsUpdateCapability;
|
||||
|
||||
/*
|
||||
//Docker containers by VM
|
||||
Search dockerContainersByVM = new Search(
|
||||
|
Loading…
Reference in New Issue
Block a user