diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs
index 7a483c39..d582425b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs
@@ -249,6 +249,21 @@ namespace WebsitePanel.Portal.ExchangeServer
else
sharePointStatsPanel.Visible = false;
+ //Show SharePoint statistics
+ if (cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
+ {
+ sharePointEnterpriseStatsPanel.Visible = true;
+
+ lnkSiteCollections.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_enterprise_sitecollections",
+ "SpaceID=" + PanelSecurity.PackageId);
+ enterpriseSiteCollectionsStats.QuotaUsedValue = orgStats.CreatedSharePointEnterpriseSiteCollections;
+ enterpriseSiteCollectionsStats.QuotaValue = orgStats.AllocatedSharePointEnterpriseSiteCollections;
+ if (orgStats.AllocatedSharePointEnterpriseSiteCollections != -1) enterpriseSiteCollectionsStats.QuotaAvailable = tenantStats.AllocatedSharePointEnterpriseSiteCollections - tenantStats.CreatedSharePointEnterpriseSiteCollections;
+ }
+ else
+ sharePointEnterpriseStatsPanel.Visible = false;
+
+
if (cntx.Groups.ContainsKey(ResourceGroups.OCS))
{
ocsStatsPanel.Visible = true;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.designer.cs
index 26a5655d..4f73dfe2 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.designer.cs
@@ -525,6 +525,42 @@ namespace WebsitePanel.Portal.ExchangeServer {
///
protected global::WebsitePanel.Portal.QuotaViewer siteCollectionsStats;
+ ///
+ /// sharePointEnterpriseStatsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel sharePointEnterpriseStatsPanel;
+
+ ///
+ /// locSharePointEnterprise control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locSharePointEnterprise;
+
+ ///
+ /// lnkEnterpriseSiteCollections control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink lnkEnterpriseSiteCollections;
+
+ ///
+ /// enterpriseSiteCollectionsStats control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaViewer enterpriseSiteCollectionsStats;
+
///
/// ocsStatsPanel control.
///
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 6563c74a..cd6d756e 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
@@ -168,8 +168,8 @@
SharePoint Foundation
-
- SharePoint Server
+
+ SharePoint Enterprise
OCS
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 45d1f8c5..359e8091 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
@@ -251,6 +251,20 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
groups.Add(sharepointGroup);
+ }
+
+
+ private void PrepareSharePointEnterpriseMenu(PackageContext cntx, List groups, string imagePath, string menuItemText)
+ {
+ MenuGroup sharepointGroup =
+ new MenuGroup(menuItemText, imagePath + "sharepoint24.png");
+ sharepointGroup.MenuItems.Add(CreateMenuItem("SiteCollections", "sharepoint_enterprise_sitecollections"));
+ sharepointGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "sharepoint_enterprise_storage_usage"));
+ sharepointGroup.MenuItems.Add(CreateMenuItem("StorageLimits", "sharepoint_enterprise_storage_settings"));
+
+ groups.Add(sharepointGroup);
+
+
}
private void PrepareOCSMenu(PackageContext cntx, List groups, string imagePath)
@@ -319,9 +333,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
PrepareSharePointMenu(cntx, groups, imagePath, GetLocalizedString("Text.SharePointFoundationServerGroup"));
}
- if (cntx.Groups.ContainsKey(ResourceGroups.SharepointServer))
+ if (cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
- PrepareSharePointMenu(cntx, groups, imagePath, GetLocalizedString("Text.SharePointServerGroup"));
+ PrepareSharePointEnterpriseMenu(cntx, groups, imagePath, GetLocalizedString("Text.SharePointEnterpriseServerGroup"));
}
//CRM Menu
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointBackupSiteCollection.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointBackupSiteCollection.ascx.resx
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointBackupSiteCollection.ascx.resx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointBackupSiteCollection.ascx.resx
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointEditSiteCollection.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEditSiteCollection.ascx.resx
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointEditSiteCollection.ascx.resx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEditSiteCollection.ascx.resx
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseBackupSiteCollection.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseBackupSiteCollection.ascx.resx
new file mode 100644
index 00000000..c931ca06
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseBackupSiteCollection.ascx.resx
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Backup
+
+
+ Cancel
+
+
+ ZIP Backup
+
+
+ <p>The backup file that you create includes list or library content, security settings, user information, navigation, customizations, and personalizations (such as views, site templates, and content types). The backup file does not include workflows, alerts, and properties stored at the site collection level.</p>
+
+
+ Backup Destination:
+
+
+ Backup File Name:
+
+
+ Backup Options:
+
+
+ Backup SharePoint Site Collection
+
+
+ Copy to Folder
+
+
+ Download via HTTP
+
+
+ Backup SharePoint Site Collection
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseEditSiteCollection.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseEditSiteCollection.ascx.resx
new file mode 100644
index 00000000..856828c3
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseEditSiteCollection.ascx.resx
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Backup Site Collection
+
+
+ Cancel
+
+
+ ShowProgressDialog('Deleting SharePoint site collection...');
+
+
+ Delete
+
+
+ Restore Site Collection
+
+
+ ShowProgressDialog('Updating SharePoint site collection...');
+
+
+ Update
+
+
+ <p>Here you can create new SharePoint site collection. Choose URL from the list of domains you already own. Site URL like team.yourcompany.com should be added as domain in “Domain names” organization’s menu before SharePoint site collection creation.</p>
+
+<p><b>Site owner</b> is member of your organization who will be responsible for this SharePoint site collection administration: choosing site templates, adding other users, creating sub-sites.</p>
+
+<p><b>Locale ID</b> defines your site language and can not be changed after site creation. However child sub sites can use another Locale IDs.</p>
+
+<p>Title will be visible in site header.</p>
+
+<p><b>Description</b> will be visible when you open site on the top of the main site page.</p>
+
+<p>After you create this site open it using owner login, and do at least 2 main steps:
+1. Choose site template
+2. Define who will be able to access this site. To add user from your hosted organization to SharePoint site, please copy/paste his or her e-mail from user's properties in WebsitePanel to SharePoint site collection’s Users/Groups field.</p>
+
+
+ Email
+
+
+ User Name
+
+
+ Description:
+
+
+ Locale ID:
+
+
+ Owner:
+
+
+ Url:
+
+
+ Title:
+
+
+ Send warning E-mail when site storage reaches (MB):
+
+
+ Full list of locales
+
+
+ SharePoint Site Collection
+
+
+ SharePoint Site Collection Tools
+
+
+ Add Site Collection
+
+
+ Edit SharePoint Site Collection
+
+
+ Update
+
+
+ Maximum site storage size (MB):
+
+
+ Do not send
+
+
+ ShowProgressDialog('Creating SharePoint site collection...');
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointRestoreSiteCollection.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseRestoreSiteCollection.ascx.resx
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointRestoreSiteCollection.ascx.resx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseRestoreSiteCollection.ascx.resx
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseSiteCollections.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseSiteCollections.ascx.resx
new file mode 100644
index 00000000..224fd542
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseSiteCollections.ascx.resx
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Add SharePoint Enterprise Site Collection
+
+
+ Create New Site Collection
+
+
+ Delete
+
+
+ Url
+
+
+ <p><b>SharePoint site collection</b> is a group of sites built on Microsoft Windows SharePoint Services that all exist under a top-level site. To make managing the sites and their content more convenient, you can assign users to be site collection administrators or site collection owners. These are permission levels to give to users who you want to have full administrative rights to all sites and content within a site collection.</p>
+
+
+ Owner
+
+
+ No SharePoint site collections have been created. To create a SharePoint site collection click "Create New Site Collection" button.
+
+
+ Site Collection Url
+
+
+ Total Site Collections Created:
+
+
+ SharePoint Enterprise Site Collections
+
+
+ SharePoint Enterprise Site Collections
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointStorageSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseStorageSettings.ascx.resx
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointStorageSettings.ascx.resx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseStorageSettings.ascx.resx
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointStorageUsage.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseStorageUsage.ascx.resx
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointStorageUsage.ascx.resx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointEnterpriseStorageUsage.ascx.resx
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointRestoreSiteCollection.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointRestoreSiteCollection.ascx.resx
new file mode 100644
index 00000000..06164c47
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointRestoreSiteCollection.ascx.resx
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Cancel
+
+
+ ShowProgressDialog('Restoring SharePoint site collection...');
+
+
+ Restore
+
+
+ <p>After site collection is restored it will have primary administrator assigned to it as it was before restoration (primary administrator record from backup is ignored).</p>
+
+
+ .ZIP, .BAK files are allowed
+
+
+ Restore From:
+
+
+ Restore SharePoint Site Collection
+
+
+ Hosting Space File
+
+
+ Uploaded File
+
+
+ Restore SharePoint Site Collection
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointSiteCollections.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointSiteCollections.ascx.resx
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/HostedSharePointSiteCollections.ascx.resx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointSiteCollections.ascx.resx
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointStorageSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointStorageSettings.ascx.resx
new file mode 100644
index 00000000..062e04df
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointStorageSettings.ascx.resx
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Save
+
+
+ Save and Apply to All Site Collections
+
+
+ <p>Storage settings are used to limit the amount of storage available on a SharePoint site collection, and they are used to send e-mail alerts to the site administrator when a specified value of space is used.</p>
+
+<p>These settings will be applied to the new site collections only. By clicking "Save and Apply to All Site Collections" button you can override these settings for all existing site collections.</p>
+
+<p>Please note, that you cannot specify storage settings higher than defined in the space hosting plan.</p>
+
+
+ Maximum site storage size (MB):
+
+
+ Send warning E-mail when site storage reaches (MB):
+
+
+ Storage Settings
+
+
+ Storage Settings
+
+
+ Storage Settings
+
+
+ Don't use
+
+
+ Do not send
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointStorageUsage.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointStorageUsage.ascx.resx
new file mode 100644
index 00000000..b945ab03
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/App_LocalResources/HostedSharePointStorageUsage.ascx.resx
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Recalculate Disk Space
+
+
+ <p>SharePoint disk space usage is calculated on timely basis (usually once a day). You can recalculate it right now by clicking "Recalculate Disk Space" button.</p>
+
+
+ Site Collection
+
+
+ Total Size, MB
+
+
+ There are no site collections
+
+
+ Storage Usage
+
+
+ Site Collections
+
+
+ Storage Usage
+
+
+ Total Size (MB):
+
+
+ Total Items:
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx
similarity index 87%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx
index 932d7aa8..743a1ec4 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx
@@ -1,10 +1,11 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointBackupSiteCollection.ascx.cs"
Inherits="WebsitePanel.Portal.HostedSharePointBackupSiteCollection" %>
-<%@ Register Src="UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
-<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+<%@ Register Src="../UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
-
-<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx.cs
similarity index 90%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx.cs
index 4171ea68..5e1afb37 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx.cs
@@ -61,11 +61,6 @@ namespace WebsitePanel.Portal
}
}
- public static string GroupName
- {
- get { return HttpContext.Current.Request["GroupName"]; }
- }
-
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
@@ -165,10 +160,10 @@ namespace WebsitePanel.Portal
RedirectBack();
}
- private void RedirectBack()
- {
- HttpContext.Current.Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
- }
+ private void RedirectBack()
+ {
+ HttpContext.Current.Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
+ }
protected void chkZipBackup_CheckedChanged(object sender, EventArgs e)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx.designer.cs
similarity index 75%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.designer.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx.designer.cs
index fd9c426c..6bd4aa9e 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx.designer.cs
@@ -1,31 +1,3 @@
-// Copyright (c) 2015, 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.
-
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx
similarity index 87%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx
index d80139d7..ad030d8c 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx
@@ -1,13 +1,14 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEditSiteCollection.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEditSiteCollection" %>
-<%@ Register Src="ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/AllocatePackageIPAddresses.ascx" TagName="SiteUrlBuilder" TagPrefix="wsp" %>
-<%@ Register Src="ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
-<%@ Register src="UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
-<%@ Register Src="DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
+<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/AllocatePackageIPAddresses.ascx" TagName="SiteUrlBuilder" TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+<%@ Register src="../UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
+<%@ Register Src="../DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx.cs
similarity index 91%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx.cs
index 89ce616c..1c150ca9 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx.cs
@@ -44,11 +44,6 @@ namespace WebsitePanel.Portal
{
SharePointSiteCollection item = null;
- public static string GroupName
- {
- get { return HttpContext.Current.Request["GroupName"]; }
- }
-
private int OrganizationId
{
get
@@ -230,7 +225,7 @@ namespace WebsitePanel.Portal
/// Reserved disk space vallue.
private int GetReservedDiskStorageSpace()
{
- var existingCollections = ES.Services.HostedSharePointServers.GetSiteCollections(PanelSecurity.PackageId, false, GroupName);
+ var existingCollections = ES.Services.HostedSharePointServers.GetSiteCollections(PanelSecurity.PackageId, false);
return (int)existingCollections.Sum(siteCollection => siteCollection.MaxSiteStorage);
}
@@ -257,20 +252,9 @@ namespace WebsitePanel.Portal
{
item = new SharePointSiteCollection();
- string groupName = GroupName;
-
- if (ResourceGroups.SharepointFoundationServer.Replace(" ", "").Equals(groupName))
- {
- groupName = ResourceGroups.SharepointFoundationServer;
- }
- else if (ResourceGroups.SharepointServer.Replace(" ", "").Equals(groupName))
- {
- groupName = ResourceGroups.SharepointServer;
- }
-
- if (!UseSharedSLL(PanelSecurity.PackageId))
+ if (!UseSharedSLL(PanelSecurity.PackageId))
{
- SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue, groupName);
+ SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue);
foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
{
Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
@@ -303,7 +287,7 @@ namespace WebsitePanel.Portal
item.MaxSiteStorage = maxStorage.QuotaValue;
item.WarningStorage = warningStorage.QuotaValue;
- int result = ES.Services.HostedSharePointServers.AddSiteCollection(item, groupName);
+ int result = ES.Services.HostedSharePointServers.AddSiteCollection(item);
if (result < 0)
{
localMessageBox.ShowResultMessage(result);
@@ -390,19 +374,19 @@ namespace WebsitePanel.Portal
protected void btnBackup_Click(object sender, EventArgs e)
{
- Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
+ Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
protected void btnRestore_Click(object sender, EventArgs e)
{
- Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
+ Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
private void RedirectToSiteCollectionsList()
{
- Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
+ Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString()));
}
private bool UseSharedSLL(int packageID)
@@ -420,13 +404,6 @@ namespace WebsitePanel.Portal
return true;
}
- break;
- case 552:
- if (Convert.ToBoolean(quota.QuotaAllocatedValue))
- {
- return true;
- }
-
break;
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx.designer.cs
similarity index 88%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.designer.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx.designer.cs
index b82a5dd1..6801e4b1 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx.designer.cs
@@ -1,31 +1,3 @@
-// Copyright (c) 2015, 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.
-
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx
new file mode 100644
index 00000000..f680ba4a
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx
@@ -0,0 +1,80 @@
+<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEnterpriseBackupSiteCollection.ascx.cs"
+ Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseBackupSiteCollection" %>
+<%@ Register Src="../UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+ TagPrefix="wsp" %>
+
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+ TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+ |
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx.cs
new file mode 100644
index 00000000..6a74ea65
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx.cs
@@ -0,0 +1,189 @@
+// Copyright (c) 2015, 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.Data;
+using System.Configuration;
+using System.Collections;
+using System.IO;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using WebsitePanel.Providers.SharePoint;
+
+namespace WebsitePanel.Portal
+{
+ public partial class HostedSharePointEnterpriseBackupSiteCollection : WebsitePanelModuleBase
+ {
+ private const string BACKUP_EXTENSION = ".bsh";
+
+ private int OrganizationId
+ {
+ get
+ {
+ return PanelRequest.GetInt("ItemID");
+ }
+ }
+
+ private int SiteCollectionId
+ {
+ get
+ {
+ return PanelRequest.GetInt("SiteCollectionID");
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ BindSite();
+ }
+ }
+
+ private void BindSite()
+ {
+ try
+ {
+ SharePointEnterpriseSiteCollection siteCollection = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollection(this.SiteCollectionId);
+ litSiteCollectionName.Text = siteCollection.PhysicalAddress;
+ txtBackupName.Text = siteCollection.Url + BACKUP_EXTENSION;
+ fileLookup.SelectedFile = "\\";
+ fileLookup.PackageId = siteCollection.PackageId;
+
+ BindBackupName();
+ ToggleControls();
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("SHAREPOINT_GET_SITE", ex);
+ return;
+ }
+ }
+
+ private void BindBackupName()
+ {
+ string backupName = Path.GetFileNameWithoutExtension(txtBackupName.Text);
+ txtBackupName.Text = backupName + (chkZipBackup.Checked ? ".zip" : BACKUP_EXTENSION);
+ }
+
+ private void ToggleControls()
+ {
+ fileLookup.Visible = rbCopy.Checked;
+ }
+
+ private void BackupSiteCollection()
+ {
+ try
+ {
+ string bakFile = ES.Services.HostedSharePointServersEnt.Enterprise_BackupSiteCollection(this.SiteCollectionId,
+ txtBackupName.Text, chkZipBackup.Checked, rbDownload.Checked, fileLookup.SelectedFile);
+
+ if (rbDownload.Checked && !String.IsNullOrEmpty(bakFile))
+ {
+
+ string fileName = bakFile;
+
+ //Response.Clear();
+ Response.AddHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(fileName));
+ Response.ContentType = "application/octet-stream";
+
+ int FILE_BUFFER_LENGTH = 5000000;
+ byte[] buffer = null;
+ int offset = 0;
+ do
+ {
+ // Read remote content.
+ buffer = ES.Services.HostedSharePointServersEnt.Enterprise_GetBackupBinaryChunk(this.SiteCollectionId, fileName, offset, FILE_BUFFER_LENGTH);
+
+ // Write to stream.
+ //Response.BinaryWrite(buffer);
+ Response.OutputStream.Write(buffer, 0, buffer.Length);
+ offset += FILE_BUFFER_LENGTH;
+ }
+ while (buffer.Length == FILE_BUFFER_LENGTH);
+
+ Response.Flush();
+ Response.End();
+ //Response.Close();
+ //HttpContext.Current.ApplicationInstance.CompleteRequest();
+ //Response.End();
+
+ }
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("SHAREPOINT_BACKUP_SITE", ex);
+ return;
+ }
+ //Response.ClearContent();
+ Context.Response.Clear();
+ if (!rbDownload.Checked)
+ RedirectBack();
+
+ }
+
+ protected void btnBackup_Click(object sender, EventArgs e)
+ {
+ BackupSiteCollection();
+ }
+ protected void btnCancel_Click(object sender, EventArgs e)
+ {
+ RedirectBack();
+ }
+
+ private void RedirectBack()
+ {
+ HttpContext.Current.Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
+ }
+
+ protected void chkZipBackup_CheckedChanged(object sender, EventArgs e)
+ {
+ BindBackupName();
+ }
+
+ protected void rbDownload_CheckedChanged(object sender, EventArgs e)
+ {
+ ToggleControls();
+ }
+
+ protected override void OnPreRender(EventArgs e)
+ {
+ string str = string.Format("var rb = document.getElementById('{0}'); if (!rb.checked) ShowProgressDialog('Backing up site collection...');", rbDownload.ClientID);
+
+
+
+ btnBackup.Attributes.Add("onclick", str);
+ base.OnPreRender(e);
+ }
+
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx.designer.cs
new file mode 100644
index 00000000..b74025b4
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx.designer.cs
@@ -0,0 +1,159 @@
+//------------------------------------------------------------------------------
+//
+// 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 {
+
+
+ public partial class HostedSharePointEnterpriseBackupSiteCollection {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// 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;
+
+ ///
+ /// litSiteCollectionName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal litSiteCollectionName;
+
+ ///
+ /// lblBackupFileName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblBackupFileName;
+
+ ///
+ /// txtBackupName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtBackupName;
+
+ ///
+ /// validatorUserName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator validatorUserName;
+
+ ///
+ /// lblBackupOptions control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblBackupOptions;
+
+ ///
+ /// chkZipBackup control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox chkZipBackup;
+
+ ///
+ /// lblBackupDestination control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblBackupDestination;
+
+ ///
+ /// rbDownload control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButton rbDownload;
+
+ ///
+ /// rbCopy control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButton rbCopy;
+
+ ///
+ /// fileLookup control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.FileLookup fileLookup;
+
+ ///
+ /// btnBackup control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnBackup;
+
+ ///
+ /// btnCancel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx
new file mode 100644
index 00000000..5a4b5917
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx
@@ -0,0 +1,209 @@
+<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEnterpriseEditSiteCollection.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseEditSiteCollection" %>
+<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/AllocatePackageIPAddresses.ascx" TagName="SiteUrlBuilder" TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+<%@ Register src="../UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
+<%@ Register Src="../DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+ .
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx.cs
new file mode 100644
index 00000000..80585245
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx.cs
@@ -0,0 +1,450 @@
+// Copyright (c) 2015, 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.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Web;
+using System.Web.UI.WebControls;
+using WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.DNS;
+using WebsitePanel.Providers.HostedSolution;
+using WebsitePanel.Providers.SharePoint;
+
+
+namespace WebsitePanel.Portal
+{
+ public partial class HostedSharePointEnterpriseEditSiteCollection : WebsitePanelModuleBase
+ {
+ SharePointEnterpriseSiteCollection item = null;
+
+ private int OrganizationId
+ {
+ get
+ {
+ return PanelRequest.GetInt("ItemID");
+ }
+ }
+
+ private int SiteCollectionId
+ {
+ get
+ {
+ return PanelRequest.GetInt("SiteCollectionID");
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ domain.PackageId = PanelSecurity.PackageId;
+
+ warningStorage.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
+ editWarningStorage.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
+
+ bool newItem = (this.SiteCollectionId == 0);
+
+ tblEditItem.Visible = newItem;
+ tblViewItem.Visible = !newItem;
+
+ //btnUpdate.Visible = newItem;
+ btnDelete.Visible = !newItem;
+ btnUpdate.Text = newItem ? GetLocalizedString("Text.Add") : GetLocalizedString("Text.Update");
+ btnUpdate.OnClientClick = newItem ? GetLocalizedString("btnCreate.OnClientClick") : GetLocalizedString("btnUpdate.OnClientClick");
+
+ btnBackup.Enabled = btnRestore.Enabled = !newItem;
+
+ // bind item
+ BindItem();
+
+ }
+
+ private void BindItem()
+ {
+ try
+ {
+ if (!IsPostBack)
+ {
+ if (!this.IsDnsServiceAvailable())
+ {
+ localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_DNS");
+ }
+
+ // load item if required
+ if (this.SiteCollectionId > 0)
+ {
+ // existing item
+ item = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollection(this.SiteCollectionId);
+ if (item != null)
+ {
+ // save package info
+ ViewState["PackageId"] = item.PackageId;
+ }
+ else
+ RedirectToBrowsePage();
+ }
+ else
+ {
+ // new item
+ ViewState["PackageId"] = PanelSecurity.PackageId;
+ if (UseSharedSLL(PanelSecurity.PackageId))
+ {
+
+ rowUrl.Visible = false;
+ valRequireHostName.Enabled = false;
+ valRequireCorrectHostName.Enabled = false;
+ }
+ }
+
+ //this.gvUsers.DataBind();
+
+ List cultures = new List();
+ foreach (int localeId in ES.Services.HostedSharePointServersEnt.Enterprise_GetSupportedLanguages(PanelSecurity.PackageId))
+ {
+ cultures.Add(new CultureInfo(localeId, false));
+ }
+
+ this.ddlLocaleID.DataSource = cultures;
+ this.ddlLocaleID.DataBind();
+ }
+
+ if (!IsPostBack)
+ {
+ // bind item to controls
+ if (item != null)
+ {
+ // bind item to controls
+ lnkUrl.Text = item.PhysicalAddress;
+ lnkUrl.NavigateUrl = item.PhysicalAddress;
+ litSiteCollectionOwner.Text = String.Format("{0} ({1})", item.OwnerName, item.OwnerEmail);
+ litLocaleID.Text = new CultureInfo(item.LocaleId, false).DisplayName;
+ litTitle.Text = item.Title;
+ litDescription.Text = item.Description;
+ editWarningStorage.QuotaValue = (int)item.WarningStorage;
+ editMaxStorage.QuotaValue = (int)item.MaxSiteStorage;
+ }
+
+ Organization org = ES.Services.Organizations.GetOrganization(OrganizationId);
+
+ if (org != null)
+ {
+ SetStorageQuotas(org, item);
+ }
+ }
+ //OrganizationDomainName[] domains = ES.Services.Organizations.GetOrganizationDomains(PanelRequest.ItemID);
+
+ //DomainInfo[] domains = ES.Services.Servers.GetMyDomains(PanelSecurity.PackageId);
+
+ EnterpriseServer.DomainInfo[] domains = ES.Services.Servers.GetDomains(PanelSecurity.PackageId);
+
+ if (domains.Length == 0)
+ {
+ localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_DOMAINS");
+ DisableFormControls(this, btnCancel);
+ return;
+ }
+ //if (this.gvUsers.Rows.Count == 0)
+ //{
+ // localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_USERS");
+ // DisableFormControls(this, btnCancel);
+ // return;
+ //}
+ }
+ catch
+ {
+
+ localMessageBox.ShowWarningMessage("INIT_SERVICE_ITEM_FORM");
+
+ DisableFormControls(this, btnCancel);
+ return;
+ }
+ }
+
+ /// Checks and sets disk quotas values.
+ /// The organization.
+ /// The site collection.
+ private void SetStorageQuotas(Organization organization, SharePointEnterpriseSiteCollection collection)
+ {
+ var quotaValue = organization.MaxSharePointEnterpriseStorage;
+
+ if (quotaValue != -1)
+ {
+ var spaceResrved = GetReservedDiskStorageSpace();
+
+ if (spaceResrved > quotaValue)
+ {
+ quotaValue = 0;
+ }
+ else
+ {
+ quotaValue -= spaceResrved;
+ }
+
+ if (collection != null)
+ {
+ quotaValue += (int)collection.MaxSiteStorage;
+ }
+ }
+
+ maxStorage.ParentQuotaValue = quotaValue;
+ maxStorage.QuotaValue = quotaValue;
+ editMaxStorage.ParentQuotaValue = quotaValue;
+ warningStorage.ParentQuotaValue = quotaValue;
+ warningStorage.QuotaValue = quotaValue;
+ editWarningStorage.ParentQuotaValue = quotaValue;
+
+ btnUpdate.Enabled = quotaValue != 0;
+ }
+
+ /// Gets disk space reserved by existing site collections.
+ /// Reserved disk space vallue.
+ private int GetReservedDiskStorageSpace()
+ {
+ var existingCollections = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollections(PanelSecurity.PackageId, false);
+
+ return (int)existingCollections.Sum(siteCollection => siteCollection.MaxSiteStorage);
+ }
+
+ private void SaveItem()
+ {
+ if (!Page.IsValid)
+ {
+ return;
+ }
+
+
+ if (this.SiteCollectionId == 0)
+ {
+ if (this.userSelector.GetAccount() == null)
+ {
+ localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_USERS");
+ return;
+ }
+
+
+ // new item
+ try
+ {
+ item = new SharePointEnterpriseSiteCollection();
+
+ if (!UseSharedSLL(PanelSecurity.PackageId))
+ {
+ SharePointEnterpriseSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue);
+ foreach (SharePointEnterpriseSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
+ {
+ Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
+ if (existentSiteCollection.Name == String.Format("{0}://{1}", existentSiteCollectionUri.Scheme, this.txtHostName.Text.ToLower() + "." + this.domain.DomainName))
+ {
+ localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_DOMAIN_IN_USE");
+ return;
+ }
+ }
+
+ item.Name = this.txtHostName.Text.ToLower() + "." + this.domain.DomainName;
+ }
+ else
+ item.Name = string.Empty;
+
+ // get form data
+
+ item.OrganizationId = this.OrganizationId;
+ item.Id = this.SiteCollectionId;
+ item.PackageId = PanelSecurity.PackageId;
+
+ item.LocaleId = Int32.Parse(this.ddlLocaleID.SelectedValue);
+ item.OwnerLogin = this.userSelector.GetSAMAccountName();
+ item.OwnerEmail = this.userSelector.GetPrimaryEmailAddress();
+ item.OwnerName = this.userSelector.GetDisplayName();
+ item.Title = txtTitle.Text;
+ item.Description = txtDescription.Text;
+
+
+ item.MaxSiteStorage = maxStorage.QuotaValue;
+ item.WarningStorage = warningStorage.QuotaValue;
+
+ int result = ES.Services.HostedSharePointServersEnt.Enterprise_AddSiteCollection(item);
+ if (result < 0)
+ {
+ localMessageBox.ShowResultMessage(result);
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ localMessageBox.ShowErrorMessage("HOSTEDSHAREPOINT_ADD_SITECOLLECTION", ex);
+ return;
+ }
+ }
+ else
+ {
+ ES.Services.HostedSharePointServersEnt.Enterprise_UpdateQuota(PanelRequest.ItemID, SiteCollectionId, editMaxStorage.QuotaValue, editWarningStorage.QuotaValue);
+ }
+
+ // return
+ RedirectToSiteCollectionsList();
+ }
+
+ private void AddDnsRecord(int domainId, string recordName, string recordData)
+ {
+ int result = ES.Services.Servers.AddDnsZoneRecord(domainId, recordName, DnsRecordType.A, recordData, 0, 0, 0, 0);
+ if (result < 0)
+ {
+ ShowResultMessage(result);
+ }
+ }
+
+ private bool IsDnsServiceAvailable()
+ {
+ ProviderInfo dnsProvider = ES.Services.Servers.GetPackageServiceProvider(PanelSecurity.PackageId, ResourceGroups.Dns);
+ return dnsProvider != null;
+ }
+
+ private void DeleteItem()
+ {
+ // delete
+ try
+ {
+ int result = ES.Services.HostedSharePointServersEnt.Enterprise_DeleteSiteCollection(this.SiteCollectionId);
+ if (result < 0)
+ {
+ ShowResultMessage(result);
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ localMessageBox.ShowErrorMessage("HOSTEDSHAREPOINT_DELETE_SITECOLLECTION", ex);
+ return;
+ }
+
+ // return
+ RedirectToSiteCollectionsList();
+ }
+
+ protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ if (e.Exception != null)
+ {
+ localMessageBox.ShowErrorMessage("ORGANIZATION_GET_USERS", e.Exception);
+ e.ExceptionHandled = true;
+ }
+ }
+
+
+ protected void btnCancel_Click(object sender, EventArgs e)
+ {
+ // return
+ RedirectToSiteCollectionsList();
+ }
+
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ DeleteItem();
+ }
+
+ protected void btnUpdate_Click(object sender, EventArgs e)
+ {
+ SaveItem();
+ }
+
+ protected void btnBackup_Click(object sender, EventArgs e)
+ {
+ Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
+ }
+
+ protected void btnRestore_Click(object sender, EventArgs e)
+ {
+ Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
+ }
+
+
+
+ private void RedirectToSiteCollectionsList()
+ {
+ Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString()));
+ }
+
+ private bool UseSharedSLL(int packageID)
+ {
+ PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
+ if (cntx != null)
+ {
+ foreach (QuotaValueInfo quota in cntx.QuotasArray)
+ {
+ switch (quota.QuotaId)
+ {
+ case 552:
+ if (Convert.ToBoolean(quota.QuotaAllocatedValue))
+ {
+ return true;
+ }
+
+ break;
+ }
+ }
+ }
+
+ return false;
+ }
+
+
+ //private void RegisterOwnerSelector()
+ //{
+ // // Define the name and type of the client scripts on the page.
+ // String csname = "OwnerSelectorScript";
+ // Type cstype = this.GetType();
+
+ // // Get a ClientScriptManager reference from the Page class.
+ // ClientScriptManager cs = Page.ClientScript;
+
+ // // Check to see if the client script is already registered.
+ // if (!cs.IsClientScriptBlockRegistered(cstype, csname))
+ // {
+ // StringBuilder ownerSelector = new StringBuilder();
+ // ownerSelector.Append("");
+ // cs.RegisterClientScriptBlock(cstype, csname, ownerSelector.ToString(), false);
+ // }
+
+ //}
+
+ //private StringDictionary ConvertArrayToDictionary(string[] settings)
+ //{
+ // StringDictionary r = new StringDictionary();
+ // foreach (string setting in settings)
+ // {
+ // int idx = setting.IndexOf('=');
+ // r.Add(setting.Substring(0, idx), setting.Substring(idx + 1));
+ // }
+ // return r;
+ //}
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx.designer.cs
new file mode 100644
index 00000000..37f5fdf5
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx.designer.cs
@@ -0,0 +1,447 @@
+//------------------------------------------------------------------------------
+//
+// 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 {
+
+
+ public partial class HostedSharePointEnterpriseEditSiteCollection {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// 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;
+
+ ///
+ /// localMessageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox localMessageBox;
+
+ ///
+ /// tblEditItem control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTable tblEditItem;
+
+ ///
+ /// rowUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableRow rowUrl;
+
+ ///
+ /// lblSiteCollectionUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSiteCollectionUrl;
+
+ ///
+ /// txtHostName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtHostName;
+
+ ///
+ /// domain control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.DomainsSelectDomainControl domain;
+
+ ///
+ /// valRequireHostName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireHostName;
+
+ ///
+ /// valRequireCorrectHostName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RegularExpressionValidator valRequireCorrectHostName;
+
+ ///
+ /// lblSiteCollectionOwner control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSiteCollectionOwner;
+
+ ///
+ /// userSelector control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.ExchangeServer.UserControls.UserSelector userSelector;
+
+ ///
+ /// lblSiteCollectionLocaleID control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSiteCollectionLocaleID;
+
+ ///
+ /// ddlLocaleID control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlLocaleID;
+
+ ///
+ /// lblMaxStorage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblMaxStorage;
+
+ ///
+ /// maxStorage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaEditor maxStorage;
+
+ ///
+ /// lblWarningStorage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarningStorage;
+
+ ///
+ /// warningStorage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaEditor warningStorage;
+
+ ///
+ /// lblTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTitle;
+
+ ///
+ /// txtTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtTitle;
+
+ ///
+ /// valRequireTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireTitle;
+
+ ///
+ /// lblDescription control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDescription;
+
+ ///
+ /// txtDescription control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtDescription;
+
+ ///
+ /// RequiredFieldValidator1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
+
+ ///
+ /// tblViewItem control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTable tblViewItem;
+
+ ///
+ /// lblSiteCollectionUrl2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSiteCollectionUrl2;
+
+ ///
+ /// lnkUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink lnkUrl;
+
+ ///
+ /// lblSiteCollectionOwner2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSiteCollectionOwner2;
+
+ ///
+ /// litSiteCollectionOwner control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal litSiteCollectionOwner;
+
+ ///
+ /// lblSiteCollectionLocaleID2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSiteCollectionLocaleID2;
+
+ ///
+ /// litLocaleID control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal litLocaleID;
+
+ ///
+ /// lblMaxStorageView control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblMaxStorageView;
+
+ ///
+ /// editMaxStorage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaEditor editMaxStorage;
+
+ ///
+ /// lblWarningStorageView control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarningStorageView;
+
+ ///
+ /// editWarningStorage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaEditor editWarningStorage;
+
+ ///
+ /// lblTitle2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTitle2;
+
+ ///
+ /// litTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal litTitle;
+
+ ///
+ /// lblDescription2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDescription2;
+
+ ///
+ /// litDescription control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal litDescription;
+
+ ///
+ /// secMainTools control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.CollapsiblePanel secMainTools;
+
+ ///
+ /// ToolsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel ToolsPanel;
+
+ ///
+ /// tblMaintenance control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTable tblMaintenance;
+
+ ///
+ /// btnBackup control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnBackup;
+
+ ///
+ /// btnRestore control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRestore;
+
+ ///
+ /// btnUpdate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnUpdate;
+
+ ///
+ /// btnCancel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel;
+
+ ///
+ /// btnDelete control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnDelete;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx
new file mode 100644
index 00000000..b2a36898
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx
@@ -0,0 +1,101 @@
+<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEnterpriseRestoreSiteCollection.ascx.cs"
+ Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseRestoreSiteCollection" %>
+<%@ Register Src="../UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+ TagPrefix="wsp" %>
+6
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+
+
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+ TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx.cs
new file mode 100644
index 00000000..191c7546
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx.cs
@@ -0,0 +1,176 @@
+// Copyright (c) 2015, 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.Data;
+using System.Configuration;
+using System.Collections;
+using System.IO;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using WebsitePanel.Providers.SharePoint;
+
+namespace WebsitePanel.Portal
+{
+ public partial class HostedSharePointEnterpriseRestoreSiteCollection : WebsitePanelModuleBase
+ {
+ private int OrganizationId
+ {
+ get
+ {
+ return PanelRequest.GetInt("ItemID");
+ }
+ }
+
+ private int SiteCollectionId
+ {
+ get
+ {
+ return PanelRequest.GetInt("SiteCollectionID");
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ BindSite();
+ }
+ }
+
+ private void BindSite()
+ {
+ try
+ {
+ SharePointEnterpriseSiteCollection siteCollection = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollection(this.SiteCollectionId);
+ litSiteCollectionName.Text = siteCollection.PhysicalAddress;
+ fileLookup.SelectedFile = String.Empty;
+ fileLookup.PackageId = siteCollection.PackageId;
+
+ ToggleControls();
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("SHAREPOINT_GET_SITE", ex);
+ return;
+ }
+ }
+
+ private void ToggleControls()
+ {
+ cellFile.Visible = radioFile.Checked;
+ cellUploadFile.Visible = radioUpload.Checked;
+ }
+
+ private void RestoreSiteCollection()
+ {
+ try
+ {
+ string uploadedFile = null;
+ string packageFile = null;
+
+ if (radioUpload.Checked)
+ {
+ if (uploadFile.PostedFile.FileName != "")
+ {
+ Stream stream = uploadFile.PostedFile.InputStream;
+
+ // save uploaded file
+ int FILE_BUFFER_LENGTH = 5000000;
+ string path = null;
+ int readBytes = 0;
+ string fileName = Path.GetFileName(uploadFile.PostedFile.FileName);
+
+ int offset = 0;
+ do
+ {
+ // read input stream
+ byte[] buffer = new byte[FILE_BUFFER_LENGTH];
+ readBytes = stream.Read(buffer, 0, FILE_BUFFER_LENGTH);
+
+ if (readBytes < FILE_BUFFER_LENGTH)
+ Array.Resize(ref buffer, readBytes);
+
+ // write remote backup file
+ string tempPath = ES.Services.HostedSharePointServersEnt.Enterprise_AppendBackupBinaryChunk(this.SiteCollectionId, fileName, path, buffer);
+ if (path == null)
+ path = tempPath;
+
+ offset += FILE_BUFFER_LENGTH;
+ }
+ while (readBytes == FILE_BUFFER_LENGTH);
+
+ uploadedFile = path;
+ }
+ }
+ else
+ {
+ // package files
+ packageFile = fileLookup.SelectedFile;
+ }
+
+ int result = ES.Services.HostedSharePointServersEnt.Enterprise_RestoreSiteCollection(this.SiteCollectionId, uploadedFile, packageFile);
+ if (result < 0)
+ {
+ ShowResultMessage(result);
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ ShowErrorMessage("SHAREPOINT_RESTORE_SITE", ex);
+ return;
+ }
+
+ RedirectBack();
+ }
+
+ protected void btnRestore_Click(object sender, EventArgs e)
+ {
+ RestoreSiteCollection();
+ }
+
+ protected void btnCancel_Click(object sender, EventArgs e)
+ {
+ RedirectBack();
+ }
+
+ private void RedirectBack()
+ {
+ Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
+ }
+ protected void radioUpload_CheckedChanged(object sender, EventArgs e)
+ {
+ ToggleControls();
+ }
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx.designer.cs
new file mode 100644
index 00000000..444b7e6c
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx.designer.cs
@@ -0,0 +1,159 @@
+//------------------------------------------------------------------------------
+//
+// 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 {
+
+
+ public partial class HostedSharePointEnterpriseRestoreSiteCollection {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// 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;
+
+ ///
+ /// litSiteCollectionName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal litSiteCollectionName;
+
+ ///
+ /// lblRestoreFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblRestoreFrom;
+
+ ///
+ /// radioUpload control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButton radioUpload;
+
+ ///
+ /// radioFile control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButton radioFile;
+
+ ///
+ /// cellUploadFile control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell cellUploadFile;
+
+ ///
+ /// uploadFile control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.FileUpload uploadFile;
+
+ ///
+ /// lblAllowedFiles1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblAllowedFiles1;
+
+ ///
+ /// cellFile control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell cellFile;
+
+ ///
+ /// fileLookup control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.FileLookup fileLookup;
+
+ ///
+ /// lblAllowedFiles2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblAllowedFiles2;
+
+ ///
+ /// btnRestore control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRestore;
+
+ ///
+ /// btnCancel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx
new file mode 100644
index 00000000..02e376d4
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx
@@ -0,0 +1,92 @@
+<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEnterpriseSiteCollections.ascx.cs"
+ Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseSiteCollections" %>
+<%@ Register Src="../UserControls/SpaceServiceItems.ascx" TagName="SpaceServiceItems"
+ TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+ TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/Quota.ascx" TagName="Quota" TagPrefix="wsp" %>
+
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+ TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%# Eval("PhysicalAddress") %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- --%>
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx.cs
new file mode 100644
index 00000000..43fafca9
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx.cs
@@ -0,0 +1,110 @@
+// Copyright (c) 2015, 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.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.Collections.Generic;
+using WebsitePanel.Providers.SharePoint;
+using WebsitePanel.Providers.HostedSolution;
+
+namespace WebsitePanel.Portal
+{
+ public partial class HostedSharePointEnterpriseSiteCollections : WebsitePanelModuleBase
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ this.BindStats();
+ }
+
+ private void BindStats()
+ {
+ // quota values
+ OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
+ OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
+
+ siteCollectionsQuota.QuotaUsedValue = stats.CreatedSharePointEnterpriseSiteCollections;
+ siteCollectionsQuota.QuotaValue = stats.AllocatedSharePointEnterpriseSiteCollections;
+ if (stats.AllocatedSharePointEnterpriseSiteCollections != -1) siteCollectionsQuota.QuotaAvailable = tenantStats.AllocatedSharePointEnterpriseSiteCollections - tenantStats.CreatedSharePointEnterpriseSiteCollections;
+ }
+
+ protected void btnCreateSiteCollection_Click(object sender, EventArgs e)
+ {
+ Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_enterprise_edit_sitecollection", "SpaceID=" + PanelSecurity.PackageId.ToString()));
+ }
+
+ public string GetSiteCollectionEditUrl(string siteCollectionId)
+ {
+ return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_edit_sitecollection",
+ "SiteCollectionID=" + siteCollectionId,
+ "ItemID=" + PanelRequest.ItemID.ToString());
+ }
+
+ protected void odsSharePointEnterpriseSiteCollectionPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ if (e.Exception != null)
+ {
+ messageBox.ShowErrorMessage("HOSTEDSHAREPOINT_GET_SITECOLLECTIONS", e.Exception);
+ e.ExceptionHandled = true;
+ }
+ }
+
+ protected void gvSiteCollections_RowCommand(object sender, GridViewCommandEventArgs e)
+ {
+ if (e.CommandName == "DeleteItem")
+ {
+ int siteCollectionId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
+
+ try
+ {
+ int result = ES.Services.HostedSharePointServersEnt.Enterprise_DeleteSiteCollection(siteCollectionId);
+ if (result < 0)
+ {
+ messageBox.ShowResultMessage(result);
+ return;
+ }
+
+ gvSiteCollections.DataBind();
+ this.BindStats();
+ }
+ catch (Exception ex)
+ {
+ messageBox.ShowErrorMessage("HOSTEDSHAREPOINT_DELETE_SITECOLLECTION", ex);
+ }
+ }
+ }
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx.designer.cs
new file mode 100644
index 00000000..7c4bf6b7
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx.designer.cs
@@ -0,0 +1,141 @@
+//------------------------------------------------------------------------------
+//
+// 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 {
+
+
+ public partial class HostedSharePointEnterpriseSiteCollections {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// 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;
+
+ ///
+ /// btnCreateSiteCollection control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCreateSiteCollection;
+
+ ///
+ /// SearchPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel SearchPanel;
+
+ ///
+ /// locSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locSearch;
+
+ ///
+ /// ddlSearchColumn control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlSearchColumn;
+
+ ///
+ /// txtSearchValue control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
+
+ ///
+ /// cmdSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
+
+ ///
+ /// gvSiteCollections control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvSiteCollections;
+
+ ///
+ /// odsSiteCollectionsPaged control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsSiteCollectionsPaged;
+
+ ///
+ /// 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;
+
+ ///
+ /// siteCollectionsQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaViewer siteCollectionsQuota;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx
new file mode 100644
index 00000000..ab641896
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx
@@ -0,0 +1,62 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HostedSharePointEnterpriseStorageSettings.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseStorageSettings" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+ TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel"
+ TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+ TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+<%@ Register src="../UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx.cs
new file mode 100644
index 00000000..d2b2547b
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx.cs
@@ -0,0 +1,93 @@
+// Copyright (c) 2015, 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 WebsitePanel.EnterpriseServer;
+using WebsitePanel.Providers.HostedSolution;
+
+namespace WebsitePanel.Portal
+{
+ public partial class HostedSharePointEnterpriseStorageSettings : WebsitePanelModuleBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ warningValue.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
+
+
+ if (!IsPostBack)
+ {
+ Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
+
+ PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
+ foreach(QuotaValueInfo quota in cntx.QuotasArray)
+ {
+ if (quota.QuotaId == 551 /*Max storage quota*/)
+ {
+ maxStorageSettingsValue.ParentQuotaValue = quota.QuotaAllocatedValue;
+ warningValue.ParentQuotaValue = quota.QuotaAllocatedValue;
+ }
+ }
+
+ maxStorageSettingsValue.QuotaValue = org.MaxSharePointEnterpriseStorage;
+ warningValue.QuotaValue = org.WarningSharePointEnterpriseStorage;
+
+ }
+ }
+
+ private void Save(bool apply)
+ {
+ try
+ {
+ int res = ES.Services.HostedSharePointServersEnt.Enterprise_SetStorageSettings(PanelRequest.ItemID, maxStorageSettingsValue.QuotaValue,
+ warningValue.QuotaValue,
+ apply);
+ if (res < 0)
+ {
+ messageBox.ShowResultMessage(res);
+ return;
+ }
+ messageBox.ShowSuccessMessage("HOSTED_SHAREPOINT_UPDATE_QUOTAS");
+ }
+ catch (Exception)
+ {
+ messageBox.ShowErrorMessage("HOSTED_SHAREPOINT_UPDATE_QUOTAS");
+ }
+
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Save(false);
+ }
+
+ protected void btnSaveApply_Click(object sender, EventArgs e)
+ {
+ Save(true);
+ }
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx.designer.cs
new file mode 100644
index 00000000..26170885
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// 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 {
+
+
+ public partial class HostedSharePointEnterpriseStorageSettings {
+
+ ///
+ /// 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;
+
+ ///
+ /// secStorageLimits control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.CollapsiblePanel secStorageLimits;
+
+ ///
+ /// StorageLimits control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel StorageLimits;
+
+ ///
+ /// locMaxStorage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locMaxStorage;
+
+ ///
+ /// maxStorageSettingsValue control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaEditor maxStorageSettingsValue;
+
+ ///
+ /// locWarningStorage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locWarningStorage;
+
+ ///
+ /// warningValue control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaEditor warningValue;
+
+ ///
+ /// btnSave control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnSave;
+
+ ///
+ /// btnSaveApply control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnSaveApply;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx
new file mode 100644
index 00000000..5e30898b
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx
@@ -0,0 +1,57 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HostedSharePointEnterpriseStorageUsage.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseStorageUsage" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+ TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel"
+ TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+ TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ 177 |
+
+
+ |
+ 100 |
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx.cs
new file mode 100644
index 00000000..da030e66
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx.cs
@@ -0,0 +1,94 @@
+// Copyright (c) 2015, 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 WebsitePanel.Providers.SharePoint;
+
+namespace WebsitePanel.Portal
+{
+ public partial class HostedSharePointEnterpriseStorageUsage : WebsitePanelModuleBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ BindGrid();
+ }
+
+ protected void btnRecalculateDiscSpace_Click(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+
+ private void BindGrid()
+ {
+ int errorCode;
+ try
+ {
+ SharePointEnterpriseSiteDiskSpace[] sharePointEnterpriseSiteDiskSpace =
+ ES.Services.HostedSharePointServersEnt.Enterprise_CalculateSharePointSitesDiskSpace(PanelRequest.ItemID,
+ out errorCode);
+
+
+ if (errorCode < 0)
+ {
+ messageBox.ShowResultMessage(errorCode);
+ return;
+ }
+
+ if (sharePointEnterpriseSiteDiskSpace != null && sharePointEnterpriseSiteDiskSpace.Length == 1 && string.IsNullOrEmpty(sharePointEnterpriseSiteDiskSpace[0].Url))
+ {
+ gvStorageUsage.DataSource = null;
+ gvStorageUsage.DataBind();
+ lblTotalItems.Text = "0";
+ lblTotalSize.Text = "0";
+ return;
+ }
+
+ gvStorageUsage.DataSource = sharePointEnterpriseSiteDiskSpace;
+ gvStorageUsage.DataBind();
+
+ if (sharePointEnterpriseSiteDiskSpace != null)
+ {
+ lblTotalItems.Text = sharePointEnterpriseSiteDiskSpace.Length.ToString();
+
+ long total = 0;
+ foreach (SharePointEnterpriseSiteDiskSpace current in sharePointEnterpriseSiteDiskSpace)
+ {
+ total += current.DiskSpace;
+ }
+
+ lblTotalSize.Text = total.ToString();
+ }
+ }
+ catch(Exception ex)
+ {
+ messageBox.ShowErrorMessage("HOSTED_SHAREPOINT_RECALCULATE_SIZE", ex);
+ }
+ }
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx.designer.cs
new file mode 100644
index 00000000..a91f43f8
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// 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 {
+
+
+ public partial class HostedSharePointEnterpriseStorageUsage {
+
+ ///
+ /// 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;
+
+ ///
+ /// secSiteCollectionsReport control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.CollapsiblePanel secSiteCollectionsReport;
+
+ ///
+ /// siteCollectionsReport control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel siteCollectionsReport;
+
+ ///
+ /// gvStorageUsage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvStorageUsage;
+
+ ///
+ /// locTotalboxItems control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locTotalboxItems;
+
+ ///
+ /// lblTotalItems control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTotalItems;
+
+ ///
+ /// locTotalMailboxesSize control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locTotalMailboxesSize;
+
+ ///
+ /// lblTotalSize control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTotalSize;
+
+ ///
+ /// btnRecalculateDiscSpace control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRecalculateDiscSpace;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx
similarity index 88%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx
index 4b256403..abd8ad0c 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx
@@ -1,10 +1,13 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointRestoreSiteCollection.ascx.cs"
Inherits="WebsitePanel.Portal.HostedSharePointRestoreSiteCollection" %>
-<%@ Register Src="UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
-<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+<%@ Register Src="../UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
+6
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+
-<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx.cs
similarity index 93%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx.cs
index 74c9be70..de33f161 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx.cs
@@ -59,11 +59,6 @@ namespace WebsitePanel.Portal
}
}
- public static string GroupName
- {
- get { return HttpContext.Current.Request["GroupName"]; }
- }
-
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
@@ -171,7 +166,7 @@ namespace WebsitePanel.Portal
private void RedirectBack()
{
- Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
+ Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
protected void radioUpload_CheckedChanged(object sender, EventArgs e)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx.designer.cs
similarity index 75%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.designer.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx.designer.cs
index 061c85f8..c59bec70 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx.designer.cs
@@ -1,31 +1,3 @@
-// Copyright (c) 2015, 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.
-
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx
similarity index 85%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx
index a1734e43..7a5430e3 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx
@@ -1,13 +1,13 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointSiteCollections.ascx.cs"
Inherits="WebsitePanel.Portal.HostedSharePointSiteCollections" %>
-<%@ Register Src="UserControls/SpaceServiceItems.ascx" TagName="SpaceServiceItems"
+<%@ Register Src="../UserControls/SpaceServiceItems.ascx" TagName="SpaceServiceItems"
TagPrefix="wsp" %>
-<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
-<%@ Register Src="UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/Quota.ascx" TagName="Quota" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/Quota.ascx" TagName="Quota" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
@@ -76,8 +76,7 @@ function confirmation()
-
-
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx.cs
similarity index 91%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx.cs
index 0bd9b7b0..b03fd0f0 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx.cs
@@ -44,11 +44,7 @@ namespace WebsitePanel.Portal
{
public partial class HostedSharePointSiteCollections : WebsitePanelModuleBase
{
- public static string GroupName
- {
- get { return HttpContext.Current.Request["GroupName"]; }
- }
-
+
protected void Page_Load(object sender, EventArgs e)
{
this.BindStats();
@@ -67,14 +63,14 @@ namespace WebsitePanel.Portal
protected void btnCreateSiteCollection_Click(object sender, EventArgs e)
{
- Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_edit_sitecollection", "SpaceID=" + PanelSecurity.PackageId.ToString(), "GroupName=" + GroupName));
+ Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_edit_sitecollection", "SpaceID=" + PanelSecurity.PackageId.ToString()));
}
public string GetSiteCollectionEditUrl(string siteCollectionId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection",
"SiteCollectionID=" + siteCollectionId,
- "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName);
+ "ItemID=" + PanelRequest.ItemID.ToString());
}
protected void odsSharePointSiteCollectionPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx.designer.cs
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.designer.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx.designer.cs
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx
similarity index 79%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageSettings.ascx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx
index 6329dc5b..a4557072 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageSettings.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx
@@ -1,13 +1,13 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HostedSharePointStorageSettings.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointStorageSettings" %>
-<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
-<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel"
+<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel"
TagPrefix="wsp" %>
-<%@ Register Src="ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
-
-<%@ Register src="UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+<%@ Register src="../UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx.cs
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageSettings.ascx.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx.cs
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx.designer.cs
similarity index 69%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageSettings.ascx.designer.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx.designer.cs
index 8cc0e3cc..04b5be91 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageSettings.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx.designer.cs
@@ -1,31 +1,3 @@
-// Copyright (c) 2015, 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.
-
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageUsage.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx
similarity index 83%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageUsage.ascx
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx
index 54db370b..b551a4a7 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageUsage.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx
@@ -1,11 +1,12 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HostedSharePointStorageUsage.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointStorageUsage" %>
-<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
-<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel"
+<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel"
TagPrefix="wsp" %>
-<%@ Register Src="ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
-<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
+<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
+<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageUsage.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx.cs
similarity index 100%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageUsage.ascx.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx.cs
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageUsage.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx.designer.cs
similarity index 69%
rename from WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageUsage.ascx.designer.cs
rename to WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx.designer.cs
index 43f100c7..4c003393 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointStorageUsage.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx.designer.cs
@@ -1,31 +1,3 @@
-// Copyright (c) 2015, 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.
-
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditUserExperience.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditUserExperience.ascx.resx
index a6355f92..1ba5fff1 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditUserExperience.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditUserExperience.ascx.resx
@@ -129,6 +129,9 @@
Control RDS Session without Users's Permission
+
+ Disable Command Prompt
+
Drive Space Threshold
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSSetupLetter.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSSetupLetter.ascx.resx
index 61c375b4..a5c69ade 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSSetupLetter.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSSetupLetter.ascx.resx
@@ -138,4 +138,7 @@
* Enter E-Mail
+
+ Back to Users List
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx
index 44b5384b..c7cf7553 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx
@@ -190,6 +190,20 @@
+
+
+
+
+
-
+
@@ -41,13 +41,13 @@
|
|
-
-