Fix archiving
This commit is contained in:
parent
56cf823559
commit
b820a28f85
15 changed files with 209 additions and 77 deletions
|
@ -288,7 +288,7 @@
|
|||
|
||||
<br />
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnAdd" runat="server" Text="Add Mailboxplan" CssClass="Button1" meta:resourcekey="btnAdd" ValidationGroup="CreateMailboxPlan" OnClick="btnAdd_Click" OnClientClick="ShowProgressDialog('Creating ...');"></asp:Button>
|
||||
<asp:Button id="btnAdd" runat="server" Text="Add" CssClass="Button1" meta:resourcekey="btnAdd" ValidationGroup="CreateMailboxPlan" OnClick="btnAdd_Click" OnClientClick="ShowProgressDialog('Creating ...');"></asp:Button>
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateMailboxPlan" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
<asp:Localize ID="locMailboxplanName" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailboxplan Name: *"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" Archiving="false" />
|
||||
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" Archiving="false" OnChanged="mailboxPlanSelector_Change" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="rowRetentionPolicy" runat="server">
|
||||
|
|
|
@ -45,6 +45,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
password.SetPackagePolicy(PanelSecurity.PackageId, UserSettings.EXCHANGE_POLICY, "MailboxPasswordPolicy");
|
||||
|
@ -89,7 +91,6 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (plans.Length == 0)
|
||||
btnCreate.Enabled = false;
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
|
||||
{
|
||||
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
|
||||
|
@ -101,9 +102,16 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
|
||||
rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
|
||||
rowArchiving.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx);
|
||||
}
|
||||
|
||||
rowArchiving.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx);
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
protected void btnCreate_Click(object sender, EventArgs e)
|
||||
|
@ -223,5 +231,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
}
|
||||
|
||||
protected void mailboxPlanSelector_Change(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -81,7 +81,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
secLitigationHoldSettings.Visible = (Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, Cntx));
|
||||
}
|
||||
|
||||
secRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
|
||||
secRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, Cntx);
|
||||
|
||||
}
|
||||
|
||||
|
@ -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 = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, Cntx) && plan.EnableArchiving;
|
||||
|
||||
rowArchiving.Visible = chkEnableArchiving.Checked;
|
||||
}
|
||||
|
|
|
@ -65,13 +65,19 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
ddTagType.Items.Clear();
|
||||
for (int i = 0; i < types.Length; i++)
|
||||
ddTagType.Items.Add(new ListItem(types[i], i.ToString()));
|
||||
{
|
||||
string name = GetSharedLocalizedString("Text."+ types[i]);
|
||||
ddTagType.Items.Add(new ListItem(name, i.ToString()));
|
||||
}
|
||||
|
||||
string[] action = Enum.GetNames(typeof(ExchangeRetentionPolicyTagAction));
|
||||
|
||||
ddRetentionAction.Items.Clear();
|
||||
for (int i = 0; i < action.Length; i++)
|
||||
ddRetentionAction.Items.Add(new ListItem(action[i], i.ToString()));
|
||||
{
|
||||
string name = GetSharedLocalizedString("Text."+action[i]);
|
||||
ddRetentionAction.Items.Add(new ListItem(name, i.ToString()));
|
||||
}
|
||||
|
||||
ClearEditValues();
|
||||
}
|
||||
|
|
|
@ -129,6 +129,14 @@
|
|||
<wsp:QuotaViewer ID="exchangeLitigationHoldStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow" id="rowExchangeArchiving" runat="server">
|
||||
<td class="OrgStatsQuota" nowrap>
|
||||
<asp:HyperLink ID="lnkExchangeArchiving" runat="server" meta:resourcekey="lnkExchangeArchiving">Archiving Storage (Mb):</asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="exchangeArchivingStatus" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</asp:Panel>
|
||||
|
||||
|
|
|
@ -66,6 +66,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
lnkExchangeLitigationHold.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "storage_usage",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
lnkExchangeArchiving.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "archivingmailboxes",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
|
||||
mailboxesStats.QuotaUsedValue = exchangeOrgStats.CreatedMailboxes;
|
||||
mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes;
|
||||
|
@ -120,6 +123,18 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
else
|
||||
this.rowExchangeLitigationHold.Style.Add("display", "none");
|
||||
|
||||
if ((!hideItems) && (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx)))
|
||||
{
|
||||
exchangeArchivingStatus.QuotaUsedValue = exchangeOrgStats.UsedArchingStorage;
|
||||
exchangeArchivingStatus.QuotaValue = exchangeOrgStats.AllocatedArchingStorage;
|
||||
if (exchangeOrgStats.AllocatedArchingStorage != -1)
|
||||
{
|
||||
exchangeLitigationHoldStats.QuotaAvailable = exchangeTenantStats.AllocatedArchingStorage - exchangeTenantStats.UsedArchingStorage;
|
||||
}
|
||||
}
|
||||
else
|
||||
this.rowExchangeArchiving.Style.Add("display", "none");
|
||||
|
||||
}
|
||||
|
||||
private void BindOrgStats()
|
||||
|
|
|
@ -1,31 +1,3 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -364,6 +336,33 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer exchangeLitigationHoldStats;
|
||||
|
||||
/// <summary>
|
||||
/// rowExchangeArchiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow rowExchangeArchiving;
|
||||
|
||||
/// <summary>
|
||||
/// lnkExchangeArchiving control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkExchangeArchiving;
|
||||
|
||||
/// <summary>
|
||||
/// exchangeArchivingStatus control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer exchangeArchivingStatus;
|
||||
|
||||
/// <summary>
|
||||
/// besStatsPanel control.
|
||||
/// </summary>
|
||||
|
|
|
@ -133,8 +133,7 @@
|
|||
<uc1:QuotaEditor id="mailboxSize" runat="server"
|
||||
QuotaTypeID="2"
|
||||
QuotaValue="0"
|
||||
ParentQuotaValue="-1">
|
||||
</uc1:QuotaEditor>
|
||||
ParentQuotaValue="-1"></uc1:QuotaEditor>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -145,8 +144,7 @@
|
|||
<uc1:QuotaEditor id="maxRecipients" runat="server"
|
||||
QuotaTypeID="2"
|
||||
QuotaValue="0"
|
||||
ParentQuotaValue="-1">
|
||||
</uc1:QuotaEditor>
|
||||
ParentQuotaValue="-1"></uc1:QuotaEditor>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -157,8 +155,7 @@
|
|||
<uc1:QuotaEditor id="maxSendMessageSizeKB" runat="server"
|
||||
QuotaTypeID="2"
|
||||
QuotaValue="0"
|
||||
ParentQuotaValue="-1">
|
||||
</uc1:QuotaEditor>
|
||||
ParentQuotaValue="-1"></uc1:QuotaEditor>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -169,8 +166,7 @@
|
|||
<uc1:QuotaEditor id="maxReceiveMessageSizeKB" runat="server"
|
||||
QuotaTypeID="2"
|
||||
QuotaValue="0"
|
||||
ParentQuotaValue="-1">
|
||||
</uc1:QuotaEditor>
|
||||
ParentQuotaValue="-1"></uc1:QuotaEditor>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -231,8 +227,7 @@
|
|||
<uc1:QuotaEditor id="recoverableItemsSpace" runat="server"
|
||||
QuotaTypeID="2"
|
||||
QuotaValue="0"
|
||||
ParentQuotaValue="-1">
|
||||
</uc1:QuotaEditor>
|
||||
ParentQuotaValue="-1"></uc1:QuotaEditor>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -266,15 +261,14 @@
|
|||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id="rowArchiving">
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locArchiveQuota" runat="server" meta:resourcekey="locArchiveQuota" Text="Archive quota:"></asp:Localize></td>
|
||||
<td>
|
||||
<div class="Right">
|
||||
<uc1:QuotaEditor id="archiveQuota" runat="server"
|
||||
QuotaTypeID="2"
|
||||
QuotaValue="0"
|
||||
ParentQuotaValue="-1">
|
||||
</uc1:QuotaEditor>
|
||||
ParentQuotaValue="-1"></uc1:QuotaEditor>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -65,13 +65,19 @@ namespace WebsitePanel.Portal
|
|||
|
||||
ddTagType.Items.Clear();
|
||||
for (int i = 0; i < types.Length; i++)
|
||||
ddTagType.Items.Add(new ListItem(types[i], i.ToString()));
|
||||
{
|
||||
string name = GetSharedLocalizedString("Text." +types[i]);
|
||||
ddTagType.Items.Add(new ListItem(name, i.ToString()));
|
||||
}
|
||||
|
||||
string[] action = Enum.GetNames(typeof(ExchangeRetentionPolicyTagAction));
|
||||
|
||||
ddRetentionAction.Items.Clear();
|
||||
for (int i = 0; i < action.Length; i++)
|
||||
ddRetentionAction.Items.Add(new ListItem(action[i], i.ToString()));
|
||||
{
|
||||
string name = GetSharedLocalizedString("Text."+action[i]);
|
||||
ddRetentionAction.Items.Add(new ListItem(name, i.ToString()));
|
||||
}
|
||||
|
||||
txtStatus.Visible = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue