Merge
This commit is contained in:
commit
097378bc50
352 changed files with 45244 additions and 2550 deletions
|
@ -383,6 +383,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (cntx.Quotas[Quotas.HOSTED_SHAREPOINT_STORAGE_SIZE] != null)
|
||||
org.WarningSharePointStorage = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_STORAGE_SIZE].QuotaAllocatedValue;
|
||||
|
||||
if (cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE] != null)
|
||||
org.MaxSharePointEnterpriseStorage = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE].QuotaAllocatedValue;
|
||||
|
||||
|
||||
if (cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE] != null)
|
||||
org.WarningSharePointEnterpriseStorage = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE].QuotaAllocatedValue;
|
||||
|
||||
|
||||
//add organization to package items
|
||||
itemId = AddOrganizationToPackageItems(org, serviceId, packageId, organizationName, organizationId, domainName);
|
||||
|
@ -670,6 +677,16 @@ namespace WebsitePanel.EnterpriseServer
|
|||
TaskManager.WriteError(ex);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
HostedSharePointServerEntController.DeleteSiteCollections(itemId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
successful = false;
|
||||
TaskManager.WriteError(ex);
|
||||
}
|
||||
|
||||
if (org.IsOCSOrganization)
|
||||
{
|
||||
DeleteOCSUsers(itemId, ref successful);
|
||||
|
@ -939,7 +956,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.CreatedUsers = 5;
|
||||
stats.AllocatedUsers = 10;
|
||||
stats.CreatedSharePointSiteCollections = 1;
|
||||
stats.CreatedSharePointEnterpriseSiteCollections = 1;
|
||||
stats.AllocatedSharePointSiteCollections = 5;
|
||||
stats.AllocatedSharePointEnterpriseSiteCollections = 5;
|
||||
return stats;
|
||||
}
|
||||
#endregion
|
||||
|
@ -971,6 +990,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.CreatedSharePointSiteCollections = sharePointStats.TotalRowCount;
|
||||
}
|
||||
|
||||
if (cntxTmp.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
|
||||
{
|
||||
SharePointEnterpriseSiteCollectionListPaged sharePointStats = HostedSharePointServerEntController.GetSiteCollectionsPaged(org.PackageId, org.Id, string.Empty, string.Empty, string.Empty, 0, 0);
|
||||
stats.CreatedSharePointEnterpriseSiteCollections = sharePointStats.TotalRowCount;
|
||||
}
|
||||
|
||||
|
||||
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
{
|
||||
stats.CreatedCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, CRMUserLycenseTypes.FULL).Value;
|
||||
|
@ -1050,8 +1076,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0);
|
||||
stats.CreatedSharePointSiteCollections += sharePointStats.TotalRowCount;
|
||||
}
|
||||
|
||||
if (cntxTmp.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
|
||||
{
|
||||
SharePointEnterpriseSiteCollectionListPaged sharePointStats = HostedSharePointServerEntController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0);
|
||||
stats.CreatedSharePointEnterpriseSiteCollections += sharePointStats.TotalRowCount;
|
||||
}
|
||||
|
||||
|
||||
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
{
|
||||
stats.CreatedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.FULL ).Value;
|
||||
|
@ -1119,6 +1152,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.AllocatedSharePointSiteCollections = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_SITES].QuotaAllocatedValue;
|
||||
}
|
||||
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
|
||||
{
|
||||
stats.AllocatedSharePointEnterpriseSiteCollections = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_SITES].QuotaAllocatedValue;
|
||||
}
|
||||
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
|
||||
{
|
||||
stats.AllocatedCRMUsers = cntx.Quotas[Quotas.CRM_USERS].QuotaAllocatedValue;
|
||||
|
|
|
@ -116,6 +116,21 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
}
|
||||
}
|
||||
|
||||
if (report.SharePointEnterpriseReport != null)
|
||||
{
|
||||
List<SharePointEnterpriseStatistics> sharePoints =
|
||||
report.SharePointEnterpriseReport.Items.FindAll(
|
||||
delegate(SharePointEnterpriseStatistics stats) { return stats.OrganizationID == org.OrganizationId; });
|
||||
|
||||
item.TotalSharePointEnterpriseSiteCollections = sharePoints.Count;
|
||||
foreach (SharePointEnterpriseStatistics current in sharePoints)
|
||||
{
|
||||
item.TotalSharePointEnterpriseSiteCollectionsSize += current.SiteCollectionSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (report.CRMReport != null)
|
||||
{
|
||||
List<CRMOrganizationStatistics> crmOrganizationStatistics =
|
||||
|
@ -158,6 +173,18 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
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)
|
||||
{
|
||||
|
@ -324,6 +351,21 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
}
|
||||
}
|
||||
|
||||
if (report.SharePointEnterpriseReport != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
TaskManager.Write("Populate SharePoint Enterprise item ");
|
||||
|
||||
PopulateSharePointEnterpriseItem(org, report, topReseller);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskManager.WriteError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (report.LyncReport != null)
|
||||
{
|
||||
try
|
||||
|
@ -394,6 +436,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
string.Format("Could not get sharepoint server. PackageId: {0}", org.PackageId), ex);
|
||||
}
|
||||
|
||||
|
||||
foreach (SharePointSiteCollection siteCollection in siteCollections)
|
||||
{
|
||||
try
|
||||
|
@ -419,6 +462,59 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
}
|
||||
|
||||
|
||||
private static void PopulateSharePointEnterpriseItem(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||
{
|
||||
List<SharePointEnterpriseSiteCollection> 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 (SharePointEnterpriseSiteCollection siteCollection in siteCollections)
|
||||
{
|
||||
try
|
||||
{
|
||||
SharePointEnterpriseStatistics stats = new SharePointEnterpriseStatistics();
|
||||
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.SharePointEnterpriseReport.Items.Add(stats);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskManager.WriteError(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void PopulateExchangeReportItems(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||
{
|
||||
TaskManager.Write("Exchange Report Items " + org.Name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue