Merge
This commit is contained in:
commit
0e8e3adaee
24 changed files with 331 additions and 90 deletions
|
@ -5374,4 +5374,10 @@
|
|||
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED2" xml:space="preserve">
|
||||
<value>CRM users quota (limited license) has been reached.</value>
|
||||
</data>
|
||||
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED22" xml:space="preserve">
|
||||
<value>CRM users quota (ESS license) has been reached.</value>
|
||||
</data>
|
||||
<data name="Quota.HostedCRM.ESSUsers" xml:space="preserve">
|
||||
<value>ESS licenses per organization</value>
|
||||
</data>
|
||||
</root>
|
|
@ -42,10 +42,19 @@ namespace WebsitePanel.Portal
|
|||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
warningValue.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindValues();
|
||||
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
|
||||
if (org.CrmOrganizationId == Guid.Empty)
|
||||
{
|
||||
messageBox.ShowErrorMessage("NOT_CRM_ORGANIZATION");
|
||||
StorageLimits.Enabled = false;
|
||||
btnSave.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
BindValues();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,9 +86,9 @@ namespace WebsitePanel.Portal
|
|||
try
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
int limitSize = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue;
|
||||
long limitSize = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue;
|
||||
|
||||
int maxSize = maxStorageSettingsValue.QuotaValue;
|
||||
long maxSize = maxStorageSettingsValue.QuotaValue;
|
||||
|
||||
if (limitSize != -1)
|
||||
{
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<asp:DropDownList ID="ddlLicenseType" runat="server" CssClass="NormalTextBox" AutoPostBack="false">
|
||||
<asp:ListItem Value="0" meta:resourcekey="ddlLicenseTypeFull">Full</asp:ListItem>
|
||||
<asp:ListItem Value="2" meta:resourcekey="ddlLicenseTypeLimited">Limited</asp:ListItem>
|
||||
<asp:ListItem Value="22" meta:resourcekey="ddlLicenseTypeESS">ESS</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -59,12 +59,13 @@ namespace WebsitePanel.Portal.CRM
|
|||
lblEmailAddress.Text = user.PrimaryEmailAddress;
|
||||
lblDomainName.Text = user.DomainUserName;
|
||||
|
||||
int cALType = userResult.Value.CALType;
|
||||
int cALType = userResult.Value.CALType + ((int)userResult.Value.ClientAccessMode) * 10;
|
||||
|
||||
switch (cALType)
|
||||
{
|
||||
case 0 :
|
||||
case 2 :
|
||||
case 22:
|
||||
ddlLicenseType.SelectedValue = cALType.ToString();
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -97,6 +97,14 @@
|
|||
<wsp:QuotaViewer ID="limitedusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locESSQuota" runat="server" meta:resourcekey="locESSQuota" Text="ESS licenses :"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="essusersQuota" runat="server" QuotaTypeId="2" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -57,6 +57,10 @@ namespace WebsitePanel.Portal.CRM
|
|||
|
||||
//if (stats.AllocatedCRMUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedCRMUsers - tenantStats.CreatedCRMUsers;
|
||||
//if (stats.AllocatedLimitedCRMUsers != -1) limitedusersQuota.QuotaAvailable = tenantStats.AllocatedLimitedCRMUsers - tenantStats.CreatedLimitedCRMUsers;
|
||||
|
||||
essusersQuota.QuotaUsedValue = stats.CreatedESSCRMUsers;
|
||||
essusersQuota.QuotaValue = stats.AllocatedESSCRMUsers;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -201,5 +201,23 @@ namespace WebsitePanel.Portal.CRM {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer limitedusersQuota;
|
||||
|
||||
/// <summary>
|
||||
/// locESSQuota 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.Localize locESSQuota;
|
||||
|
||||
/// <summary>
|
||||
/// essusersQuota control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer essusersQuota;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
<asp:DropDownList ID="ddlLicenseType" runat="server" CssClass="NormalTextBox" AutoPostBack="false">
|
||||
<asp:ListItem Value="0" meta:resourcekey="ddlLicenseTypeFull">Full</asp:ListItem>
|
||||
<asp:ListItem Value="2" meta:resourcekey="ddlLicenseTypeLimited">Limited</asp:ListItem>
|
||||
<asp:ListItem Value="22" meta:resourcekey="ddlLicenseTypeESS">ESS</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -224,7 +224,15 @@
|
|||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkCRMDBSize" runat="server" meta:resourcekey="lnkCRMDBSize" Text="Storage size (ÌÂ):"></asp:HyperLink>
|
||||
<asp:HyperLink ID="lnkESSCRMUsers" runat="server" meta:resourcekey="lnkESSCRMUsers" Text="ESS licenses :"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmESSUsersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkCRMDBSize" runat="server" meta:resourcekey="lnkCRMDBSize" Text="Storage size (MB):"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmDBSize" runat="server" QuotaTypeId="2" DisplayGauge="true" />
|
||||
|
|
|
@ -247,6 +247,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
lnkLimitedCRMUsers.NavigateUrl = lnkCRMUsers.NavigateUrl;
|
||||
lnkESSCRMUsers.NavigateUrl = lnkCRMUsers.NavigateUrl;
|
||||
|
||||
lnkCRMDBSize.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crm_storage_settings",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
@ -259,7 +260,10 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
crmLimitedUsersStats.QuotaUsedValue = stats.CreatedLimitedCRMUsers;
|
||||
crmLimitedUsersStats.QuotaValue = stats.AllocatedLimitedCRMUsers;
|
||||
|
||||
crmDBSize.QuotaUsedValue = Convert.ToInt32( stats.UsedCRMDiskSpace>0 ? stats.UsedCRMDiskSpace/(1024*1024) : -1);
|
||||
crmESSUsersStats.QuotaUsedValue = stats.CreatedESSCRMUsers;
|
||||
crmESSUsersStats.QuotaValue = stats.AllocatedESSCRMUsers;
|
||||
|
||||
crmDBSize.QuotaUsedValue = Convert.ToInt32(stats.UsedCRMDiskSpace > 0 ? stats.UsedCRMDiskSpace / (1024 * 1024) : -1);
|
||||
crmDBSize.QuotaValue = Convert.ToInt32(stats.AllocatedCRMDiskSpace>0 ? stats.AllocatedCRMDiskSpace/(1024*1024) : -1);
|
||||
}
|
||||
|
||||
|
|
|
@ -553,6 +553,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmLimitedUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkESSCRMUsers 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 lnkESSCRMUsers;
|
||||
|
||||
/// <summary>
|
||||
/// crmESSUsersStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmESSUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkCRMDBSize control.
|
||||
/// </summary>
|
||||
|
|
|
@ -31,6 +31,8 @@ using System.Collections.Generic;
|
|||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
|
||||
namespace WebsitePanel.Portal.Lync
|
||||
{
|
||||
|
@ -38,6 +40,15 @@ namespace WebsitePanel.Portal.Lync
|
|||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void Page_PreRender(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
phoneQuota.Viewer.QuotaUsedValue = ES.Services.Servers.GetPackageIPAddressesCount(PanelSecurity.PackageId, PanelRequest.ItemID, IPAddressPool.PhoneNumbers);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -95,7 +95,9 @@ namespace WebsitePanel.Portal.UserControls
|
|||
if (cntx.Quotas.ContainsKey(quotaName))
|
||||
{
|
||||
int quotaAllocated = cntx.Quotas[quotaName].QuotaAllocatedValue;
|
||||
int quotaUsed = cntx.Quotas[quotaName].QuotaUsedValue;
|
||||
//int quotaUsed = cntx.Quotas[quotaName].QuotaUsedValue;
|
||||
|
||||
int quotaUsed = ES.Services.Servers.GetPackageIPAddressesCount(PanelSecurity.PackageId, PanelRequest.ItemID, IPAddressPool.PhoneNumbers);
|
||||
|
||||
if (quotaAllocated != -1)
|
||||
quotaAllowed = quotaAllocated - quotaUsed;
|
||||
|
|
|
@ -55,6 +55,11 @@ namespace WebsitePanel.Portal
|
|||
set { quotaViewer.DisplayGauge = value; }
|
||||
}
|
||||
|
||||
public QuotaViewer Viewer
|
||||
{
|
||||
get { return quotaViewer; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue