Enterprise Storage Partial Check in

This commit is contained in:
robvde 2013-08-24 10:31:43 +04:00
parent e4a29d890e
commit 807cf27154
9 changed files with 168 additions and 31 deletions

View file

@ -1966,7 +1966,7 @@ GO
-- Enterprise Storage
-- Enterprise Storage Provider
IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'EnterpriseStorage')
BEGIN
INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (44, N'EnterpriseStorage', 25, N'WebsitePanel.EnterpriseServer.EnterpriseStorageController', 1)
@ -1983,3 +1983,15 @@ UPDATE [dbo].[Providers] SET [DisableAutoDiscovery] = NULL WHERE [DisplayName] =
END
GO
-- Enterprise Storage Quotas
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'EnterpriseStorage.DiskStorageSpace')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (430, 44, 1,N'EnterpriseStorage.DiskStorageSpace',N'Disk Storage Space (Mb)',2, 0 , NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'EnterpriseStorage.Folders')
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (431, 44, 1,N'EnterpriseStorage.Folders',N'Number of Root Folders',2, 0 , NULL)
END
GO

View file

@ -52,5 +52,6 @@ namespace WebsitePanel.EnterpriseServer
public const string OCS = "OCS";
public const string VPSForPC = "VPSForPC";
public const string Lync = "Lync";
public const string EnterpriseStorage = "EnterpriseStorage";
}
}

View file

@ -61,6 +61,12 @@ namespace WebsitePanel.Providers.HostedSolution
private int createdCRMUsers;
private int allocatedCRMUsers;
private int createdEnterpriseStorageFolders;
private int allocatedEnterpriseStorageFolders;
private int allocatedEnterpriseStorageSpace;
private int usedEnterpriseStorageSpace;
public int CreatedCRMUsers
{
@ -185,12 +191,36 @@ namespace WebsitePanel.Providers.HostedSolution
public int CreatedBlackBerryUsers { get; set; }
public int AllocatedBlackBerryUsers { get; set; }
public int CreatedOCSUsers { get; set; }
public int AllocatedOCSUsers { get; set; }
public int CreatedLyncUsers { get; set; }
public int AllocatedLyncUsers { get; set; }
public int CreatedEnterpriseStorageFolders
{
get { return createdEnterpriseStorageFolders; }
set { createdEnterpriseStorageFolders = value; }
}
public int AllocatedEnterpriseStorageFolders
{
get { return allocatedEnterpriseStorageFolders; }
set { allocatedEnterpriseStorageFolders = value; }
}
public int AllocatedEnterpriseStorageSpace
{
get { return allocatedEnterpriseStorageSpace; }
set { allocatedEnterpriseStorageSpace = value; }
}
public int UsedEnterpriseStorageSpace
{
get { return usedEnterpriseStorageSpace; }
set { usedEnterpriseStorageSpace = value; }
}
}
}

View file

@ -5110,6 +5110,15 @@
<data name="Quota.Exchange2007.RecoverableItemsSpace" xml:space="preserve">
<value>Recoverable Items Storage, MB</value>
</data>
<data name="ResourceGroup.Exchange" xml:space="preserve">
<value>Enterprise Storage</value>
</data>
<data name="EnterpriseStorage.DiskStorageSpace" xml:space="preserve">
<value>Disk Storage Space, MB</value>
</data>
<data name="EnterpriseStorage.Folders" xml:space="preserve">
<value>Number of Root Folders</value>
</data>
<data name="Error.LYNC_DELETE_DOMAIN" xml:space="preserve">
<value>Error deleting organization domain name. See audit log for more details.</value>
</data>

View file

@ -210,4 +210,13 @@
<data name="lnkExchangeLitigationHold.Text" xml:space="preserve">
<value>Litigation Hold Storage (Mb):</value>
</data>
<data name="lnkEnterpriseStorageFolders.Text" xml:space="preserve">
<value>Folders:</value>
</data>
<data name="lnkEnterpriseStorageSpace.Text" xml:space="preserve">
<value>Used Diskspace (MB):</value>
</data>
<data name="locEnterpriseStorage.Text" xml:space="preserve">
<value>Enterprise Storage</value>
</data>
</root>

View file

@ -72,6 +72,7 @@
</td>
</tr>
</asp:Panel>
<asp:Panel runat="server" ID="exchangeStatsPanel">
<tr>
<td class="OrgStatsGroup" width="100%" colspan="2">
@ -214,6 +215,30 @@
</td>
</tr>
</asp:Panel>
<asp:Panel runat="server" ID="enterpriseStorageStatsPanel">
<tr>
<td class="OrgStatsGroup" width="100%" colspan="2">
<asp:Localize ID="locEnterpriseStorage" runat="server" meta:resourcekey="locEnterpriseStorage" ></asp:Localize>
</td>
</tr>
<tr class="OrgStatsRow">
<td align="right" nowrap>
<asp:HyperLink ID="lnkEnterpriseStorageSpace" runat="server" meta:resourcekey="lnkEnterpriseStorageSpace" />
</td>
<td>
<wsp:QuotaViewer ID="enterpriseStorageSpaceStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
<tr class="OrgStatsRow">
<td align="right" nowrap>
<asp:HyperLink ID="lnkEnterpriseStorageFolders" runat="server" meta:resourcekey="lnkEnterpriseStorageFolders"></asp:HyperLink>
</td>
<td>
<wsp:QuotaViewer ID="enterpriseStorageFoldersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
</asp:Panel>
</table>
</div>

View file

@ -232,6 +232,13 @@ namespace WebsitePanel.Portal.ExchangeServer
crmStatsPanel.Visible = false;
if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
{
enterpriseStorageStatsPanel.Visible = true;
BindEnterpriseStorageStats(orgStats, tenantStats);
}
else
enterpriseStorageStatsPanel.Visible = false;
}
private void BindCRMStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
@ -275,5 +282,22 @@ namespace WebsitePanel.Portal.ExchangeServer
"SpaceID=" + PanelSecurity.PackageId.ToString());
}
private void BindEnterpriseStorageStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
{
enterpriseStorageSpaceStats.QuotaValue = stats.AllocatedEnterpriseStorageSpace;
enterpriseStorageSpaceStats.QuotaUsedValue = stats.UsedEnterpriseStorageSpace;
if (stats.AllocatedEnterpriseStorageSpace != -1) enterpriseStorageSpaceStats.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageSpace - tenantStats.UsedEnterpriseStorageSpace;
lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_folders",
"SpaceID=" + PanelSecurity.PackageId.ToString());
enterpriseStorageFoldersStats.QuotaValue = stats.AllocatedEnterpriseStorageFolders;
enterpriseStorageFoldersStats.QuotaUsedValue = stats.CreatedEnterpriseStorageFolders;
if (stats.AllocatedEnterpriseStorageFolders != -1) enterpriseStorageFoldersStats.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageFolders - tenantStats.CreatedEnterpriseStorageFolders;
lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_folders",
"SpaceID=" + PanelSecurity.PackageId.ToString());
}
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2012, 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.
@ -534,5 +506,59 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer crmUsersStats;
/// <summary>
/// enterpriseStorageStatsPanel 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.Panel enterpriseStorageStatsPanel;
/// <summary>
/// locEnterpriseStorage 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.Localize locEnterpriseStorage;
/// <summary>
/// lnkEnterpriseStorageSpace 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 lnkEnterpriseStorageSpace;
/// <summary>
/// enterpriseStorageSpaceStats control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer enterpriseStorageSpaceStats;
/// <summary>
/// lnkEnterpriseStorageFolders 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 lnkEnterpriseStorageFolders;
/// <summary>
/// enterpriseStorageFoldersStats control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer enterpriseStorageFoldersStats;
}
}

View file

@ -397,6 +397,7 @@
</Compile>
<Compile Include="ProviderControls\EnterpriseStorage_Settings.ascx.cs">
<DependentUpon>EnterpriseStorage_Settings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ProviderControls\EnterpriseStorage_Settings.ascx.designer.cs">
<DependentUpon>EnterpriseStorage_Settings.ascx</DependentUpon>