Fixed: When having multiple organization the quotas and available resources
quotas were only displayed for the tenant. Quota usage now displayed per organization Added public folders to organization home screen Added Lync to organization home screen Added the ability to hide the theme and locale. This can be hidden by adding the element <HideThemeAndLocale>true</HideThemeAndLocale> to the file SiteSettings.config
This commit is contained in:
parent
478d269e2a
commit
6203fd48c5
28 changed files with 1278 additions and 1166 deletions
|
@ -387,6 +387,25 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
|
||||
|
||||
|
||||
public static bool GetHideThemeAndLocale()
|
||||
{
|
||||
bool bResult = false;
|
||||
|
||||
try
|
||||
{
|
||||
bResult = Convert.ToBoolean(PortalConfiguration.SiteSettings["HideThemeAndLocale"]);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static int GetAuthenticationFormsTimeout()
|
||||
{
|
||||
//default
|
||||
|
|
|
@ -35,11 +35,14 @@ namespace WebsitePanel.Portal.BlackBerry
|
|||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
int allocatedCrmUsers = stats.AllocatedBlackBerryUsers;
|
||||
int usedUsers = stats.CreatedBlackBerryUsers;
|
||||
usersQuota.QuotaUsedValue = usedUsers;
|
||||
usersQuota.QuotaValue = allocatedCrmUsers;
|
||||
|
||||
if (stats.AllocatedBlackBerryUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedBlackBerryUsers - tenantStats.CreatedBlackBerryUsers;
|
||||
}
|
||||
|
||||
protected void btnCreateNewBlackBerryUser_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -44,12 +44,14 @@ namespace WebsitePanel.Portal.CRM
|
|||
}
|
||||
else
|
||||
{
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
int allocatedCrmUsers = stats.AllocatedCRMUsers;
|
||||
int usedUsers = stats.CreatedCRMUsers;
|
||||
usersQuota.QuotaUsedValue = usedUsers;
|
||||
usersQuota.QuotaValue = allocatedCrmUsers;
|
||||
|
||||
|
||||
if (stats.AllocatedCRMUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedCRMUsers - tenantStats.CreatedCRMUsers;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
<p>User account can also represent Exchange mailbox, which may be a person, room or inventory unit.</p></value>
|
||||
</data>
|
||||
<data name="locQuota.Text" xml:space="preserve">
|
||||
<value>Total Users Created:</value>
|
||||
<value>Total Users Created in this Organization:</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Users</value>
|
||||
|
@ -174,4 +174,10 @@
|
|||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Users</value>
|
||||
</data>
|
||||
<data name="locTenantAvailable.Text" xml:space="preserve">
|
||||
<value>Available Users for this Tenant:</value>
|
||||
</data>
|
||||
<data name="locTenantQuota.Text" xml:space="preserve">
|
||||
<value>Total Users Created for this Tenant:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -57,10 +57,11 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
private void BindStats()
|
||||
{
|
||||
// quota values
|
||||
OrganizationStatistics stats =
|
||||
ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
contactsQuota.QuotaUsedValue = stats.CreatedContacts;
|
||||
contactsQuota.QuotaValue = stats.AllocatedContacts;
|
||||
if (stats.AllocatedContacts != -1) contactsQuota.QuotaAvailable = tenantStats.AllocatedContacts - tenantStats.CreatedContacts;
|
||||
}
|
||||
|
||||
protected void btnCreateContact_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -57,10 +57,11 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
private void BindStats()
|
||||
{
|
||||
// quota values
|
||||
OrganizationStatistics stats =
|
||||
ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
listsQuota.QuotaUsedValue = stats.CreatedDistributionLists;
|
||||
listsQuota.QuotaValue = stats.AllocatedDistributionLists;
|
||||
if (stats.AllocatedDistributionLists != -1) listsQuota.QuotaAvailable = tenantStats.AllocatedDistributionLists - tenantStats.CreatedDistributionLists;
|
||||
}
|
||||
|
||||
protected void btnCreateList_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -55,10 +55,11 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
private void BindStats()
|
||||
{
|
||||
// quota values
|
||||
OrganizationStatistics stats =
|
||||
ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
mailboxesQuota.QuotaUsedValue = stats.CreatedMailboxes;
|
||||
mailboxesQuota.QuotaValue = stats.AllocatedMailboxes;
|
||||
if (stats.AllocatedMailboxes != -1) mailboxesQuota.QuotaAvailable = tenantStats.AllocatedMailboxes - tenantStats.CreatedMailboxes;
|
||||
}
|
||||
|
||||
protected void btnCreateMailbox_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -59,10 +59,11 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
private void BindStats()
|
||||
{
|
||||
OrganizationStatistics stats =
|
||||
ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
foldersQuota.QuotaUsedValue = stats.CreatedPublicFolders;
|
||||
foldersQuota.QuotaValue = stats.AllocatedPublicFolders;
|
||||
if (stats.AllocatedPublicFolders != -1) foldersQuota.QuotaAvailable = tenantStats.AllocatedPublicFolders - tenantStats.CreatedPublicFolders;
|
||||
}
|
||||
|
||||
private void BuildFoldersTree()
|
||||
|
|
|
@ -102,6 +102,14 @@
|
|||
<wsp:QuotaViewer ID="listsStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow" >
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkFolders" runat="server" meta:resourcekey="lnkFolders"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="foldersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:HyperLink ID="lnkExchangeStorage" runat="server" meta:resourcekey="lnkExchangeStorage"></asp:HyperLink>
|
||||
|
|
|
@ -45,7 +45,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
private void BindExchangeStats()
|
||||
{
|
||||
OrganizationStatistics exchangeOrgStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics exchangeOrgStats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics exchangeTenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
|
||||
lnkMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
|
@ -58,19 +60,28 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
lnkExchangeStorage.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "storage_usage",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
lnkFolders.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "public_folders",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
mailboxesStats.QuotaUsedValue = exchangeOrgStats.CreatedMailboxes;
|
||||
mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes;
|
||||
if (exchangeOrgStats.AllocatedMailboxes != -1) mailboxesStats.QuotaAvailable = exchangeTenantStats.AllocatedMailboxes - exchangeTenantStats.CreatedMailboxes;
|
||||
|
||||
contactsStats.QuotaUsedValue = exchangeOrgStats.CreatedContacts;
|
||||
contactsStats.QuotaValue = exchangeOrgStats.AllocatedContacts;
|
||||
if (exchangeOrgStats.AllocatedContacts != -1) contactsStats.QuotaAvailable = exchangeTenantStats.AllocatedContacts - exchangeTenantStats.CreatedContacts;
|
||||
|
||||
listsStats.QuotaUsedValue = exchangeOrgStats.CreatedDistributionLists;
|
||||
listsStats.QuotaValue = exchangeOrgStats.AllocatedDistributionLists;
|
||||
if (exchangeOrgStats.AllocatedDistributionLists != -1) listsStats.QuotaAvailable = exchangeTenantStats.AllocatedDistributionLists - exchangeTenantStats.CreatedDistributionLists;
|
||||
|
||||
exchangeStorageStats.QuotaUsedValue = exchangeOrgStats.UsedDiskSpace;
|
||||
exchangeStorageStats.QuotaValue = exchangeOrgStats.AllocatedDiskSpace;
|
||||
if (exchangeOrgStats.AllocatedDiskSpace != -1) exchangeStorageStats.QuotaAvailable = exchangeTenantStats.AllocatedDiskSpace - exchangeTenantStats.UsedDiskSpace;
|
||||
|
||||
|
||||
foldersStats.QuotaUsedValue = exchangeOrgStats.CreatedPublicFolders;
|
||||
foldersStats.QuotaValue = exchangeOrgStats.AllocatedPublicFolders;
|
||||
if (exchangeOrgStats.AllocatedPublicFolders != -1) foldersStats.QuotaAvailable = exchangeTenantStats.AllocatedPublicFolders - exchangeTenantStats.CreatedPublicFolders;
|
||||
}
|
||||
|
||||
private void BindOrgStats()
|
||||
|
@ -83,15 +94,18 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
lblCreatedValue.Text = org.CreatedDate.Date.ToShortDateString();
|
||||
|
||||
|
||||
OrganizationStatistics orgStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics orgStats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
if (orgStats == null)
|
||||
return;
|
||||
|
||||
domainStats.QuotaUsedValue = orgStats.CreatedDomains;
|
||||
domainStats.QuotaValue = orgStats.AllocatedDomains;
|
||||
if (orgStats.AllocatedDomains != -1) domainStats.QuotaAvailable = tenantStats.AllocatedDomains - tenantStats.CreatedDomains;
|
||||
|
||||
userStats.QuotaUsedValue = orgStats.CreatedUsers;
|
||||
userStats.QuotaValue = orgStats.AllocatedUsers;
|
||||
if (orgStats.AllocatedUsers != -1) userStats.QuotaAvailable = tenantStats.AllocatedUsers - tenantStats.CreatedUsers;
|
||||
|
||||
|
||||
|
||||
|
@ -123,7 +137,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
siteCollectionsStats.QuotaUsedValue = orgStats.CreatedSharePointSiteCollections;
|
||||
siteCollectionsStats.QuotaValue = orgStats.AllocatedSharePointSiteCollections;
|
||||
|
||||
if (orgStats.AllocatedSharePointSiteCollections != -1) siteCollectionsStats.QuotaAvailable = tenantStats.AllocatedSharePointSiteCollections - tenantStats.CreatedSharePointSiteCollections;
|
||||
}
|
||||
else
|
||||
sharePointStatsPanel.Visible = false;
|
||||
|
@ -131,7 +145,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (cntx.Groups.ContainsKey(ResourceGroups.OCS))
|
||||
{
|
||||
ocsStatsPanel.Visible = true;
|
||||
BindOCSStats();
|
||||
BindOCSStats(orgStats, tenantStats);
|
||||
}
|
||||
else
|
||||
ocsStatsPanel.Visible = false;
|
||||
|
@ -139,7 +153,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (cntx.Groups.ContainsKey(ResourceGroups.BlackBerry))
|
||||
{
|
||||
besStatsPanel.Visible = true;
|
||||
BindBESStats();
|
||||
BindBESStats(orgStats, tenantStats);
|
||||
}
|
||||
else
|
||||
besStatsPanel.Visible = false;
|
||||
|
@ -147,7 +161,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (cntx.Groups.ContainsKey(ResourceGroups.Lync))
|
||||
{
|
||||
lyncStatsPanel.Visible = true;
|
||||
BindLyncStats();
|
||||
BindLyncStats(orgStats, tenantStats);
|
||||
}
|
||||
else
|
||||
lyncStatsPanel.Visible = false;
|
||||
|
@ -157,7 +171,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (org.CrmOrganizationId != Guid.Empty)
|
||||
{
|
||||
crmStatsPanel.Visible = true;
|
||||
BindCRMStats(orgStats);
|
||||
BindCRMStats(orgStats, tenantStats);
|
||||
}
|
||||
else
|
||||
crmStatsPanel.Visible = false;
|
||||
|
@ -165,43 +179,42 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
}
|
||||
|
||||
private void BindCRMStats(OrganizationStatistics orgStats)
|
||||
private void BindCRMStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||
{
|
||||
lnkCRMUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crmusers",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
crmUsersStats.QuotaUsedValue = orgStats.CreatedCRMUsers;
|
||||
crmUsersStats.QuotaValue = orgStats.AllocatedCRMUsers;
|
||||
crmUsersStats.QuotaUsedValue = stats.CreatedCRMUsers;
|
||||
crmUsersStats.QuotaValue = stats.AllocatedCRMUsers;
|
||||
if (stats.AllocatedCRMUsers != -1) crmUsersStats.QuotaAvailable = tenantStats.AllocatedCRMUsers - tenantStats.CreatedCRMUsers;
|
||||
}
|
||||
|
||||
private void BindOCSStats()
|
||||
private void BindOCSStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||
{
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
ocsUsersStats.QuotaValue = stats.AllocatedOCSUsers;
|
||||
ocsUsersStats.QuotaUsedValue = stats.CreatedOCSUsers;
|
||||
if (stats.AllocatedOCSUsers != -1) ocsUsersStats.QuotaAvailable = tenantStats.AllocatedOCSUsers - tenantStats.CreatedOCSUsers;
|
||||
|
||||
lnkOCSUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "ocs_users",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
}
|
||||
|
||||
private void BindLyncStats()
|
||||
private void BindLyncStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||
{
|
||||
/*
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
lyncUsersStats.QuotaValue = stats.AllocatedLyncUsers;
|
||||
lyncUsersStats.QuotaUsedValue = stats.CreatedLyncUsers;
|
||||
if (stats.AllocatedLyncUsers != -1) lyncUsersStats.QuotaAvailable = tenantStats.AllocatedLyncUsers - tenantStats.CreatedLyncUsers;
|
||||
|
||||
lnkLyncUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "lync_users",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
private void BindBESStats()
|
||||
private void BindBESStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||
{
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
besUsersStats.QuotaValue = stats.AllocatedBlackBerryUsers;
|
||||
besUsersStats.QuotaUsedValue = stats.CreatedBlackBerryUsers;
|
||||
if (stats.AllocatedBlackBerryUsers != -1) besUsersStats.QuotaAvailable = tenantStats.AllocatedBlackBerryUsers - tenantStats.CreatedBlackBerryUsers;
|
||||
|
||||
lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "blackberry_users",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
|
|
@ -219,6 +219,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer listsStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkFolders 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 lnkFolders;
|
||||
|
||||
/// <summary>
|
||||
/// foldersStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer foldersStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkExchangeStorage control.
|
||||
/// </summary>
|
||||
|
@ -416,14 +434,5 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer crmUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// FormComments 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 FormComments;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,10 +58,11 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
private void BindStats()
|
||||
{
|
||||
// quota values
|
||||
OrganizationStatistics stats =
|
||||
ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
usersQuota.QuotaUsedValue = stats.CreatedUsers;
|
||||
usersQuota.QuotaValue = stats.AllocatedUsers;
|
||||
if (stats.AllocatedUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedUsers - tenantStats.CreatedUsers;
|
||||
}
|
||||
|
||||
protected void btnCreateUser_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -52,11 +52,12 @@ namespace WebsitePanel.Portal
|
|||
private void BindStats()
|
||||
{
|
||||
// quota values
|
||||
OrganizationStatistics stats =
|
||||
ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
|
||||
siteCollectionsQuota.QuotaUsedValue = stats.CreatedSharePointSiteCollections;
|
||||
siteCollectionsQuota.QuotaValue = stats.AllocatedSharePointSiteCollections;
|
||||
if (stats.AllocatedSharePointSiteCollections != -1) siteCollectionsQuota.QuotaAvailable = tenantStats.AllocatedSharePointSiteCollections - tenantStats.CreatedSharePointSiteCollections;
|
||||
}
|
||||
|
||||
protected void btnCreateSiteCollection_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -143,6 +143,14 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
txtUsername.Text = cookie.Value;
|
||||
}
|
||||
|
||||
if (PortalUtils.GetHideThemeAndLocale())
|
||||
{
|
||||
ddlLanguage.Visible = false;
|
||||
lblLanguage.Visible = false;
|
||||
ddlTheme.Visible = false;
|
||||
lblTheme.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void cmdForgotPassword_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -41,11 +41,14 @@ namespace WebsitePanel.Portal.Lync
|
|||
|
||||
private void BindStats()
|
||||
{
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
int allocatedLyncUsers = stats.AllocatedLyncUsers;
|
||||
int usedUsers = stats.CreatedLyncUsers;
|
||||
usersQuota.QuotaUsedValue = usedUsers;
|
||||
usersQuota.QuotaValue = allocatedLyncUsers;
|
||||
|
||||
if (stats.AllocatedLyncUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedLyncUsers - tenantStats.CreatedLyncUsers;
|
||||
}
|
||||
|
||||
protected void btnCreateUser_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -41,11 +41,14 @@ namespace WebsitePanel.Portal.OCS
|
|||
|
||||
private void BindStats()
|
||||
{
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
|
||||
int allocatedOCSUsers = stats.AllocatedOCSUsers;
|
||||
int usedUsers = stats.CreatedOCSUsers;
|
||||
usersQuota.QuotaUsedValue = usedUsers;
|
||||
usersQuota.QuotaValue = allocatedOCSUsers;
|
||||
|
||||
if (stats.AllocatedOCSUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedOCSUsers - tenantStats.CreatedOCSUsers;
|
||||
}
|
||||
|
||||
protected void btnCreateUser_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -112,11 +112,14 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Text.Available" xml:space="preserve">
|
||||
<value>Available</value>
|
||||
</data>
|
||||
<data name="Text.Disabled" xml:space="preserve">
|
||||
<value>Disabled</value>
|
||||
</data>
|
||||
|
|
|
@ -68,6 +68,12 @@ namespace WebsitePanel.Portal
|
|||
set { ViewState["Total"] = value; }
|
||||
}
|
||||
|
||||
public int Available
|
||||
{
|
||||
get { return (ViewState["Available"] != null) ? (int)ViewState["Available"] : -1; }
|
||||
set { ViewState["Available"] = value; }
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get { return this.width; }
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
<%@ Register Src="Gauge.ascx" TagName="Gauge" TagPrefix="uc1" %>
|
||||
<uc1:Gauge ID="gauge" runat="server"
|
||||
Progress='<%# Eval("QuotaUsedValue") %>'
|
||||
Total='<%# Eval("QuotaValue") %>' />
|
||||
Total='<%# Eval("QuotaValue") %>'
|
||||
Available='<%# Eval("QuotaAvailable") %>'/>
|
||||
<asp:Label ID="litValue" runat="server"></asp:Label>
|
|
@ -77,6 +77,19 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
}
|
||||
|
||||
public int QuotaAvailable
|
||||
{
|
||||
set
|
||||
{
|
||||
// store value
|
||||
gauge.Available = value;
|
||||
|
||||
// update control
|
||||
UpdateControl();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void UpdateControl()
|
||||
{
|
||||
int total = gauge.Total;
|
||||
|
@ -88,8 +101,12 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
else if (QuotaTypeId == 2)
|
||||
{
|
||||
litValue.Text = String.Format("{0} {1} {2}",
|
||||
gauge.Progress, GetLocalizedString("Text.Of"), ((total == -1) ? GetLocalizedString("Text.Unlimited") : total.ToString()));
|
||||
string availableText = string.Empty;
|
||||
if (gauge.Available != -1) availableText = String.Format("({0} {1})", gauge.Available.ToString(), GetLocalizedString("Text.Available"));
|
||||
|
||||
litValue.Text = String.Format("{0} {1} {2} {3}",
|
||||
gauge.Progress, GetLocalizedString("Text.Of"), ((total == -1) ? GetLocalizedString("Text.Unlimited") : total.ToString()), availableText);
|
||||
|
||||
gauge.Visible = (total != -1);
|
||||
//litValue.Visible = (value == -1);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3053
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue