RDS quotas

This commit is contained in:
vfedosevich 2015-01-16 02:47:54 -08:00
parent 69e4f8db27
commit b1af779c18
14 changed files with 310 additions and 49 deletions

View file

@ -992,6 +992,13 @@ namespace WebsitePanel.EnterpriseServer
stats.UsedEnterpriseStorageSpace = folders.Where(x => x.FRSMQuotaMB != -1).Sum(x => x.FRSMQuotaMB);
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.RDS))
{
stats.CreatedRdsUsers = RemoteDesktopServicesController.GetOrganizationRdsUsersCount(org.Id);
stats.CreatedRdsCollections = RemoteDesktopServicesController.GetOrganizationRdsCollectionsCount(org.Id);
stats.CreatedRdsServers = RemoteDesktopServicesController.GetOrganizationRdsServersCount(org.Id);
}
}
else
{
@ -1066,6 +1073,13 @@ namespace WebsitePanel.EnterpriseServer
stats.UsedEnterpriseStorageSpace += folders.Where(x => x.FRSMQuotaMB != -1).Sum(x => x.FRSMQuotaMB);
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.RDS))
{
stats.CreatedRdsUsers += RemoteDesktopServicesController.GetOrganizationRdsUsersCount(o.Id);
stats.CreatedRdsCollections += RemoteDesktopServicesController.GetOrganizationRdsCollectionsCount(o.Id);
stats.CreatedRdsServers += RemoteDesktopServicesController.GetOrganizationRdsServersCount(o.Id);
}
}
}
}
@ -1119,6 +1133,13 @@ namespace WebsitePanel.EnterpriseServer
stats.AllocatedEnterpriseStorageSpace = cntx.Quotas[Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE].QuotaAllocatedValue;
}
if (cntx.Groups.ContainsKey(ResourceGroups.RDS))
{
stats.AllocatedRdsServers = cntx.Quotas[Quotas.RDS_SERVERS].QuotaAllocatedValue;
stats.AllocatedRdsCollections = cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue;
stats.AllocatedRdsUsers = cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue;
}
return stats;
}
catch (Exception ex)