Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs	(revision 15670)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs	(revision 15671)
@@ -33,10 +33,26 @@
     }
 
-    public IQueryable<DimClient> GetActiveClients() {
-      return Table.Where(x => x.ExpirationTime == null);
+    public IQueryable<DimClient> GetAllOnlineClients() {
+      return Table.Where(x => x.DateExpired == null);
     }
 
-    public IQueryable<DimClient> GetExpiredClients() {
-      return Table.Where(x => x.ExpirationTime != null);
+    public IQueryable<DimClient> GetAllExpiredClients() {
+      return Table.Where(x => x.DateExpired != null);
+    }
+
+    public IQueryable<DimClient> GetAllOnlineSlaves() {
+      return Table.Where(x => x.DateExpired == null && x.ResourceType == "Slave");
+    }
+
+    public IQueryable<DimClient> GetAllOnlineSlaveGroups() {
+      return Table.Where(x => x.DateExpired == null && x.ResourceType == "GROUP");
+    }
+
+    public IQueryable<DimClient> GetAllExpiredSlaves() {
+      return Table.Where(x => x.DateExpired != null && x.ResourceType == "Slave");
+    }
+
+    public IQueryable<DimClient> GetAllExpiredSlaveGroups() {
+      return Table.Where(x => x.DateExpired != null && x.ResourceType == "GROUP");
     }
 
@@ -44,5 +60,5 @@
       string paramIds = string.Join(",", ids.Select(x => string.Format("'{0}'", x)));
       if (!string.IsNullOrWhiteSpace(paramIds)) {
-        string query = string.Format(UpdateExpirationTimeQuery, "{0}", paramIds);
+        string query = string.Format(UpdateDateExpiredQuery, "{0}", paramIds);
         return DataContext.ExecuteCommand(query, time);
       }
@@ -59,7 +75,7 @@
 
     #region String queries
-    private const string UpdateExpirationTimeQuery =
+    private const string UpdateDateExpiredQuery =
       @"UPDATE [statistics].[DimClient] 
-           SET ExpirationTime = {0} 
+           SET DateExpired = {0} 
          WHERE Id IN ({1});";
     #endregion
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimProjectDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimProjectDao.cs	(revision 15670)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimProjectDao.cs	(revision 15671)
@@ -60,5 +60,6 @@
         (from dimProject in db.GetTable<DimProject>()
          where dimProject.ProjectId == projectId
-         orderby dimProject.DateCreated
+         && dimProject.DateExpired == null
+         orderby dimProject.DateCreated descending
          select dimProject.Id).SingleOrDefault());
     private static readonly Func<DataContext, IEnumerable<DimProject>> GetAllOnlineProjectsQuery =
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs	(revision 15670)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs	(revision 15671)
@@ -66,5 +66,5 @@
       return from factTask in Table
              join client in DimClientTable on factTask.LastClientId equals client.Id
-             where client.ResourceGroupId == id
+             where client.ParentResourceId == id
              select factTask;
     }
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 15670)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 15671)
@@ -167,9 +167,8 @@
       <Column Name="Name" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" />
       <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
-      <Column Name="ExpirationTime" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
-      <Column Name="ResourceGroupId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
-      <Column Name="ResourceGroup2Id" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
-      <Column Name="GroupName" Type="System.String" CanBeNull="true" />
-      <Column Name="GroupName2" Type="System.String" CanBeNull="true" />
+      <Column Name="ParentResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
+      <Column Name="ResourceType" Type="System.String" CanBeNull="false" />
+      <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
+      <Column Name="DateExpired" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
       <Association Name="DimClient_FactTask" Member="FactTasks" ThisKey="Id" OtherKey="LastClientId" Type="FactTask" />
       <Association Name="DimClient_FactClientInfo" Member="FactClientInfos" ThisKey="Id" OtherKey="ClientId" Type="FactClientInfo" />
@@ -301,5 +300,5 @@
       <Column Name="Id" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
       <Column Name="ProjectId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
-      <Column Name="ParentProjectId" Storage="_ParentId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="true" />
+      <Column Name="ParentProjectId" Storage="_ParentId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
       <Column Name="Name" Type="System.String" CanBeNull="false" />
       <Column Name="Description" Type="System.String" CanBeNull="true" />
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 15670)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 15671)
@@ -182,8 +182,8 @@
       </nestedChildShapes>
     </classShape>
-    <classShape Id="b5b919c2-4efc-4f09-8f52-9d541a11e961" absoluteBounds="5.5, 12.25, 2, 2.3478011067708344">
+    <classShape Id="b5b919c2-4efc-4f09-8f52-9d541a11e961" absoluteBounds="5.5, 12.25, 2, 2.1554996744791666">
       <DataClassMoniker Name="/HiveDataContext/DimClient" />
       <nestedChildShapes>
-        <elementListCompartment Id="30f62a7b-0b16-404e-b972-fb12bfe978dd" absoluteBounds="5.5150000000000006, 12.71, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+        <elementListCompartment Id="30f62a7b-0b16-404e-b972-fb12bfe978dd" absoluteBounds="5.5150000000000006, 12.71, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
       </nestedChildShapes>
     </classShape>
@@ -218,5 +218,5 @@
       </nestedChildShapes>
     </classShape>
-    <associationConnector edgePoints="[(7.5 : 13.4239005533854); (8.25 : 13.4239005533854)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+    <associationConnector edgePoints="[(7.5 : 13.3277498372396); (8.25 : 13.3277498372396)]" fixedFrom="Algorithm" fixedTo="Algorithm">
       <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactTask" />
       <nodes>
@@ -232,5 +232,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(6.5 : 14.5978011067708); (6.5 : 17)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+    <associationConnector edgePoints="[(6.5 : 14.4054996744792); (6.5 : 17)]" fixedFrom="Algorithm" fixedTo="Algorithm">
       <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactClientInfo" />
       <nodes>
@@ -313,5 +313,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(5.125 : 4.78049967447917); (5.125 : 5.14024983723958); (8.875 : 5.14024983723958)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+    <associationConnector edgePoints="[(5.125 : 4.78049967447917); (5.125 : 5.14024983723958); (7.41666666666667 : 5.14024983723958 : JumpStart); (7.58333333333333 : 5.14024983723958 : JumpEnd); (8.875 : 5.14024983723958)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedJobResource" />
       <nodes>
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 15670)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 15671)
@@ -3727,13 +3727,11 @@
 		private System.Guid _ResourceId;
 		
-		private System.Nullable<System.DateTime> _ExpirationTime;
-		
-		private System.Nullable<System.Guid> _ResourceGroupId;
-		
-		private System.Nullable<System.Guid> _ResourceGroup2Id;
-		
-		private string _GroupName;
-		
-		private string _GroupName2;
+		private System.Nullable<System.Guid> _ParentResourceId;
+		
+		private string _ResourceType;
+		
+		private System.DateTime _DateCreated;
+		
+		private System.Nullable<System.DateTime> _DateExpired;
 		
 		private EntitySet<FactTask> _FactTasks;
@@ -3751,14 +3749,12 @@
     partial void OnResourceIdChanging(System.Guid value);
     partial void OnResourceIdChanged();
-    partial void OnExpirationTimeChanging(System.Nullable<System.DateTime> value);
-    partial void OnExpirationTimeChanged();
-    partial void OnResourceGroupIdChanging(System.Nullable<System.Guid> value);
-    partial void OnResourceGroupIdChanged();
-    partial void OnResourceGroup2IdChanging(System.Nullable<System.Guid> value);
-    partial void OnResourceGroup2IdChanged();
-    partial void OnGroupNameChanging(string value);
-    partial void OnGroupNameChanged();
-    partial void OnGroupName2Changing(string value);
-    partial void OnGroupName2Changed();
+    partial void OnParentResourceIdChanging(System.Nullable<System.Guid> value);
+    partial void OnParentResourceIdChanged();
+    partial void OnResourceTypeChanging(string value);
+    partial void OnResourceTypeChanged();
+    partial void OnDateCreatedChanging(System.DateTime value);
+    partial void OnDateCreatedChanged();
+    partial void OnDateExpiredChanging(System.Nullable<System.DateTime> value);
+    partial void OnDateExpiredChanged();
     #endregion
 		
@@ -3830,100 +3826,80 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExpirationTime", DbType="DateTime")]
-		public System.Nullable<System.DateTime> ExpirationTime
-		{
-			get
-			{
-				return this._ExpirationTime;
-			}
-			set
-			{
-				if ((this._ExpirationTime != value))
-				{
-					this.OnExpirationTimeChanging(value);
-					this.SendPropertyChanging();
-					this._ExpirationTime = value;
-					this.SendPropertyChanged("ExpirationTime");
-					this.OnExpirationTimeChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroupId", DbType="UniqueIdentifier")]
-		public System.Nullable<System.Guid> ResourceGroupId
-		{
-			get
-			{
-				return this._ResourceGroupId;
-			}
-			set
-			{
-				if ((this._ResourceGroupId != value))
-				{
-					this.OnResourceGroupIdChanging(value);
-					this.SendPropertyChanging();
-					this._ResourceGroupId = value;
-					this.SendPropertyChanged("ResourceGroupId");
-					this.OnResourceGroupIdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroup2Id", DbType="UniqueIdentifier")]
-		public System.Nullable<System.Guid> ResourceGroup2Id
-		{
-			get
-			{
-				return this._ResourceGroup2Id;
-			}
-			set
-			{
-				if ((this._ResourceGroup2Id != value))
-				{
-					this.OnResourceGroup2IdChanging(value);
-					this.SendPropertyChanging();
-					this._ResourceGroup2Id = value;
-					this.SendPropertyChanged("ResourceGroup2Id");
-					this.OnResourceGroup2IdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName")]
-		public string GroupName
-		{
-			get
-			{
-				return this._GroupName;
-			}
-			set
-			{
-				if ((this._GroupName != value))
-				{
-					this.OnGroupNameChanging(value);
-					this.SendPropertyChanging();
-					this._GroupName = value;
-					this.SendPropertyChanged("GroupName");
-					this.OnGroupNameChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName2")]
-		public string GroupName2
-		{
-			get
-			{
-				return this._GroupName2;
-			}
-			set
-			{
-				if ((this._GroupName2 != value))
-				{
-					this.OnGroupName2Changing(value);
-					this.SendPropertyChanging();
-					this._GroupName2 = value;
-					this.SendPropertyChanged("GroupName2");
-					this.OnGroupName2Changed();
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentResourceId", DbType="UniqueIdentifier")]
+		public System.Nullable<System.Guid> ParentResourceId
+		{
+			get
+			{
+				return this._ParentResourceId;
+			}
+			set
+			{
+				if ((this._ParentResourceId != value))
+				{
+					this.OnParentResourceIdChanging(value);
+					this.SendPropertyChanging();
+					this._ParentResourceId = value;
+					this.SendPropertyChanged("ParentResourceId");
+					this.OnParentResourceIdChanged();
+				}
+			}
+		}
+		
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceType", CanBeNull=false)]
+		public string ResourceType
+		{
+			get
+			{
+				return this._ResourceType;
+			}
+			set
+			{
+				if ((this._ResourceType != value))
+				{
+					this.OnResourceTypeChanging(value);
+					this.SendPropertyChanging();
+					this._ResourceType = value;
+					this.SendPropertyChanged("ResourceType");
+					this.OnResourceTypeChanged();
+				}
+			}
+		}
+		
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime NOT NULL")]
+		public System.DateTime DateCreated
+		{
+			get
+			{
+				return this._DateCreated;
+			}
+			set
+			{
+				if ((this._DateCreated != value))
+				{
+					this.OnDateCreatedChanging(value);
+					this.SendPropertyChanging();
+					this._DateCreated = value;
+					this.SendPropertyChanged("DateCreated");
+					this.OnDateCreatedChanged();
+				}
+			}
+		}
+		
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateExpired", DbType="DateTime")]
+		public System.Nullable<System.DateTime> DateExpired
+		{
+			get
+			{
+				return this._DateExpired;
+			}
+			set
+			{
+				if ((this._DateExpired != value))
+				{
+					this.OnDateExpiredChanging(value);
+					this.SendPropertyChanging();
+					this._DateExpired = value;
+					this.SendPropertyChanged("DateExpired");
+					this.OnDateExpiredChanged();
 				}
 			}
@@ -6722,5 +6698,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentId", DbType="UniqueIdentifier NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentId", DbType="UniqueIdentifier")]
 		public System.Nullable<System.Guid> ParentProjectId
 		{
Index: branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/ClientController.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/ClientController.cs	(revision 15670)
+++ branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/ClientController.cs	(revision 15671)
@@ -74,5 +74,6 @@
                   on client.Id equals info.ClientId into clientInfoJoin
                 from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
-                let offline = (client.ExpirationTime != null || clientInfo.SlaveState == SlaveState.Offline)
+                let offline = (client.DateExpired != null || clientInfo.SlaveState == SlaveState.Offline)
+                let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
                 select new DT.ClientDetails {
                   Id = client.Id,
@@ -85,6 +86,6 @@
                   State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
                   LastUpdate = clientInfo.Time,
-                  GroupId = client.ResourceGroupId,
-                  GroupName = client.GroupName,
+                  GroupId = client.ParentResourceId,
+                  GroupName = parent != null ? parent.Name : null,
                   UpTime = offline ? 0 : upTime,
                   TotalUnavailableTime = timeData != null ? timeData.TotalUnavailableTime : 0,
@@ -117,5 +118,5 @@
       var factClientInfoDao = pm.FactClientInfoDao;
       return pm.UseTransaction(() => {
-        var clients = expired ? dimClientDao.GetExpiredClients() : dimClientDao.GetActiveClients();
+        var clients = expired ? dimClientDao.GetAllExpiredSlaves() : dimClientDao.GetAllOnlineSlaves();
         var query = (from client in clients
                      join info in factClientInfoDao.GetAll()
@@ -123,4 +124,5 @@
                      from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
                      let offline = (expired || clientInfo.SlaveState == SlaveState.Offline)
+                     let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
                      select new DT.Client {
                        Id = client.Id,
@@ -132,6 +134,6 @@
                        CpuUtilization = offline ? 0 : clientInfo.CpuUtilization,
                        State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
-                       GroupId = client.ResourceGroupId,
-                       GroupName = client.GroupName,
+                       GroupId = client.ParentResourceId,
+                       GroupName = parent != null ? parent.Name : null,
                        IsAllowedToCalculate = clientInfo.IsAllowedToCalculate
                      });
@@ -200,6 +202,6 @@
       var factClientInfoDao = pm.FactClientInfoDao;
       return pm.UseTransaction(() => {
-        var clients = expired ? dimClientDao.GetExpiredClients() : dimClientDao.GetActiveClients();
-        clients = clients.Where(x => x.ResourceGroupId == id);
+        var clients = expired ? dimClientDao.GetAllExpiredClients() : dimClientDao.GetAllOnlineClients();
+        clients = clients.Where(x => x.ParentResourceId == id);
         var query = (from client in clients
                      join info in factClientInfoDao.GetAll()
@@ -207,4 +209,5 @@
                      from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
                      let offline = (expired || clientInfo.SlaveState == SlaveState.Offline)
+                     let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
                      select new DT.Client {
                        Id = client.Id,
@@ -216,6 +219,6 @@
                        CpuUtilization = offline ? 0 : clientInfo.CpuUtilization,
                        State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
-                       GroupId = client.ResourceGroupId,
-                       GroupName = client.GroupName,
+                       GroupId = client.ParentResourceId,
+                       GroupName = parent != null ? parent.Name : null,
                        IsAllowedToCalculate = clientInfo.IsAllowedToCalculate
                      });
@@ -247,5 +250,5 @@
           client => client.Id,
           (fact, client) => new {
-            client.ResourceGroupId,
+            client.ParentResourceId,
             fact.Time,
             fact.CpuUtilization,
@@ -255,5 +258,5 @@
             fact.UsedMemory
           })
-        .Where(x => x.ResourceGroupId == id)
+        .Where(x => x.ParentResourceId == id)
         .ToList();
       var clientStatus = new DT.ClientStatus {
Index: branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/GroupController.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/GroupController.cs	(revision 15670)
+++ branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/GroupController.cs	(revision 15671)
@@ -42,11 +42,11 @@
         var clientTimeData = factClientInfoDao.GetAll()
           .Join(dimClientDao.GetAll(), x => x.ClientId, y => y.Id, (x, y) => new {
-            y.ResourceGroupId,
+            y.ParentResourceId,
             x.IdleTime,
             x.OfflineTime,
             x.UnavailableTime
           })
-          .Where(x => x.ResourceGroupId == id)
-          .GroupBy(x => x.ResourceGroupId)
+          .Where(x => x.ParentResourceId == id)
+          .GroupBy(x => x.ParentResourceId)
           .Select(x => new {
             TotalIdleTime = x.Sum(y => y.IdleTime),
@@ -68,12 +68,13 @@
           })
           .FirstOrDefault();
-        return (from client in dimClientDao.GetActiveClients().Where(x => x.ResourceGroupId == id)
+        return (from client in dimClientDao.GetAllOnlineSlaves().Where(x => x.ParentResourceId == id)
                 join info in factClientInfoDao.GetAll()
                   on client.Id equals info.ClientId into clientInfoJoin
                 from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
                 let offline = (clientInfo.SlaveState == DA.SlaveState.Offline)
+                let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
                 select new {
-                  ResourceGroupId = client.ResourceGroupId,
-                  GroupName = client.GroupName,
+                  ResourceGroupId = client.ParentResourceId,
+                  GroupName = parent != null ? parent.Name : null,
                   TotalCores = clientInfo.NumTotalCores,
                   UsedCores = offline ? 0 : clientInfo.NumUsedCores,
@@ -114,5 +115,5 @@
       var dimClientDao = pm.DimClientDao;
       var factClientInfoDao = pm.FactClientInfoDao;
-      var data = (from client in dimClientDao.GetActiveClients()
+      var data = (from client in dimClientDao.GetAllOnlineSlaves()
                   join info in factClientInfoDao.GetAll()
                     on client.Id equals info.ClientId into clientInfoJoin
@@ -120,5 +121,5 @@
                   let offline = (clientInfo.SlaveState == DA.SlaveState.Offline)
                   select new {
-                    ResourceGroupId = client.ResourceGroupId,
+                    ResourceGroupId = client.ParentResourceId,
                     TotalCores = clientInfo.NumTotalCores,
                     UsedCores = offline ? 0 : clientInfo.NumUsedCores,
@@ -137,10 +138,9 @@
                     CpuUtilization = x.Where(y => y.SlaveState != DA.SlaveState.Offline).Average(y => (double?)y.CpuUtilization) ?? 0.0
                   });
-      var query = dimClientDao.GetAll()
-        .GroupBy(x => new { x.ResourceGroupId, x.GroupName })
-        .Select(x => new {
-          Id = x.Key.ResourceGroupId ?? default(Guid),
-          Name = x.Key.GroupName
-        });
+
+      var query = dimClientDao.GetAllOnlineSlaveGroups().Select(x => new {
+        Id = x.ResourceId,
+        Name = x.Name
+      });
       return pm.UseTransaction(() => new DT.GroupPage {
         TotalGroups = query.Count(),
