diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs
index d4f352f2..c9aaffe0 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs
@@ -1050,7 +1050,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
ret = lync.GetPolicyList(type, name);
}
}
- catch (Exception ex)
+ catch (Exception)
{
}
finally
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs
index ed0332dc..ed271941 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs
@@ -73,8 +73,6 @@ namespace WebsitePanel.Providers.HostedSolution
foreach (string str in props)
{
- string groupName = "";
-
string[] parts = str.Split(',');
for (int i = 0; i < parts.Length; i++)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs
index 1030c519..c76cb539 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs
@@ -43,6 +43,7 @@ namespace WebsitePanel.Providers.OS
private long size;
private long quota;
private bool isEmpty;
+ private bool isPublished;
public SystemFile()
{
@@ -89,10 +90,23 @@ namespace WebsitePanel.Providers.OS
set { size = value; }
}
+ public long Quota
+ {
+ get { return quota; }
+ set { quota = value; }
+ }
+
public bool IsEmpty
{
get { return this.isEmpty; }
set { this.isEmpty = value; }
}
+
+ public bool IsPublished
+ {
+ get { return this.isPublished; }
+ set { this.isPublished = value; }
+ }
+
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
index 26ba29ee..ab57a7c8 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
@@ -550,6 +550,8 @@
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons.skin b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons.skin
index 5f9f29c4..4d334ddb 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons.skin
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons.skin
@@ -92,3 +92,6 @@ Default skin template. The following skins are provided as examples only.
+
+<%-- Enterprise Storage Icons --%>
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces16.png b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces16.png
new file mode 100644
index 00000000..973a7b95
Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces16.png differ
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces48.png b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces48.png
new file mode 100644
index 00000000..4a4bbf31
Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces48.png differ
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/EnterpriseStorageSpaces.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/EnterpriseStorageSpaces.ascx.resx
new file mode 100644
index 00000000..755d9f99
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/EnterpriseStorageSpaces.ascx.resx
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Add New Space
+
+
+ if(!confirm('Are you sure you want to delete selected space?')) return false; else ShowProgressDialog('Deleting Space...');
+
+
+ Delete
+
+
+ Delete Space
+
+
+ No spaces have been added yet. To add a new space click "Add New Space" button.
+
+
+ Space Name
+
+
+
+
+
+ Total Spaces Allocated:
+
+
+ Enterprise Storage Spaces
+
+
+ Enterprise Storage Spaces
+
+
+ Manage
+
+
+ Publish
+
+
+ Quota
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx
new file mode 100644
index 00000000..d90bbb46
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx
@@ -0,0 +1,84 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageSpaces.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.EnterpriseStorageSpaces" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
meta:resourcekey="btnPublish" runat="server" CommandName="Publish" CommandArgument='<%# Eval("Name") + "|" + Eval("IsPublished").ToString() %>'/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.cs
new file mode 100644
index 00000000..9de6ea49
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.cs
@@ -0,0 +1,172 @@
+// 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.
+
+using System;
+using System.Web.UI.WebControls;
+using WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.HostedSolution;
+
+namespace WebsitePanel.Portal.ExchangeServer
+{
+ public partial class EnterpriseStorageSpaces : WebsitePanelModuleBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ BindStats();
+
+ // bind domain names
+ BindEnterpriseStorageSpaces();
+ }
+
+
+ }
+
+ private void BindStats()
+ {
+ // set quotas
+ OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
+ OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
+ spacesQuota.QuotaUsedValue = stats.CreatedEnterpriseStorageFolders;
+ spacesQuota.QuotaValue = stats.AllocatedEnterpriseStorageFolders;
+ if (stats.AllocatedEnterpriseStorageFolders != -1) spacesQuota.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageFolders - tenantStats.CreatedEnterpriseStorageFolders;
+ }
+
+ public string GetSpaceRecordsEditUrl(string spaceName)
+ {
+ return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_edit",
+ "SpaceName=" + spaceName,
+ "ItemID=" + PanelRequest.ItemID);
+ }
+
+ private void BindEnterpriseStorageSpaces()
+ {
+ WebsitePanel.Providers.OS.SystemFile[] list = ES.Services.EnterpriseStorage.GetEnterpriseFolders(PanelRequest.ItemID);
+
+ gvSpaces.DataSource = list;
+ gvSpaces.DataBind();
+ }
+
+ public string IsPublished(bool val)
+ {
+ return val ? "UnPublish" : "Publish";
+ }
+
+ protected void btnAddSpace_Click(object sender, EventArgs e)
+ {
+
+ Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_add",
+ "SpaceID=" + PanelSecurity.PackageId));
+ }
+
+ protected void gvDomains_RowCommand(object sender, GridViewCommandEventArgs e)
+ {
+ if (e.CommandName == "DeleteItem")
+ {
+ // delete domain
+ int domainId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
+
+ try
+ {
+ int result = ES.Services.Organizations.DeleteOrganizationDomain(PanelRequest.ItemID, domainId);
+ if (result < 0)
+ {
+ messageBox.ShowErrorMessage("EXCHANGE_UNABLE_TO_DELETE_DOMAIN");
+ }
+
+ // rebind domains
+ BindDomainNames();
+
+ BindStats();
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("EXCHANGE_DELETE_DOMAIN", ex);
+ }
+ }
+ else if (e.CommandName == "Change")
+ {
+ string[] commandArgument = e.CommandArgument.ToString().Split('|');
+ int domainId = Utils.ParseInt(commandArgument[0].ToString(), 0);
+ ExchangeAcceptedDomainType acceptedDomainType = (ExchangeAcceptedDomainType)Enum.Parse(typeof(ExchangeAcceptedDomainType), commandArgument[1]);
+
+
+ try
+ {
+
+ ExchangeAcceptedDomainType newDomainType = ExchangeAcceptedDomainType.Authoritative;
+ if (acceptedDomainType == ExchangeAcceptedDomainType.Authoritative)
+ newDomainType = ExchangeAcceptedDomainType.InternalRelay;
+
+ int result = ES.Services.Organizations.ChangeOrganizationDomainType(PanelRequest.ItemID, domainId, newDomainType);
+ if (result < 0)
+ {
+ messageBox.ShowResultMessage(result);
+ return;
+ }
+
+ // rebind domains
+ BindDomainNames();
+
+ BindStats();
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("EXCHANGE_CHANGE_DOMAIN", ex);
+ }
+ }
+ }
+
+ protected void btnSetDefaultDomain_Click(object sender, EventArgs e)
+ {
+ // get domain
+ int domainId = Utils.ParseInt(Request.Form["DefaultDomain"], 0);
+
+ try
+ {
+ int result = ES.Services.Organizations.SetOrganizationDefaultDomain(PanelRequest.ItemID, domainId);
+ if (result < 0)
+ {
+ messageBox.ShowResultMessage(result);
+ if (BusinessErrorCodes.ERROR_USER_ACCOUNT_DEMO == result)
+ BindDomainNames();
+ return;
+ }
+
+ // rebind domains
+ BindDomainNames();
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("EXCHANGE_SET_DEFAULT_DOMAIN", ex);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.designer.cs
new file mode 100644
index 00000000..d78f5ca8
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.designer.cs
@@ -0,0 +1,105 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebsitePanel.Portal.ExchangeServer {
+
+
+ public partial class EnterpriseStorageSpaces {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// breadcrumb control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
+
+ ///
+ /// menu control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
+
+ ///
+ /// Image1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image Image1;
+
+ ///
+ /// locTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locTitle;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// btnAddSpace control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAddSpace;
+
+ ///
+ /// gvSpaces control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvSpaces;
+
+ ///
+ /// locQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locQuota;
+
+ ///
+ /// spacesQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaViewer spacesQuota;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx
index aac6db39..33a5df4a 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx
@@ -148,7 +148,7 @@
Mailboxes
- Organization's
+ Organization
CRM
@@ -204,4 +204,10 @@
Groups
+
+ Enterprise Storage
+
+
+ Spaces
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs
index 639a8fed..4fa2b70e 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs
@@ -249,6 +249,17 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
groups.Add(lyncGroup);
}
+ private void PrepareEnterpriseStorageMenu(PackageContext cntx, List groups, string imagePath)
+ {
+ MenuGroup enterpriseStorageGroup =
+ new MenuGroup(GetLocalizedString("Text.EnterpriseStorageGroup"), imagePath + "spaces16.png");
+
+ enterpriseStorageGroup.MenuItems.Add(CreateMenuItem("EnterpriseStorageSpaces", "enterprisestorage_spaces"));
+
+ groups.Add(enterpriseStorageGroup);
+ }
+
+
private List PrepareMenu()
{
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
@@ -289,6 +300,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (cntx.Groups.ContainsKey(ResourceGroups.Lync))
PrepareLyncMenu(cntx, groups, imagePath);
+ //EnterpriseStorage Menu
+ if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
+ PrepareEnterpriseStorageMenu(cntx, groups, imagePath);
+
+
return groups;
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
index 7cf454e4..62b14064 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
@@ -209,6 +209,13 @@
+
+ EnterpriseStorageSpaces.ascx
+ ASPXCodeBehind
+
+
+ EnterpriseStorageSpaces.ascx
+
OrganizationSecurityGroupMemberOf.ascx
ASPXCodeBehind
@@ -411,6 +418,7 @@
EnterpriseStorage_Settings.ascx
+ ASPXCodeBehind
EnterpriseStorage_Settings.ascx
@@ -3986,6 +3994,7 @@
+
@@ -5216,6 +5225,9 @@
Designer
+
+ Designer
+
Designer
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj
index d4f55c36..c5ae723d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj
@@ -120,6 +120,8 @@
+
+