Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15671


Ignore:
Timestamp:
01/30/18 12:56:00 (7 years ago)
Author:
jzenisek
Message:

#2839

  • adapted computation of DimClient and FactClientInfo stats
  • adapted web app according to new stats computation
Location:
branches/HiveProjectManagement
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs

    r14185 r15671  
    3333    }
    3434
    35     public IQueryable<DimClient> GetActiveClients() {
    36       return Table.Where(x => x.ExpirationTime == null);
     35    public IQueryable<DimClient> GetAllOnlineClients() {
     36      return Table.Where(x => x.DateExpired == null);
    3737    }
    3838
    39     public IQueryable<DimClient> GetExpiredClients() {
    40       return Table.Where(x => x.ExpirationTime != null);
     39    public IQueryable<DimClient> GetAllExpiredClients() {
     40      return Table.Where(x => x.DateExpired != null);
     41    }
     42
     43    public IQueryable<DimClient> GetAllOnlineSlaves() {
     44      return Table.Where(x => x.DateExpired == null && x.ResourceType == "Slave");
     45    }
     46
     47    public IQueryable<DimClient> GetAllOnlineSlaveGroups() {
     48      return Table.Where(x => x.DateExpired == null && x.ResourceType == "GROUP");
     49    }
     50
     51    public IQueryable<DimClient> GetAllExpiredSlaves() {
     52      return Table.Where(x => x.DateExpired != null && x.ResourceType == "Slave");
     53    }
     54
     55    public IQueryable<DimClient> GetAllExpiredSlaveGroups() {
     56      return Table.Where(x => x.DateExpired != null && x.ResourceType == "GROUP");
    4157    }
    4258
     
    4460      string paramIds = string.Join(",", ids.Select(x => string.Format("'{0}'", x)));
    4561      if (!string.IsNullOrWhiteSpace(paramIds)) {
    46         string query = string.Format(UpdateExpirationTimeQuery, "{0}", paramIds);
     62        string query = string.Format(UpdateDateExpiredQuery, "{0}", paramIds);
    4763        return DataContext.ExecuteCommand(query, time);
    4864      }
     
    5975
    6076    #region String queries
    61     private const string UpdateExpirationTimeQuery =
     77    private const string UpdateDateExpiredQuery =
    6278      @"UPDATE [statistics].[DimClient]
    63            SET ExpirationTime = {0}
     79           SET DateExpired = {0}
    6480         WHERE Id IN ({1});";
    6581    #endregion
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimProjectDao.cs

    r15659 r15671  
    6060        (from dimProject in db.GetTable<DimProject>()
    6161         where dimProject.ProjectId == projectId
    62          orderby dimProject.DateCreated
     62         && dimProject.DateExpired == null
     63         orderby dimProject.DateCreated descending
    6364         select dimProject.Id).SingleOrDefault());
    6465    private static readonly Func<DataContext, IEnumerable<DimProject>> GetAllOnlineProjectsQuery =
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs

    r14185 r15671  
    6666      return from factTask in Table
    6767             join client in DimClientTable on factTask.LastClientId equals client.Id
    68              where client.ResourceGroupId == id
     68             where client.ParentResourceId == id
    6969             select factTask;
    7070    }
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r15659 r15671  
    167167      <Column Name="Name" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" />
    168168      <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    169       <Column Name="ExpirationTime" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    170       <Column Name="ResourceGroupId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    171       <Column Name="ResourceGroup2Id" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    172       <Column Name="GroupName" Type="System.String" CanBeNull="true" />
    173       <Column Name="GroupName2" Type="System.String" CanBeNull="true" />
     169      <Column Name="ParentResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
     170      <Column Name="ResourceType" Type="System.String" CanBeNull="false" />
     171      <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
     172      <Column Name="DateExpired" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    174173      <Association Name="DimClient_FactTask" Member="FactTasks" ThisKey="Id" OtherKey="LastClientId" Type="FactTask" />
    175174      <Association Name="DimClient_FactClientInfo" Member="FactClientInfos" ThisKey="Id" OtherKey="ClientId" Type="FactClientInfo" />
     
    301300      <Column Name="Id" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
    302301      <Column Name="ProjectId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    303       <Column Name="ParentProjectId" Storage="_ParentId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="true" />
     302      <Column Name="ParentProjectId" Storage="_ParentId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    304303      <Column Name="Name" Type="System.String" CanBeNull="false" />
    305304      <Column Name="Description" Type="System.String" CanBeNull="true" />
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r15659 r15671  
    182182      </nestedChildShapes>
    183183    </classShape>
    184     <classShape Id="b5b919c2-4efc-4f09-8f52-9d541a11e961" absoluteBounds="5.5, 12.25, 2, 2.3478011067708344">
     184    <classShape Id="b5b919c2-4efc-4f09-8f52-9d541a11e961" absoluteBounds="5.5, 12.25, 2, 2.1554996744791666">
    185185      <DataClassMoniker Name="/HiveDataContext/DimClient" />
    186186      <nestedChildShapes>
    187         <elementListCompartment Id="30f62a7b-0b16-404e-b972-fb12bfe978dd" absoluteBounds="5.5150000000000006, 12.71, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     187        <elementListCompartment Id="30f62a7b-0b16-404e-b972-fb12bfe978dd" absoluteBounds="5.5150000000000006, 12.71, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    188188      </nestedChildShapes>
    189189    </classShape>
     
    218218      </nestedChildShapes>
    219219    </classShape>
    220     <associationConnector edgePoints="[(7.5 : 13.4239005533854); (8.25 : 13.4239005533854)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     220    <associationConnector edgePoints="[(7.5 : 13.3277498372396); (8.25 : 13.3277498372396)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    221221      <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactTask" />
    222222      <nodes>
     
    232232      </nodes>
    233233    </associationConnector>
    234     <associationConnector edgePoints="[(6.5 : 14.5978011067708); (6.5 : 17)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     234    <associationConnector edgePoints="[(6.5 : 14.4054996744792); (6.5 : 17)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    235235      <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactClientInfo" />
    236236      <nodes>
     
    313313      </nodes>
    314314    </associationConnector>
    315     <associationConnector edgePoints="[(5.125 : 4.78049967447917); (5.125 : 5.14024983723958); (8.875 : 5.14024983723958)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     315    <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">
    316316      <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedJobResource" />
    317317      <nodes>
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r15659 r15671  
    37273727    private System.Guid _ResourceId;
    37283728   
    3729     private System.Nullable<System.DateTime> _ExpirationTime;
    3730    
    3731     private System.Nullable<System.Guid> _ResourceGroupId;
    3732    
    3733     private System.Nullable<System.Guid> _ResourceGroup2Id;
    3734    
    3735     private string _GroupName;
    3736    
    3737     private string _GroupName2;
     3729    private System.Nullable<System.Guid> _ParentResourceId;
     3730   
     3731    private string _ResourceType;
     3732   
     3733    private System.DateTime _DateCreated;
     3734   
     3735    private System.Nullable<System.DateTime> _DateExpired;
    37383736   
    37393737    private EntitySet<FactTask> _FactTasks;
     
    37513749    partial void OnResourceIdChanging(System.Guid value);
    37523750    partial void OnResourceIdChanged();
    3753     partial void OnExpirationTimeChanging(System.Nullable<System.DateTime> value);
    3754     partial void OnExpirationTimeChanged();
    3755     partial void OnResourceGroupIdChanging(System.Nullable<System.Guid> value);
    3756     partial void OnResourceGroupIdChanged();
    3757     partial void OnResourceGroup2IdChanging(System.Nullable<System.Guid> value);
    3758     partial void OnResourceGroup2IdChanged();
    3759     partial void OnGroupNameChanging(string value);
    3760     partial void OnGroupNameChanged();
    3761     partial void OnGroupName2Changing(string value);
    3762     partial void OnGroupName2Changed();
     3751    partial void OnParentResourceIdChanging(System.Nullable<System.Guid> value);
     3752    partial void OnParentResourceIdChanged();
     3753    partial void OnResourceTypeChanging(string value);
     3754    partial void OnResourceTypeChanged();
     3755    partial void OnDateCreatedChanging(System.DateTime value);
     3756    partial void OnDateCreatedChanged();
     3757    partial void OnDateExpiredChanging(System.Nullable<System.DateTime> value);
     3758    partial void OnDateExpiredChanged();
    37633759    #endregion
    37643760   
     
    38303826    }
    38313827   
    3832     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExpirationTime", DbType="DateTime")]
    3833     public System.Nullable<System.DateTime> ExpirationTime
    3834     {
    3835       get
    3836       {
    3837         return this._ExpirationTime;
    3838       }
    3839       set
    3840       {
    3841         if ((this._ExpirationTime != value))
    3842         {
    3843           this.OnExpirationTimeChanging(value);
    3844           this.SendPropertyChanging();
    3845           this._ExpirationTime = value;
    3846           this.SendPropertyChanged("ExpirationTime");
    3847           this.OnExpirationTimeChanged();
    3848         }
    3849       }
    3850     }
    3851    
    3852     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroupId", DbType="UniqueIdentifier")]
    3853     public System.Nullable<System.Guid> ResourceGroupId
    3854     {
    3855       get
    3856       {
    3857         return this._ResourceGroupId;
    3858       }
    3859       set
    3860       {
    3861         if ((this._ResourceGroupId != value))
    3862         {
    3863           this.OnResourceGroupIdChanging(value);
    3864           this.SendPropertyChanging();
    3865           this._ResourceGroupId = value;
    3866           this.SendPropertyChanged("ResourceGroupId");
    3867           this.OnResourceGroupIdChanged();
    3868         }
    3869       }
    3870     }
    3871    
    3872     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceGroup2Id", DbType="UniqueIdentifier")]
    3873     public System.Nullable<System.Guid> ResourceGroup2Id
    3874     {
    3875       get
    3876       {
    3877         return this._ResourceGroup2Id;
    3878       }
    3879       set
    3880       {
    3881         if ((this._ResourceGroup2Id != value))
    3882         {
    3883           this.OnResourceGroup2IdChanging(value);
    3884           this.SendPropertyChanging();
    3885           this._ResourceGroup2Id = value;
    3886           this.SendPropertyChanged("ResourceGroup2Id");
    3887           this.OnResourceGroup2IdChanged();
    3888         }
    3889       }
    3890     }
    3891    
    3892     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName")]
    3893     public string GroupName
    3894     {
    3895       get
    3896       {
    3897         return this._GroupName;
    3898       }
    3899       set
    3900       {
    3901         if ((this._GroupName != value))
    3902         {
    3903           this.OnGroupNameChanging(value);
    3904           this.SendPropertyChanging();
    3905           this._GroupName = value;
    3906           this.SendPropertyChanged("GroupName");
    3907           this.OnGroupNameChanged();
    3908         }
    3909       }
    3910     }
    3911    
    3912     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName2")]
    3913     public string GroupName2
    3914     {
    3915       get
    3916       {
    3917         return this._GroupName2;
    3918       }
    3919       set
    3920       {
    3921         if ((this._GroupName2 != value))
    3922         {
    3923           this.OnGroupName2Changing(value);
    3924           this.SendPropertyChanging();
    3925           this._GroupName2 = value;
    3926           this.SendPropertyChanged("GroupName2");
    3927           this.OnGroupName2Changed();
     3828    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentResourceId", DbType="UniqueIdentifier")]
     3829    public System.Nullable<System.Guid> ParentResourceId
     3830    {
     3831      get
     3832      {
     3833        return this._ParentResourceId;
     3834      }
     3835      set
     3836      {
     3837        if ((this._ParentResourceId != value))
     3838        {
     3839          this.OnParentResourceIdChanging(value);
     3840          this.SendPropertyChanging();
     3841          this._ParentResourceId = value;
     3842          this.SendPropertyChanged("ParentResourceId");
     3843          this.OnParentResourceIdChanged();
     3844        }
     3845      }
     3846    }
     3847   
     3848    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceType", CanBeNull=false)]
     3849    public string ResourceType
     3850    {
     3851      get
     3852      {
     3853        return this._ResourceType;
     3854      }
     3855      set
     3856      {
     3857        if ((this._ResourceType != value))
     3858        {
     3859          this.OnResourceTypeChanging(value);
     3860          this.SendPropertyChanging();
     3861          this._ResourceType = value;
     3862          this.SendPropertyChanged("ResourceType");
     3863          this.OnResourceTypeChanged();
     3864        }
     3865      }
     3866    }
     3867   
     3868    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime NOT NULL")]
     3869    public System.DateTime DateCreated
     3870    {
     3871      get
     3872      {
     3873        return this._DateCreated;
     3874      }
     3875      set
     3876      {
     3877        if ((this._DateCreated != value))
     3878        {
     3879          this.OnDateCreatedChanging(value);
     3880          this.SendPropertyChanging();
     3881          this._DateCreated = value;
     3882          this.SendPropertyChanged("DateCreated");
     3883          this.OnDateCreatedChanged();
     3884        }
     3885      }
     3886    }
     3887   
     3888    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateExpired", DbType="DateTime")]
     3889    public System.Nullable<System.DateTime> DateExpired
     3890    {
     3891      get
     3892      {
     3893        return this._DateExpired;
     3894      }
     3895      set
     3896      {
     3897        if ((this._DateExpired != value))
     3898        {
     3899          this.OnDateExpiredChanging(value);
     3900          this.SendPropertyChanging();
     3901          this._DateExpired = value;
     3902          this.SendPropertyChanged("DateExpired");
     3903          this.OnDateExpiredChanged();
    39283904        }
    39293905      }
     
    67226698    }
    67236699   
    6724     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentId", DbType="UniqueIdentifier NOT NULL")]
     6700    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentId", DbType="UniqueIdentifier")]
    67256701    public System.Nullable<System.Guid> ParentProjectId
    67266702    {
  • branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/ClientController.cs

    r14185 r15671  
    7474                  on client.Id equals info.ClientId into clientInfoJoin
    7575                from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
    76                 let offline = (client.ExpirationTime != null || clientInfo.SlaveState == SlaveState.Offline)
     76                let offline = (client.DateExpired != null || clientInfo.SlaveState == SlaveState.Offline)
     77                let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
    7778                select new DT.ClientDetails {
    7879                  Id = client.Id,
     
    8586                  State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
    8687                  LastUpdate = clientInfo.Time,
    87                   GroupId = client.ResourceGroupId,
    88                   GroupName = client.GroupName,
     88                  GroupId = client.ParentResourceId,
     89                  GroupName = parent != null ? parent.Name : null,
    8990                  UpTime = offline ? 0 : upTime,
    9091                  TotalUnavailableTime = timeData != null ? timeData.TotalUnavailableTime : 0,
     
    117118      var factClientInfoDao = pm.FactClientInfoDao;
    118119      return pm.UseTransaction(() => {
    119         var clients = expired ? dimClientDao.GetExpiredClients() : dimClientDao.GetActiveClients();
     120        var clients = expired ? dimClientDao.GetAllExpiredSlaves() : dimClientDao.GetAllOnlineSlaves();
    120121        var query = (from client in clients
    121122                     join info in factClientInfoDao.GetAll()
     
    123124                     from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
    124125                     let offline = (expired || clientInfo.SlaveState == SlaveState.Offline)
     126                     let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
    125127                     select new DT.Client {
    126128                       Id = client.Id,
     
    132134                       CpuUtilization = offline ? 0 : clientInfo.CpuUtilization,
    133135                       State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
    134                        GroupId = client.ResourceGroupId,
    135                        GroupName = client.GroupName,
     136                       GroupId = client.ParentResourceId,
     137                       GroupName = parent != null ? parent.Name : null,
    136138                       IsAllowedToCalculate = clientInfo.IsAllowedToCalculate
    137139                     });
     
    200202      var factClientInfoDao = pm.FactClientInfoDao;
    201203      return pm.UseTransaction(() => {
    202         var clients = expired ? dimClientDao.GetExpiredClients() : dimClientDao.GetActiveClients();
    203         clients = clients.Where(x => x.ResourceGroupId == id);
     204        var clients = expired ? dimClientDao.GetAllExpiredClients() : dimClientDao.GetAllOnlineClients();
     205        clients = clients.Where(x => x.ParentResourceId == id);
    204206        var query = (from client in clients
    205207                     join info in factClientInfoDao.GetAll()
     
    207209                     from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
    208210                     let offline = (expired || clientInfo.SlaveState == SlaveState.Offline)
     211                     let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
    209212                     select new DT.Client {
    210213                       Id = client.Id,
     
    216219                       CpuUtilization = offline ? 0 : clientInfo.CpuUtilization,
    217220                       State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
    218                        GroupId = client.ResourceGroupId,
    219                        GroupName = client.GroupName,
     221                       GroupId = client.ParentResourceId,
     222                       GroupName = parent != null ? parent.Name : null,
    220223                       IsAllowedToCalculate = clientInfo.IsAllowedToCalculate
    221224                     });
     
    247250          client => client.Id,
    248251          (fact, client) => new {
    249             client.ResourceGroupId,
     252            client.ParentResourceId,
    250253            fact.Time,
    251254            fact.CpuUtilization,
     
    255258            fact.UsedMemory
    256259          })
    257         .Where(x => x.ResourceGroupId == id)
     260        .Where(x => x.ParentResourceId == id)
    258261        .ToList();
    259262      var clientStatus = new DT.ClientStatus {
  • branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/GroupController.cs

    r14185 r15671  
    4242        var clientTimeData = factClientInfoDao.GetAll()
    4343          .Join(dimClientDao.GetAll(), x => x.ClientId, y => y.Id, (x, y) => new {
    44             y.ResourceGroupId,
     44            y.ParentResourceId,
    4545            x.IdleTime,
    4646            x.OfflineTime,
    4747            x.UnavailableTime
    4848          })
    49           .Where(x => x.ResourceGroupId == id)
    50           .GroupBy(x => x.ResourceGroupId)
     49          .Where(x => x.ParentResourceId == id)
     50          .GroupBy(x => x.ParentResourceId)
    5151          .Select(x => new {
    5252            TotalIdleTime = x.Sum(y => y.IdleTime),
     
    6868          })
    6969          .FirstOrDefault();
    70         return (from client in dimClientDao.GetActiveClients().Where(x => x.ResourceGroupId == id)
     70        return (from client in dimClientDao.GetAllOnlineSlaves().Where(x => x.ParentResourceId == id)
    7171                join info in factClientInfoDao.GetAll()
    7272                  on client.Id equals info.ClientId into clientInfoJoin
    7373                from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
    7474                let offline = (clientInfo.SlaveState == DA.SlaveState.Offline)
     75                let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
    7576                select new {
    76                   ResourceGroupId = client.ResourceGroupId,
    77                   GroupName = client.GroupName,
     77                  ResourceGroupId = client.ParentResourceId,
     78                  GroupName = parent != null ? parent.Name : null,
    7879                  TotalCores = clientInfo.NumTotalCores,
    7980                  UsedCores = offline ? 0 : clientInfo.NumUsedCores,
     
    114115      var dimClientDao = pm.DimClientDao;
    115116      var factClientInfoDao = pm.FactClientInfoDao;
    116       var data = (from client in dimClientDao.GetActiveClients()
     117      var data = (from client in dimClientDao.GetAllOnlineSlaves()
    117118                  join info in factClientInfoDao.GetAll()
    118119                    on client.Id equals info.ClientId into clientInfoJoin
     
    120121                  let offline = (clientInfo.SlaveState == DA.SlaveState.Offline)
    121122                  select new {
    122                     ResourceGroupId = client.ResourceGroupId,
     123                    ResourceGroupId = client.ParentResourceId,
    123124                    TotalCores = clientInfo.NumTotalCores,
    124125                    UsedCores = offline ? 0 : clientInfo.NumUsedCores,
     
    137138                    CpuUtilization = x.Where(y => y.SlaveState != DA.SlaveState.Offline).Average(y => (double?)y.CpuUtilization) ?? 0.0
    138139                  });
    139       var query = dimClientDao.GetAll()
    140         .GroupBy(x => new { x.ResourceGroupId, x.GroupName })
    141         .Select(x => new {
    142           Id = x.Key.ResourceGroupId ?? default(Guid),
    143           Name = x.Key.GroupName
    144         });
     140
     141      var query = dimClientDao.GetAllOnlineSlaveGroups().Select(x => new {
     142        Id = x.ResourceId,
     143        Name = x.Name
     144      });
    145145      return pm.UseTransaction(() => new DT.GroupPage {
    146146        TotalGroups = query.Count(),
Note: See TracChangeset for help on using the changeset viewer.