mirror of
https://github.com/bitwarden/server.git
synced 2024-12-21 16:47:35 +01:00
[PM-6201] Self-Host Admin Portal is reporting "10239 GB of Additional… (#5130)
This commit is contained in:
parent
94761a8c7b
commit
674e522843
@ -81,16 +81,8 @@
|
||||
<i class="fa fa-smile-o fa-lg fa-fw text-body-secondary" title="Freeloader"></i>
|
||||
}
|
||||
}
|
||||
@if(org.MaxStorageGb.HasValue && org.MaxStorageGb > 1)
|
||||
{
|
||||
<i class="fa fa-plus-square fa-lg fa-fw"
|
||||
title="Additional Storage, @(org.MaxStorageGb - 1) GB"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-plus-square-o fa-lg fa-fw text-body-secondary"
|
||||
title="No Additional Storage"></i>
|
||||
}
|
||||
<i class="fa fa-hdd-o fa-lg fa-fw"
|
||||
title="Used Storage, @org.StorageGb GB"></i>
|
||||
@if(org.Enabled)
|
||||
{
|
||||
<i class="fa fa-check-circle fa-lg fa-fw"
|
||||
|
@ -181,6 +181,11 @@ public class Organization : ITableObject<Guid>, IStorableSubscriber, IRevisable,
|
||||
|
||||
public bool IsExpired() => ExpirationDate.HasValue && ExpirationDate.Value <= DateTime.UtcNow;
|
||||
|
||||
/// <summary>
|
||||
/// Used storage in gigabytes.
|
||||
/// </summary>
|
||||
public double StorageGb => Storage.HasValue ? Math.Round(Storage.Value / 1073741824D, 2) : 0;
|
||||
|
||||
public long StorageBytesRemaining()
|
||||
{
|
||||
if (!MaxStorageGb.HasValue)
|
||||
|
Loading…
Reference in New Issue
Block a user