Fix archiving
This commit is contained in:
parent
d53f450523
commit
a17e35e589
7 changed files with 104 additions and 14 deletions
|
@ -119,9 +119,8 @@ order by rg.groupOrder
|
|||
public const string EXCHANGE2007_RECOVERABLEITEMSSPACE = "Exchange2007.RecoverableItemsSpace";
|
||||
public const string EXCHANGE2007_DISCLAIMERSALLOWED = "Exchange2007.DisclaimersAllowed";
|
||||
|
||||
public const string EXCHANGE2013_ALLOWARCHIVING = "Exchange2013.AllowArchiving";
|
||||
public const string EXCHANGE2013_ALLOWRETENTIONPOLICY = "Exchange2013.AllowRetentionPolicy"; // Archiving
|
||||
public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage";
|
||||
public const string EXCHANGE2013_ALLOWRETENTIONPOLICY = "Exchange2013.AllowRetentionPolicy"; // RetentionPolicy
|
||||
public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage"; // Archiving
|
||||
public const string EXCHANGE2013_ARCHIVINGMAILBOXES = "Exchange2013.ArchivingMailboxes";
|
||||
|
||||
public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases
|
||||
|
|
|
@ -192,6 +192,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.CreatedPublicFolders = tempStats.CreatedPublicFolders;
|
||||
stats.UsedDiskSpace = tempStats.UsedDiskSpace;
|
||||
stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace;
|
||||
stats.UsedArchingStorage = tempStats.UsedArchingStorage;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -219,6 +220,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.CreatedPublicFolders += tempStats.CreatedPublicFolders;
|
||||
stats.UsedDiskSpace += tempStats.UsedDiskSpace;
|
||||
stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace;
|
||||
stats.UsedArchingStorage += tempStats.UsedArchingStorage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -237,6 +239,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.AllocatedPublicFolders = cntx.Quotas[Quotas.EXCHANGE2007_PUBLICFOLDERS].QuotaAllocatedValue;
|
||||
stats.AllocatedDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue;
|
||||
stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue;
|
||||
stats.AllocatedArchingStorage = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue;
|
||||
|
||||
return stats;
|
||||
}
|
||||
|
|
|
@ -3079,6 +3079,22 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
info.LastLogon = DateTime.MinValue;
|
||||
}
|
||||
|
||||
cmd = new Command("Get-MailboxStatistics");
|
||||
cmd.Parameters.Add("Identity", id);
|
||||
cmd.Parameters.Add("Archive");
|
||||
result = ExecuteShellCommand(runSpace, cmd);
|
||||
if (result.Count > 0)
|
||||
{
|
||||
PSObject statistics = result[0];
|
||||
Unlimited<ByteQuantifiedSize> totalItemSize =
|
||||
(Unlimited<ByteQuantifiedSize>)GetPSObjectProperty(statistics, "TotalItemSize");
|
||||
info.ArchivingTotalSize = ConvertUnlimitedToBytes(totalItemSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
info.ArchivingTotalSize = 0;
|
||||
}
|
||||
|
||||
if (info.LitigationHoldEnabled)
|
||||
{
|
||||
cmd = new Command("Get-MailboxFolderStatistics");
|
||||
|
|
|
@ -104,13 +104,13 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
|
||||
}
|
||||
|
||||
rowArchiving.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx);
|
||||
rowArchiving.Visible = false;
|
||||
|
||||
int planId = -1;
|
||||
int.TryParse(mailboxPlanSelector.MailboxPlanId, out planId);
|
||||
ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, planId);
|
||||
if (plan!=null)
|
||||
rowArchiving.Visible = rowArchiving.Visible && plan.EnableArchiving;
|
||||
rowArchiving.Visible = plan.EnableArchiving;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
int.TryParse(mailboxPlanSelector.MailboxPlanId, out planId);
|
||||
ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, planId);
|
||||
|
||||
secArchiving.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, Cntx) && plan.EnableArchiving;
|
||||
secArchiving.Visible = plan.EnableArchiving;
|
||||
|
||||
rowArchiving.Visible = chkEnableArchiving.Checked;
|
||||
}
|
||||
|
@ -119,6 +119,10 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
// get account meta
|
||||
ExchangeAccount account = ES.Services.ExchangeServer.GetAccount(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
// get mailbox plan
|
||||
ExchangeMailboxPlan plan = ES.Services.ExchangeServer.GetExchangeMailboxPlan(PanelRequest.ItemID, account.MailboxPlanId);
|
||||
|
||||
chkPmmAllowed.Checked = (account.MailboxManagerActions & MailboxManagerActions.GeneralSettings) > 0;
|
||||
|
||||
if (account.MailboxPlanId == 0)
|
||||
|
@ -156,12 +160,11 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
ddDisclaimer.SelectedValue = disclaimerId.ToString();
|
||||
}
|
||||
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, Cntx))
|
||||
{
|
||||
chkEnableArchiving.Checked = account.EnableArchiving;
|
||||
archivingQuotaViewer.QuotaUsedValue = Convert.ToInt32(stats.ArchivingTotalSize / 1024 / 1024);
|
||||
archivingQuotaViewer.QuotaValue = (stats.ArchivingMaxSize == -1) ? -1 : (int)Math.Round((double)(stats.ArchivingMaxSize / 1024 / 1024));
|
||||
}
|
||||
int ArchivingMaxSize = -1;
|
||||
if (plan != null) ArchivingMaxSize = plan.ArchiveSizeMB;
|
||||
chkEnableArchiving.Checked = account.EnableArchiving;
|
||||
archivingQuotaViewer.QuotaUsedValue = Convert.ToInt32(stats.ArchivingTotalSize / 1024 / 1024);
|
||||
archivingQuotaViewer.QuotaValue = ArchivingMaxSize;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -123,13 +123,13 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
else
|
||||
this.rowExchangeLitigationHold.Style.Add("display", "none");
|
||||
|
||||
if ((!hideItems) && (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx)))
|
||||
if (!hideItems)
|
||||
{
|
||||
exchangeArchivingStatus.QuotaUsedValue = exchangeOrgStats.UsedArchingStorage;
|
||||
exchangeArchivingStatus.QuotaValue = exchangeOrgStats.AllocatedArchingStorage;
|
||||
if (exchangeOrgStats.AllocatedArchingStorage != -1)
|
||||
{
|
||||
exchangeLitigationHoldStats.QuotaAvailable = exchangeTenantStats.AllocatedArchingStorage - exchangeTenantStats.UsedArchingStorage;
|
||||
exchangeArchivingStatus.QuotaAvailable = exchangeTenantStats.AllocatedArchingStorage - exchangeTenantStats.UsedArchingStorage;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue