diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql
index 54df0493..27d8a6f9 100644
--- a/WebsitePanel/Database/update_db.sql
+++ b/WebsitePanel/Database/update_db.sql
@@ -6042,7 +6042,7 @@ CREATE PROCEDURE [dbo].GetOrganizationRdsUsersCount
)
AS
SELECT
- @TotalNumber = Count([RDSCollectionId])
+ @TotalNumber = Count(DISTINCT([AccountId]))
FROM [dbo].[RDSCollectionUsers]
WHERE [RDSCollectionId] in (SELECT [ID] FROM [RDSCollections] where [ItemId] = @ItemId )
RETURN
@@ -8192,6 +8192,22 @@ AS
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID AND ea.AccountType = 11)
+ ELSE IF @QuotaID = 450
+ SET @Result = (SELECT COUNT(DISTINCT(RCU.[AccountId])) FROM [dbo].[RDSCollectionUsers] RCU
+ INNER JOIN ExchangeAccounts EA ON EA.AccountId = RCU.AccountId
+ INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
+ INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
+ WHERE PT.ParentPackageID = @PackageID)
+ ELSE IF @QuotaID = 451
+ SET @Result = (SELECT COUNT(RS.[ID]) FROM [dbo].[RDSServers] RS
+ INNER JOIN ServiceItems si ON RS.ItemID = si.ItemID
+ INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
+ WHERE PT.ParentPackageID = @PackageID)
+ ELSE IF @QuotaID = 491
+ SET @Result = (SELECT COUNT(RC.[ID]) FROM [dbo].[RDSCollections] RC
+ INNER JOIN ServiceItems si ON RC.ItemID = si.ItemID
+ INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
+ WHERE PT.ParentPackageID = @PackageID)
ELSE IF @QuotaName like 'ServiceLevel.%' -- Support Service Level Quota
BEGIN
DECLARE @LevelID int
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs
index c3bd42d7..269add07 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs
@@ -760,8 +760,21 @@ namespace WebsitePanel.EnterpriseServer
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(organization.PackageId));
+ var userSessions = rds.GetRdsUserSessions(collection.Name).ToList();
+ var organizationUsers = OrganizationController.GetOrganizationUsersPaged(collection.ItemId, null, null, null, 0, Int32.MaxValue).PageUsers;
- return rds.GetRdsUserSessions(collection.Name).ToList();
+ foreach(var userSession in userSessions)
+ {
+ var organizationUser = organizationUsers.FirstOrDefault(o => o.SamAccountName.Equals(userSession.SamAccountName, StringComparison.CurrentCultureIgnoreCase));
+
+ if (organizationUser != null)
+ {
+ userSession.IsVip = organizationUser.IsVIP;
+ result.Add(userSession);
+ }
+ }
+
+ return result;
}
private static RdsServersPaged GetFreeRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsUserSession.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsUserSession.cs
index 8c3e9729..4d6b4e19 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsUserSession.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsUserSession.cs
@@ -13,5 +13,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public string SessionState { get; set; }
public string HostServer { get; set; }
public string DomainName { get; set; }
+ public bool IsVip { get; set; }
+ public string SamAccountName { get; set; }
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs
index dea195b8..a0015101 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs
@@ -2290,18 +2290,22 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
cmd.Parameters.Add("CollectionName", collectionName);
cmd.Parameters.Add("ConnectionBroker", ConnectionBroker);
var userSessions = ExecuteShellCommand(runSpace, cmd, false, out errors);
- var properties = typeof(RdsUserSession).GetProperties();
+ var properties = typeof(RdsUserSession).GetProperties();
foreach(var userSession in userSessions)
{
- var session = new RdsUserSession();
-
- foreach(var prop in properties)
+ var session = new RdsUserSession
{
- prop.SetValue(session, GetPSObjectProperty(userSession, prop.Name).ToString(), null);
- }
-
- session.UserName = GetUserFullName(session.DomainName, session.UserName, runSpace);
+ CollectionName = GetPSObjectProperty(userSession, "CollectionName").ToString(),
+ DomainName = GetPSObjectProperty(userSession, "DomainName").ToString(),
+ HostServer = GetPSObjectProperty(userSession, "HostServer").ToString(),
+ SessionState = GetPSObjectProperty(userSession, "SessionState").ToString(),
+ UnifiedSessionId = GetPSObjectProperty(userSession, "UnifiedSessionId").ToString(),
+ SamAccountName = GetPSObjectProperty(userSession, "UserName").ToString(),
+ };
+
+ session.IsVip = false;
+ session.UserName = GetUserFullName(session.DomainName, session.SamAccountName, runSpace);
result.Add(session);
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/AssignedRDSServers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/AssignedRDSServers.ascx.resx
index 33277c17..e2d6204d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/AssignedRDSServers.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/AssignedRDSServers.ascx.resx
@@ -145,7 +145,7 @@
Assigned RDS Servers
- Total RDS Servers Allocated:
+ Total Remote Desktop Servers Allocated:
Disable
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSCollections.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSCollections.ascx.resx
index b231aa48..3a2deaac 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSCollections.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSCollections.ascx.resx
@@ -147,4 +147,7 @@
RDS Server
+
+ Total Remote Desktop Collections Created:
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditCollectionUsers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditCollectionUsers.ascx.resx
index b7086125..60f1cf4b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditCollectionUsers.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditCollectionUsers.ascx.resx
@@ -144,4 +144,7 @@
RDS Users
+
+ Total RDS Users Assigned:
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx
index 6016913e..9ff6017f 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx
@@ -72,6 +72,11 @@
+
// This code was generated by a tool.
@@ -139,6 +111,24 @@ namespace WebsitePanel.Portal.RDS {
///
protected global::System.Web.UI.WebControls.GridView gvRDSAssignedServers;
+ ///
+ /// locQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locQuota;
+
+ ///
+ /// rdsServersQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaViewer rdsServersQuota;
+
///
/// odsRDSAssignedServersPaged control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx
index a311aaa3..a5369d97 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCollections.ascx
@@ -66,6 +66,11 @@
+
protected global::System.Web.UI.WebControls.GridView gvRDSCollections;
+ ///
+ /// locQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locQuota;
+
+ ///
+ /// collectionsQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaViewer collectionsQuota;
+
///
/// odsRDSCollectionsPaged control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx
index 7f71695d..57a37195 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx
@@ -1,6 +1,7 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditCollectionUsers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditCollectionUsers" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionUsers.ascx" TagName="CollectionUsers" TagPrefix="wsp"%>
<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
@@ -34,6 +35,11 @@
+