Fix up sharepoint 2013 mess

This commit is contained in:
robvde 2015-04-05 11:30:57 +08:00
parent fed079a14b
commit 42b4d87301
26 changed files with 141 additions and 144 deletions

View file

@ -9462,11 +9462,15 @@ END
GO GO
UPDATE [dbo].[Quotas] SET GroupID = 45 WHERE QuotaName = 'EnterpriseStorage.DriveMaps' UPDATE [dbo].[Quotas] SET GroupID = 45 WHERE QuotaName = 'EnterpriseStorage.DriveMaps'
GO
UPDATE [dbo].[ResourceGroups] SET GroupName = 'Sharepoint Enterprise Server' WHERE GroupName = 'Sharepoint Server' UPDATE [dbo].[ResourceGroups] SET GroupName = 'Sharepoint Enterprise Server' WHERE GroupName = 'Sharepoint Server'
GO GO
UPDATE [dbo].[ResourceGroups] SET GroupController = 'WebsitePanel.EnterpriseServer.HostedSharePointServerEntController' WHERE GroupName = 'Sharepoint Enterprise Server'
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted SharePoint Enterprise 2013') IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted SharePoint Enterprise 2013')
BEGIN BEGIN
DECLARE @provider_id AS INT DECLARE @provider_id AS INT
@ -9478,9 +9482,6 @@ VALUES (@provider_id, @group_id, N'HostedSharePoint2013Ent', N'Hosted SharePoint
END END
GO GO
UPDATE Providers SET ProviderType = N'WebsitePanel.Providers.HostedSolution.HostedSharePointServer2013Ent, WebsitePanel.Providers.HostedSolution.SharePoint2013Ent' WHERE ProviderID = 1301
GO
UPDATE [dbo].[Quotas] SET QuotaName = 'HostedSharePointEnterprise.Sites' WHERE QuotaId = 550 UPDATE [dbo].[Quotas] SET QuotaName = 'HostedSharePointEnterprise.Sites' WHERE QuotaId = 550
GO GO

View file

@ -26,11 +26,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.7905 // Runtime Version:2.0.50727.8009
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -51,6 +50,7 @@ namespace WebsitePanel.EnterpriseServer {
using WebsitePanel.Providers; using WebsitePanel.Providers;
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
@ -141,7 +141,7 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollectionsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollectionsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) { public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
object[] results = this.Invoke("GetSiteCollectionsPaged", new object[] { object[] results = this.Invoke("GetSiteCollectionsPaged", new object[] {
packageId, packageId,
organizationId, organizationId,
@ -149,13 +149,12 @@ namespace WebsitePanel.EnterpriseServer {
filterValue, filterValue,
sortColumn, sortColumn,
startRow, startRow,
maximumRows, maximumRows});
groupName});
return ((SharePointSiteCollectionListPaged)(results[0])); return ((SharePointSiteCollectionListPaged)(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginGetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName, System.AsyncCallback callback, object asyncState) { public System.IAsyncResult BeginGetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSiteCollectionsPaged", new object[] { return this.BeginInvoke("GetSiteCollectionsPaged", new object[] {
packageId, packageId,
organizationId, organizationId,
@ -163,8 +162,7 @@ namespace WebsitePanel.EnterpriseServer {
filterValue, filterValue,
sortColumn, sortColumn,
startRow, startRow,
maximumRows, maximumRows}, callback, asyncState);
groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
@ -174,12 +172,12 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) { public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
this.GetSiteCollectionsPagedAsync(packageId, organizationId, filterColumn, filterValue, sortColumn, startRow, maximumRows, groupName, null); this.GetSiteCollectionsPagedAsync(packageId, organizationId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null);
} }
/// <remarks/> /// <remarks/>
public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName, object userState) { public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) {
if ((this.GetSiteCollectionsPagedOperationCompleted == null)) { if ((this.GetSiteCollectionsPagedOperationCompleted == null)) {
this.GetSiteCollectionsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsPagedOperationCompleted); this.GetSiteCollectionsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsPagedOperationCompleted);
} }
@ -190,8 +188,7 @@ namespace WebsitePanel.EnterpriseServer {
filterValue, filterValue,
sortColumn, sortColumn,
startRow, startRow,
maximumRows, maximumRows}, this.GetSiteCollectionsPagedOperationCompleted, userState);
groupName}, this.GetSiteCollectionsPagedOperationCompleted, userState);
} }
private void OnGetSiteCollectionsPagedOperationCompleted(object arg) { private void OnGetSiteCollectionsPagedOperationCompleted(object arg) {
@ -244,20 +241,18 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollections", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollections", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public SharePointSiteCollection[] GetSiteCollections(int packageId, bool recursive, string groupName) { public SharePointSiteCollection[] GetSiteCollections(int packageId, bool recursive) {
object[] results = this.Invoke("GetSiteCollections", new object[] { object[] results = this.Invoke("GetSiteCollections", new object[] {
packageId, packageId,
recursive, recursive});
groupName});
return ((SharePointSiteCollection[])(results[0])); return ((SharePointSiteCollection[])(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginGetSiteCollections(int packageId, bool recursive, string groupName, System.AsyncCallback callback, object asyncState) { public System.IAsyncResult BeginGetSiteCollections(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSiteCollections", new object[] { return this.BeginInvoke("GetSiteCollections", new object[] {
packageId, packageId,
recursive, recursive}, callback, asyncState);
groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
@ -267,19 +262,18 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
public void GetSiteCollectionsAsync(int packageId, bool recursive, string groupName) { public void GetSiteCollectionsAsync(int packageId, bool recursive) {
this.GetSiteCollectionsAsync(packageId, recursive, groupName, null); this.GetSiteCollectionsAsync(packageId, recursive, null);
} }
/// <remarks/> /// <remarks/>
public void GetSiteCollectionsAsync(int packageId, bool recursive, string groupName, object userState) { public void GetSiteCollectionsAsync(int packageId, bool recursive, object userState) {
if ((this.GetSiteCollectionsOperationCompleted == null)) { if ((this.GetSiteCollectionsOperationCompleted == null)) {
this.GetSiteCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsOperationCompleted); this.GetSiteCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsOperationCompleted);
} }
this.InvokeAsync("GetSiteCollections", new object[] { this.InvokeAsync("GetSiteCollections", new object[] {
packageId, packageId,
recursive, recursive}, this.GetSiteCollectionsOperationCompleted, userState);
groupName}, this.GetSiteCollectionsOperationCompleted, userState);
} }
private void OnGetSiteCollectionsOperationCompleted(object arg) { private void OnGetSiteCollectionsOperationCompleted(object arg) {
@ -426,18 +420,16 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddSiteCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddSiteCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddSiteCollection(SharePointSiteCollection item, string groupName) { public int AddSiteCollection(SharePointSiteCollection item) {
object[] results = this.Invoke("AddSiteCollection", new object[] { object[] results = this.Invoke("AddSiteCollection", new object[] {
item, item});
groupName});
return ((int)(results[0])); return ((int)(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginAddSiteCollection(SharePointSiteCollection item, string groupName, System.AsyncCallback callback, object asyncState) { public System.IAsyncResult BeginAddSiteCollection(SharePointSiteCollection item, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("AddSiteCollection", new object[] { return this.BeginInvoke("AddSiteCollection", new object[] {
item, item}, callback, asyncState);
groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
@ -447,18 +439,17 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
public void AddSiteCollectionAsync(SharePointSiteCollection item, string groupName) { public void AddSiteCollectionAsync(SharePointSiteCollection item) {
this.AddSiteCollectionAsync(item, groupName, null); this.AddSiteCollectionAsync(item, null);
} }
/// <remarks/> /// <remarks/>
public void AddSiteCollectionAsync(SharePointSiteCollection item, string groupName, object userState) { public void AddSiteCollectionAsync(SharePointSiteCollection item, object userState) {
if ((this.AddSiteCollectionOperationCompleted == null)) { if ((this.AddSiteCollectionOperationCompleted == null)) {
this.AddSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSiteCollectionOperationCompleted); this.AddSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSiteCollectionOperationCompleted);
} }
this.InvokeAsync("AddSiteCollection", new object[] { this.InvokeAsync("AddSiteCollection", new object[] {
item, item}, this.AddSiteCollectionOperationCompleted, userState);
groupName}, this.AddSiteCollectionOperationCompleted, userState);
} }
private void OnAddSiteCollectionOperationCompleted(object arg) { private void OnAddSiteCollectionOperationCompleted(object arg) {

View file

@ -1074,8 +1074,15 @@ namespace WebsitePanel.EnterpriseServer
{ {
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0); SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0);
stats.CreatedSharePointSiteCollections += sharePointStats.TotalRowCount; stats.CreatedSharePointSiteCollections += sharePointStats.TotalRowCount;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0);
stats.CreatedSharePointEnterpriseSiteCollections += sharePointStats.TotalRowCount;
} }
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM)) if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM))
{ {
stats.CreatedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.FULL ).Value; stats.CreatedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.FULL ).Value;

View file

@ -158,6 +158,18 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
return PackageController.GetPackageServiceId(packageId, ResourceGroups.SharepointFoundationServer); return PackageController.GetPackageServiceId(packageId, ResourceGroups.SharepointFoundationServer);
} }
private static HostedSharePointServerEnt GetHostedSharePointServerEnt(int serviceId)
{
HostedSharePointServerEnt sps = new HostedSharePointServerEnt();
ServiceProviderProxy.Init(sps, serviceId);
return sps;
}
private static int GetHostedSharePointEntServiceId(int packageId)
{
return PackageController.GetPackageServiceId(packageId, ResourceGroups.SharepointEnterpriseServer);
}
private static void PopulateBaseItem(BaseStatistics stats, Organization org, string topReseller) private static void PopulateBaseItem(BaseStatistics stats, Organization org, string topReseller)
{ {
@ -394,6 +406,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
string.Format("Could not get sharepoint server. PackageId: {0}", org.PackageId), ex); string.Format("Could not get sharepoint server. PackageId: {0}", org.PackageId), ex);
} }
foreach (SharePointSiteCollection siteCollection in siteCollections) foreach (SharePointSiteCollection siteCollection in siteCollections)
{ {
try try
@ -419,6 +432,59 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
} }
private static void PopulateSharePointEntItem(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
{
List<SharePointSiteCollection> siteCollections;
try
{
siteCollections = HostedSharePointServerEntController.GetSiteCollections(org.Id);
}
catch (Exception ex)
{
throw new ApplicationException(string.Format("Could not get site collections. OrgId: {0}", org.Id), ex);
}
if (siteCollections == null || siteCollections.Count == 0)
return;
HostedSharePointServerEnt srvEnt;
try
{
int serviceId = GetHostedSharePointEntServiceId(org.PackageId);
srvEnt = GetHostedSharePointServerEnt(serviceId);
}
catch (Exception ex)
{
throw new ApplicationException(
string.Format("Could not get sharepoint enterprise server. PackageId: {0}", org.PackageId), ex);
}
foreach (SharePointSiteCollection siteCollection in siteCollections)
{
try
{
SharePointStatistics stats = new SharePointStatistics();
PopulateBaseItem(stats, org, topReseller);
stats.SiteCollectionUrl = siteCollection.PhysicalAddress;
stats.SiteCollectionOwner = siteCollection.OwnerName;
stats.SiteCollectionQuota = siteCollection.MaxSiteStorage;
stats.SiteCollectionCreated = siteCollection.CreatedDate;
stats.SiteCollectionSize = srvEnt.Enterprise_GetSiteCollectionSize(siteCollection.PhysicalAddress);
report.SharePointReport.Items.Add(stats);
}
catch (Exception ex)
{
TaskManager.WriteError(ex);
}
}
}
private static void PopulateExchangeReportItems(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller) private static void PopulateExchangeReportItems(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
{ {
TaskManager.Write("Exchange Report Items " + org.Name); TaskManager.Write("Exchange Report Items " + org.Name);

View file

@ -179,6 +179,20 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
} }
if (cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
SharePointSiteDiskSpace[] sharePointSiteDiskSpaces =
HostedSharePointServerEntController.CalculateSharePointSitesDiskSpace(org.Id, out res);
if (res == 0)
{
foreach (SharePointSiteDiskSpace currecnt in sharePointSiteDiskSpaces)
{
size += currecnt.DiskSpace;
}
}
}
ServiceProviderItemDiskSpace tmp = new ServiceProviderItemDiskSpace(); ServiceProviderItemDiskSpace tmp = new ServiceProviderItemDiskSpace();
tmp.ItemId = item.Id; tmp.ItemId = item.Id;
tmp.DiskSpace = size; tmp.DiskSpace = size;

View file

@ -791,7 +791,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
private static int GetHostedSharePointServiceId(int packageId) private static int GetHostedSharePointServiceId(int packageId)
{ {
return PackageController.GetPackageServiceId(packageId, ResourceGroups.SharepointFoundationServer); return PackageController.GetPackageServiceId(packageId, ResourceGroups.SharepointEnterpriseServer);
} }
private static List<SharePointSiteCollection> GetOrganizationSharePointSiteCollections(int orgId) private static List<SharePointSiteCollection> GetOrganizationSharePointSiteCollections(int orgId)

View file

@ -55,7 +55,6 @@ namespace WebsitePanel.EnterpriseServer
/// <param name="sortColumn">Sort column name.</param> /// <param name="sortColumn">Sort column name.</param>
/// <param name="startRow">Row index to start from.</param> /// <param name="startRow">Row index to start from.</param>
/// <param name="maximumRows">Maximum number of rows to retrieve.</param> /// <param name="maximumRows">Maximum number of rows to retrieve.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>Site collections in raw format.</returns> /// <returns>Site collections in raw format.</returns>
[WebMethod] [WebMethod]
public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId,
@ -80,7 +79,6 @@ namespace WebsitePanel.EnterpriseServer
/// </summary> /// </summary>
/// <param name="packageId">Package that owns site collections.</param> /// <param name="packageId">Package that owns site collections.</param>
/// <param name="recursive">A value which shows whether nested spaces must be searched as well.</param> /// <param name="recursive">A value which shows whether nested spaces must be searched as well.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>List of found site collections.</returns> /// <returns>List of found site collections.</returns>
[WebMethod] [WebMethod]
public List<SharePointSiteCollection> GetSiteCollections(int packageId, bool recursive) public List<SharePointSiteCollection> GetSiteCollections(int packageId, bool recursive)
@ -133,7 +131,6 @@ namespace WebsitePanel.EnterpriseServer
/// Adds SharePoint site collection. /// Adds SharePoint site collection.
/// </summary> /// </summary>
/// <param name="item">Site collection description.</param> /// <param name="item">Site collection description.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>Created site collection id within metabase.</returns> /// <returns>Created site collection id within metabase.</returns>
[WebMethod] [WebMethod]
public int AddSiteCollection(SharePointSiteCollection item) public int AddSiteCollection(SharePointSiteCollection item)

View file

@ -3371,14 +3371,11 @@
<data name="Quota.HostedSolution.DeletedUsersBackupStorageSpace" xml:space="preserve"> <data name="Quota.HostedSolution.DeletedUsersBackupStorageSpace" xml:space="preserve">
<value>Deleted Users Backup Storage Space per Organization, Mb</value> <value>Deleted Users Backup Storage Space per Organization, Mb</value>
</data> </data>
<data name="ResourceGroup.Hosted SharePoint" xml:space="preserve">
<value>Hosted SharePoint</value>
</data>
<data name="ResourceGroup.SharePoint Foundation Server" xml:space="preserve"> <data name="ResourceGroup.SharePoint Foundation Server" xml:space="preserve">
<value>SharePoint Foundation Server</value> <value>SharePoint Foundation Server</value>
</data> </data>
<data name="ResourceGroup.SharePoint Server" xml:space="preserve"> <data name="ResourceGroup.SharePoint Enterprise Server" xml:space="preserve">
<value>SharePoint Server</value> <value>SharePoint Enterprise Server</value>
</data> </data>
<data name="ResourceGroup.OCS" xml:space="preserve"> <data name="ResourceGroup.OCS" xml:space="preserve">
<value>Office Communications Server</value> <value>Office Communications Server</value>

View file

@ -204,8 +204,8 @@
<data name="Text.SharePointFoundationServerGroup" xml:space="preserve"> <data name="Text.SharePointFoundationServerGroup" xml:space="preserve">
<value>SharePoint Foundation</value> <value>SharePoint Foundation</value>
</data> </data>
<data name="Text.SharePointServerGroup" xml:space="preserve"> <data name="Text.SharePointEnterpriseServerGroup" xml:space="preserve">
<value>SharePoint Server</value> <value>SharePoint Enterprise Server</value>
</data> </data>
<data name="Text.SiteCollections" xml:space="preserve"> <data name="Text.SiteCollections" xml:space="preserve">
<value>Site Collections</value> <value>Site Collections</value>

View file

@ -237,8 +237,8 @@
<data name="Text.SharePointFoundationServerGroup" xml:space="preserve"> <data name="Text.SharePointFoundationServerGroup" xml:space="preserve">
<value>Hosted Organization - SharePoint Foundation Server</value> <value>Hosted Organization - SharePoint Foundation Server</value>
</data> </data>
<data name="Text.SharePointServerGroup" xml:space="preserve"> <data name="Text.SharePointEnterpriseServerGroup" xml:space="preserve">
<value>Hosted Organization - SharePoint Server</value> <value>Hosted Organization - SharePoint Enterprise Server</value>
</data> </data>
<data name="Text.SiteCollections" xml:space="preserve"> <data name="Text.SiteCollections" xml:space="preserve">
<value>Sharepoint Sites</value> <value>Sharepoint Sites</value>

View file

@ -37,7 +37,6 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls; using System.Web.UI.HtmlControls;
using WebsitePanel.Providers.SharePoint; using WebsitePanel.Providers.SharePoint;
using System.Collections.Generic; using System.Collections.Generic;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal namespace WebsitePanel.Portal
{ {
@ -45,28 +44,19 @@ namespace WebsitePanel.Portal
{ {
SharePointSiteCollectionListPaged result; SharePointSiteCollectionListPaged result;
public int GetSharePointSiteCollectionPagedCount(int packageId, int organizationId, string groupName, string filterColumn, string filterValue) public int GetSharePointSiteCollectionPagedCount(int packageId, int organizationId, string filterColumn, string filterValue)
{ {
return result.TotalRowCount; return result.TotalRowCount;
} }
public List<SharePointSiteCollection> GetSharePointSiteCollectionPaged(int packageId, int organizationId, string groupName, string filterColumn, string filterValue, int maximumRows, int startRowIndex, string sortColumn) public List<SharePointSiteCollection> GetSharePointSiteCollectionPaged(int packageId, int organizationId, string filterColumn, string filterValue, int maximumRows, int startRowIndex, string sortColumn)
{ {
if (!String.IsNullOrEmpty(filterValue)) if (!String.IsNullOrEmpty(filterValue))
{ {
filterValue = filterValue + "%"; filterValue = filterValue + "%";
} }
if (ResourceGroups.SharepointFoundationServer.Replace(" ", "").Equals(groupName)) result = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows);
{
groupName = ResourceGroups.SharepointFoundationServer;
}
else if (ResourceGroups.SharepointServer.Replace(" ", "").Equals(groupName))
{
groupName = ResourceGroups.SharepointServer;
}
result = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, groupName);
return result.SiteCollections; return result.SiteCollections;
} }

View file

@ -168,8 +168,8 @@
<data name="Text.SharePointFoundationServerGroup" xml:space="preserve"> <data name="Text.SharePointFoundationServerGroup" xml:space="preserve">
<value>SharePoint Foundation</value> <value>SharePoint Foundation</value>
</data> </data>
<data name="Text.SharePointServerGroup" xml:space="preserve"> <data name="Text.SharePointEnterpriseServerGroup" xml:space="preserve">
<value>SharePoint Server</value> <value>SharePoint Enterprise</value>
</data> </data>
<data name="Text.OCSGroup" xml:space="preserve"> <data name="Text.OCSGroup" xml:space="preserve">
<value>OCS</value> <value>OCS</value>

View file

@ -319,9 +319,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
PrepareSharePointMenu(cntx, groups, imagePath, GetLocalizedString("Text.SharePointFoundationServerGroup")); 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")); PrepareSharePointMenu(cntx, groups, imagePath, GetLocalizedString("Text.SharePointEnterpriseServerGroup"));
} }
//CRM Menu //CRM Menu

View file

@ -14,7 +14,6 @@
<div id="ExchangeContainer"> <div id="ExchangeContainer">
<div class="Module"> <div class="Module">
<div class="Left"> <div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="sharepoint_sitecollections" />
</div> </div>
<div class="Content"> <div class="Content">
<div class="Center"> <div class="Center">

View file

@ -21,15 +21,6 @@ namespace WebsitePanel.Portal {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary> /// <summary>
/// Image1 control. /// Image1 control.
/// </summary> /// </summary>

View file

@ -15,7 +15,6 @@
<div id="ExchangeContainer"> <div id="ExchangeContainer">
<div class="Module"> <div class="Module">
<div class="Left"> <div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="sharepoint_sitecollections" />
</div> </div>
<div class="Content"> <div class="Content">
<div class="Center"> <div class="Center">

View file

@ -44,11 +44,6 @@ namespace WebsitePanel.Portal
{ {
SharePointSiteCollection item = null; SharePointSiteCollection item = null;
public static string GroupName
{
get { return HttpContext.Current.Request["GroupName"]; }
}
private int OrganizationId private int OrganizationId
{ {
get get
@ -230,7 +225,7 @@ namespace WebsitePanel.Portal
/// <returns> Reserved disk space vallue.</returns> /// <returns> Reserved disk space vallue.</returns>
private int GetReservedDiskStorageSpace() 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); return (int)existingCollections.Sum(siteCollection => siteCollection.MaxSiteStorage);
} }
@ -257,20 +252,9 @@ namespace WebsitePanel.Portal
{ {
item = new SharePointSiteCollection(); item = new SharePointSiteCollection();
string groupName = GroupName; if (!UseSharedSLL(PanelSecurity.PackageId))
if (ResourceGroups.SharepointFoundationServer.Replace(" ", "").Equals(groupName))
{
groupName = ResourceGroups.SharepointFoundationServer;
}
else if (ResourceGroups.SharepointServer.Replace(" ", "").Equals(groupName))
{
groupName = ResourceGroups.SharepointServer;
}
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) foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
{ {
Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name); Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
@ -303,7 +287,7 @@ namespace WebsitePanel.Portal
item.MaxSiteStorage = maxStorage.QuotaValue; item.MaxSiteStorage = maxStorage.QuotaValue;
item.WarningStorage = warningStorage.QuotaValue; item.WarningStorage = warningStorage.QuotaValue;
int result = ES.Services.HostedSharePointServers.AddSiteCollection(item, groupName); int result = ES.Services.HostedSharePointServers.AddSiteCollection(item);
if (result < 0) if (result < 0)
{ {
localMessageBox.ShowResultMessage(result); localMessageBox.ShowResultMessage(result);
@ -390,19 +374,19 @@ namespace WebsitePanel.Portal
protected void btnBackup_Click(object sender, EventArgs e) 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) 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() 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) private bool UseSharedSLL(int packageID)

View file

@ -21,15 +21,6 @@ namespace WebsitePanel.Portal {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary> /// <summary>
/// Image1 control. /// Image1 control.
/// </summary> /// </summary>

View file

@ -17,7 +17,6 @@
<div id="ExchangeContainer"> <div id="ExchangeContainer">
<div class="Module"> <div class="Module">
<div class="Left"> <div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="sharepoint_sitecollections" />
</div> </div>
<div class="Content"> <div class="Content">
<div class="Center"> <div class="Center">

View file

@ -21,15 +21,6 @@ namespace WebsitePanel.Portal {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary> /// <summary>
/// Image1 control. /// Image1 control.
/// </summary> /// </summary>

View file

@ -14,7 +14,6 @@
<div id="ExchangeContainer"> <div id="ExchangeContainer">
<div class="Module"> <div class="Module">
<div class="Left"> <div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="storage_limits" />
</div> </div>
<div class="Content"> <div class="Content">
<div class="Center"> <div class="Center">

View file

@ -12,15 +12,6 @@ namespace WebsitePanel.Portal {
public partial class HostedSharePointStorageSettings { public partial class HostedSharePointStorageSettings {
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary> /// <summary>
/// Image1 control. /// Image1 control.
/// </summary> /// </summary>

View file

@ -11,7 +11,6 @@
<div id="ExchangeContainer"> <div id="ExchangeContainer">
<div class="Module"> <div class="Module">
<div class="Left"> <div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="storage_limits" />
</div> </div>
<div class="Content"> <div class="Content">
<div class="Center"> <div class="Center">

View file

@ -12,15 +12,6 @@ namespace WebsitePanel.Portal {
public partial class HostedSharePointStorageUsage { public partial class HostedSharePointStorageUsage {
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary> /// <summary>
/// Image1 control. /// Image1 control.
/// </summary> /// </summary>

View file

@ -161,7 +161,7 @@ namespace WebsitePanel.Portal
(resourceGroup.GroupName == ResourceGroups.Os)| (resourceGroup.GroupName == ResourceGroups.Os)|
(resourceGroup.GroupName == ResourceGroups.HostedOrganizations) | (resourceGroup.GroupName == ResourceGroups.HostedOrganizations) |
(resourceGroup.GroupName == ResourceGroups.SharepointFoundationServer) | (resourceGroup.GroupName == ResourceGroups.SharepointFoundationServer) |
(resourceGroup.GroupName == ResourceGroups.SharepointServer) | (resourceGroup.GroupName == ResourceGroups.SharepointEnterpriseServer) |
(resourceGroup.GroupName == ResourceGroups.Mail)| (resourceGroup.GroupName == ResourceGroups.Mail)|
(resourceGroup.GroupName == ResourceGroups.Lync)| (resourceGroup.GroupName == ResourceGroups.Lync)|
(resourceGroup.GroupName == ResourceGroups.Exchange)| (resourceGroup.GroupName == ResourceGroups.Exchange)|

View file

@ -98,8 +98,8 @@ namespace WebsitePanel.Portal.UserControls
if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointFoundationServer)) if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointFoundationServer))
PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointFoundationServerGroup"), ResourceGroups.SharepointFoundationServer.Replace(" ", "")); PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointFoundationServerGroup"), ResourceGroups.SharepointFoundationServer.Replace(" ", ""));
if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointServer)) if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointServerGroup"), ResourceGroups.SharepointServer.Replace(" ", "")); PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointEnterpriseServerGroup"), ResourceGroups.SharepointEnterpriseServer.Replace(" ", ""));
//CRM Menu //CRM Menu
if (Cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) if (Cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))