Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/11/12 16:27:46 (11 years ago)
Author:
ascheibe
Message:

#1994 added displaying statistics for groups

Location:
trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3/Status.aspx

    r9023 r9025  
    3737    <asp:Label ID="slavesLabel" runat="server" />
    3838      <br />
     39      Groups:
     40    <asp:Label ID="groupsLabel" runat="server" />
     41      <br />
    3942      <br />
    4043      Number of Calculating Tasks by User:<asp:Table ID="calculatingTasksByUserTable" runat="server" GridLines="Both">
     
    7477    <br />
    7578    Avg. CPU Utilization History of all Slaves<br />
    76     <asp:Chart ID="cpuUtilizationChart" runat="server" Height="270px" Width="1900px">
     79    <asp:Chart ID="cpuUtilizationChart" runat="server" Height="270px" Width="1280px">
    7780      <Series>
    7881        <asp:Series BorderWidth="2" ChartType="Line" Color="0, 176, 80" Name="Series1" XValueType="DateTime"
     
    9699    <br />
    97100    Cores/Used Cores History<br />
    98     <asp:Chart ID="coresChart" runat="server" Palette="None" Width="1900px" PaletteCustomColors="137, 165, 78; 185, 205, 150">
     101    <asp:Chart ID="coresChart" runat="server" Palette="None" Width="1280px" PaletteCustomColors="137, 165, 78; 185, 205, 150">
    99102      <Series>
    100103        <asp:Series ChartType="Area" Name="Cores" XValueType="DateTime" YValueType="Double">
     
    121124    Memory/Used Memory History (GB)<br />
    122125    <asp:Chart ID="memoryChart" runat="server" Palette="None" PaletteCustomColors="170, 70, 67; 209, 147, 146"
    123       Width="1900px">
     126      Width="1280px">
    124127      <Series>
    125128        <asp:Series ChartType="Area" Name="Cores" XValueType="DateTime" YValueType="Double">
  • trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3/Status.aspx.cs

    r9023 r9025  
    4444    Dictionary<Guid, int> calculatingTasksByUser = new Dictionary<Guid,int>();
    4545    Dictionary<Guid, int> waitingTasksByUser = new Dictionary<Guid, int>();
     46    List<DT.Resource> groups = new List<DT.Resource>();
     47
     48    transactionManager.UseTransaction(() => {
     49       groups = dao.GetResources(x => x.ResourceType == "GROUP").ToList();
     50    }, false, false);   
    4651
    4752    if (!string.IsNullOrEmpty(resourceName)) {
     
    7681
    7782    slavesLabel.Text = string.Join(", ", onlineSlaves.Select(x => string.Format("<a href=\"?resource={0}\">{0}</a> ({1} %)", x.Name, Math.Round(x.CpuUtilization, 2))));
     83    groupsLabel.Text = string.Join(", ", groups.Select(x => string.Format("<a href=\"?resource={0}\">{0}</a>", x.Name)));
    7884
    7985    overallCpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
    80     cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
     86    cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 && onlineSlaves.Where(x => x.IsAllowedToCalculate).Count() > 0 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
    8187
    8288    DT.Statistics[] stats = new DT.Statistics[0];   
Note: See TracChangeset for help on using the changeset viewer.