mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Display overcommitted percentage for thinly provisioned SRs
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
7df999c532
commit
13d933ec22
@ -1238,7 +1238,9 @@ namespace XenAdmin.TabPages
|
||||
{
|
||||
menuItems = new[] { new CommandToolStripMenuItem(new ConvertToThinSRCommand(Program.MainWindow, new List<SelectedItem> () { new SelectedItem(xenObject)} ), true) };
|
||||
}*/
|
||||
s.AddEntry(FriendlyName("SR.provisioning"), sr.IsThinProvisioned ? Messages.SR_THIN_PROVISIONING : Messages.SR_THICK_PROVISIONING, menuItems);
|
||||
s.AddEntry(FriendlyName("SR.provisioning"), sr.IsThinProvisioned
|
||||
? string.Format(Messages.SR_THIN_PROVISIONING_COMMITTED, sr.PercentageCommitted)
|
||||
: Messages.SR_THICK_PROVISIONING, menuItems);
|
||||
|
||||
if(sr.IsThinProvisioned && sr.sm_config.ContainsKey("initial_allocation") && sr.sm_config.ContainsKey("allocation_quantum"))
|
||||
{
|
||||
|
9
XenModel/Messages.Designer.cs
generated
9
XenModel/Messages.Designer.cs
generated
@ -30355,6 +30355,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Thinly provisioned ({0}% committed).
|
||||
/// </summary>
|
||||
public static string SR_THIN_PROVISIONING_COMMITTED {
|
||||
get {
|
||||
return ResourceManager.GetString("SR_THIN_PROVISIONING_COMMITTED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cannot reclaim freed space, because the SR is detached..
|
||||
/// </summary>
|
||||
|
@ -10571,6 +10571,9 @@ The upper limit: SR size / {2}</value>
|
||||
<data name="SR_THIN_PROVISIONING" xml:space="preserve">
|
||||
<value>Thinly provisioned</value>
|
||||
</data>
|
||||
<data name="SR_THIN_PROVISIONING_COMMITTED" xml:space="preserve">
|
||||
<value>Thinly provisioned ({0}% committed)</value>
|
||||
</data>
|
||||
<data name="SR_TRIM_NO_STORAGE_HOST_ERROR" xml:space="preserve">
|
||||
<value>Cannot reclaim freed space, because the SR is detached.</value>
|
||||
</data>
|
||||
|
@ -1131,6 +1131,14 @@ namespace XenAPI
|
||||
}
|
||||
}
|
||||
|
||||
public long PercentageCommitted
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)Math.Round(virtual_allocation / (double)physical_size * 100.0);
|
||||
}
|
||||
}
|
||||
|
||||
#region IEquatable<SR> Members
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user