Add “Groups” link users displaying quota usage
This commit is contained in:
parent
a402c68e7a
commit
06f98076c6
5 changed files with 87 additions and 2 deletions
|
@ -924,6 +924,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
PackageContext cntxTmp = PackageController.GetPackageContext(org.PackageId);
|
||||
|
||||
if (cntxTmp.Quotas.ContainsKey(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT) &&
|
||||
(cntxTmp.Quotas[Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT].QuotaAllocatedValue == 1 &&
|
||||
cntxTmp.Quotas[Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT].QuotaTypeId == 1))
|
||||
{
|
||||
stats.CreatedGroups = GetOrganizationSecurityGroupsPaged(org.Id, string.Empty, string.Empty, string.Empty, 0, int.MaxValue).RecordsCount;
|
||||
}
|
||||
|
||||
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
|
||||
{
|
||||
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, org.Id, string.Empty, string.Empty, string.Empty, 0, 0);
|
||||
|
@ -989,6 +996,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
PackageContext cntxTmp = PackageController.GetPackageContext(org.PackageId);
|
||||
|
||||
if (cntxTmp.Quotas.ContainsKey(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT) &&
|
||||
(cntxTmp.Quotas[Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT].QuotaAllocatedValue == 1 &&
|
||||
cntxTmp.Quotas[Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT].QuotaTypeId == 1))
|
||||
{
|
||||
stats.CreatedGroups = GetOrganizationSecurityGroupsPaged(org.Id, string.Empty, string.Empty, string.Empty, 0, int.MaxValue).RecordsCount;
|
||||
}
|
||||
|
||||
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
|
||||
{
|
||||
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0);
|
||||
|
@ -1039,6 +1053,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.AllocatedUsers = cntx.Quotas[Quotas.ORGANIZATION_USERS].QuotaAllocatedValue;
|
||||
stats.AllocatedDomains = cntx.Quotas[Quotas.ORGANIZATION_DOMAINS].QuotaAllocatedValue;
|
||||
|
||||
if (cntx.Quotas.ContainsKey(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT) &&
|
||||
(cntx.Quotas[Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT].QuotaAllocatedValue == 1 &&
|
||||
cntx.Quotas[Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT].QuotaTypeId == 1))
|
||||
{
|
||||
stats.AllocatedGroups = -1;
|
||||
}
|
||||
|
||||
if (cntx.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
|
||||
{
|
||||
stats.AllocatedSharePointSiteCollections = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_SITES].QuotaAllocatedValue;
|
||||
|
|
|
@ -33,6 +33,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
private int allocatedUsers;
|
||||
private int createdUsers;
|
||||
|
||||
private int allocatedGroups;
|
||||
private int createdGroups;
|
||||
|
||||
private int allocatedDomains;
|
||||
private int createdDomains;
|
||||
|
||||
|
@ -266,6 +269,18 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
get { return usedEnterpriseStorageSpace; }
|
||||
set { usedEnterpriseStorageSpace = value; }
|
||||
}
|
||||
|
||||
public int AllocatedGroups
|
||||
{
|
||||
get { return allocatedGroups; }
|
||||
set { allocatedGroups = value; }
|
||||
}
|
||||
|
||||
public int CreatedGroups
|
||||
{
|
||||
get { return createdGroups; }
|
||||
set { createdGroups = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,14 @@
|
|||
<wsp:QuotaViewer ID="userStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow" id="securGroupsStat" runat="server">
|
||||
<td class="OrgStatsQuota" nowrap >
|
||||
<asp:HyperLink ID="lnkGroups" runat="server" meta:resourcekey="lnkGroups" Text="Groups:"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="groupStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel runat="server" ID="exchangeStatsPanel">
|
||||
|
|
|
@ -158,13 +158,27 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
userStats.QuotaValue = orgStats.AllocatedUsers;
|
||||
if (orgStats.AllocatedUsers != -1) userStats.QuotaAvailable = tenantStats.AllocatedUsers - tenantStats.CreatedUsers;
|
||||
|
||||
|
||||
|
||||
lnkDomains.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "domains",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
lnkUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "users",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
if (Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT, cntx))
|
||||
{
|
||||
securGroupsStat.Visible = true;
|
||||
|
||||
groupStats.QuotaUsedValue = orgStats.CreatedGroups;
|
||||
groupStats.QuotaValue = orgStats.AllocatedGroups;
|
||||
if (orgStats.AllocatedUsers != -1) groupStats.QuotaAvailable = tenantStats.AllocatedGroups - tenantStats.CreatedGroups;
|
||||
|
||||
lnkGroups.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "secur_groups",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
}
|
||||
else
|
||||
{
|
||||
securGroupsStat.Visible = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
organizationStatsPanel.Visible = false;
|
||||
|
|
|
@ -138,6 +138,33 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer userStats;
|
||||
|
||||
/// <summary>
|
||||
/// securGroupsStat control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow securGroupsStat;
|
||||
|
||||
/// <summary>
|
||||
/// lnkGroups control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkGroups;
|
||||
|
||||
/// <summary>
|
||||
/// groupStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer groupStats;
|
||||
|
||||
/// <summary>
|
||||
/// exchangeStatsPanel control.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue