Index: stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataController.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataController.cs	(revision 12428)
+++ stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataController.cs	(revision 12563)
@@ -1,4 +1,26 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
 using System.Collections.Generic;
+using System.Data.Linq;
 using System.Linq;
 using System.Web.Http;
@@ -25,5 +47,4 @@
         FROM UserTasks ut;";
 
-
     private class UserTaskStatus {
       public Guid UserId { get; set; }
@@ -41,5 +62,5 @@
         CalculatingTasks = uts.CalculatingTasks,
         WaitingTasks = uts.WaitingTasks
-      });
+      }).OrderBy(x => x.User.Name);
     }
     // end temporary quickfix
@@ -50,9 +71,15 @@
                             where slave.SlaveState == SlaveState.Calculating || slave.SlaveState == SlaveState.Idle
                             select slave).ToList();
+        var activeSlaves = onlineSlaves.Where(s => s.IsAllowedToCalculate).ToList();
+        var calculatingSlaves = activeSlaves.Where(s => s.SlaveState == SlaveState.Calculating).ToList();
+        int calculatingMemory = calculatingSlaves.Any() ? (int)calculatingSlaves.Sum(s => s.Memory) : 0;
+        int freeCalculatingMemory = calculatingSlaves.Any() ? (int)calculatingSlaves.Sum(s => s.FreeMemory) : 0;
+
         return new DTO.Status {
           CoreStatus = new DTO.CoreStatus {
             TotalCores = onlineSlaves.Sum(s => s.Cores ?? 0),
-            AvailableCores = onlineSlaves.Where(s => s.IsAllowedToCalculate).Sum(s => s.Cores ?? 0),
-            FreeCores = onlineSlaves.Sum(s => s.FreeCores ?? 0)
+            FreeCores = onlineSlaves.Sum(s => s.FreeCores ?? 0), // temporary for old chart data
+            ActiveCores = activeSlaves.Sum(s => s.Cores ?? 0),
+            CalculatingCores = calculatingSlaves.Sum(s => s.Cores ?? 0) - calculatingSlaves.Sum(s => s.FreeCores ?? 0)
           },
           CpuUtilizationStatus = new DTO.CpuUtilizationStatus {
@@ -60,20 +87,31 @@
                                   ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2)
                                   : 0.0,
-            UsedCpuUtilization = onlineSlaves.Any(x => x.IsAllowedToCalculate)
-                                 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2)
-                                 : 0.0
+            ActiveCpuUtilization = activeSlaves.Any()
+                                   ? Math.Round(activeSlaves.Average(s => s.CpuUtilization), 2)
+                                   : 0.0,
+            CalculatingCpuUtilization = calculatingSlaves.Any()
+                                        ? Math.Round(calculatingSlaves.Average(s => s.CpuUtilization), 2)
+                                        : 0.0
           },
           MemoryStatus = new DTO.MemoryStatus {
-            TotalMemory = onlineSlaves.Any() ? (int)onlineSlaves.Sum(s => s.Memory) / 1024 : 0,
-            FreeMemory = onlineSlaves.Any() ? (int)onlineSlaves.Sum(s => s.FreeMemory) / 1024 : 0
+            TotalMemory = onlineSlaves.Any() ? (int)onlineSlaves.Sum(s => s.Memory) : 0,
+            FreeMemory = onlineSlaves.Any() ? (int)onlineSlaves.Sum(s => s.FreeMemory) : 0,
+            ActiveMemory = activeSlaves.Any() ? (int)activeSlaves.Sum(s => s.Memory) : 0,
+            UsedMemory = calculatingMemory - freeCalculatingMemory
           },
           TasksStatus = GetTaskStatus(db),
-          SlavesCpuStatus = onlineSlaves.Select(x => new DTO.SlaveCpuStatus {
-            CpuUtilization = Math.Round(x.CpuUtilization, 2),
+          SlavesStatus = onlineSlaves.Select(x => new DTO.SlaveStatus {
             Slave = new DTO.Slave {
               Id = x.ResourceId.ToString(),
               Name = x.Name
-            }
-          }),
+            },
+            CpuUtilization = x.CpuUtilization,
+            Cores = x.Cores ?? 0,
+            FreeCores = x.FreeCores ?? 0,
+            Memory = x.Memory ?? 0,
+            FreeMemory = x.FreeMemory ?? 0,
+            IsAllowedToCalculate = x.IsAllowedToCalculate,
+            State = x.SlaveState.ToString()
+          }).OrderBy(x => x.Slave.Name),
           Timestamp = JavascriptUtils.ToTimestamp(DateTime.Now)
         };
@@ -82,25 +120,60 @@
 
     public IEnumerable<DTO.Status> GetStatusHistory(DateTime start, DateTime end) {
+      TimeSpan ts = end - start;
+      int increment = 1;
+      double totalMinutes = ts.TotalMinutes;
+      while (totalMinutes > 5761) {
+        totalMinutes -= 5761;
+        increment += 5;
+      }
       using (var db = new HiveDataContext()) {
+        DataLoadOptions loadOptions = new DataLoadOptions();
+        loadOptions.LoadWith<Statistics>(o => o.SlaveStatistics);
+        db.LoadOptions = loadOptions;
+        db.DeferredLoadingEnabled = false;
         var statistics = db.Statistics.Where(s => s.Timestamp >= start && s.Timestamp <= end)
-                                      .OrderBy(x => x.Timestamp)
+                                      .OrderBy(s => s.Timestamp)
                                       .ToList();
+        var status = new DTO.Status {
+          CoreStatus = new DTO.CoreStatus(),
+          CpuUtilizationStatus = new DTO.CpuUtilizationStatus(),
+          MemoryStatus = new DTO.MemoryStatus()
+        };
+        int freeCores = 0;
+        int freeMemory = 0;
+        int i = 1;
         foreach (var statistic in statistics) {
-          yield return new DTO.Status {
-            CoreStatus = new DTO.CoreStatus {
-              TotalCores = statistic.SlaveStatistics.Sum(x => x.Cores),
-              AvailableCores = 0,
-              FreeCores = statistic.SlaveStatistics.Sum(x => x.FreeCores)
-            },
-            CpuUtilizationStatus = new DTO.CpuUtilizationStatus {
-              TotalCpuUtilization = 0.0,
-              UsedCpuUtilization = statistic.SlaveStatistics.Any() ? statistic.SlaveStatistics.Average(x => x.CpuUtilization) : 0.0
-            },
-            MemoryStatus = new DTO.MemoryStatus {
-              TotalMemory = statistic.SlaveStatistics.Sum(x => x.Memory) / 1024,
-              FreeMemory = statistic.SlaveStatistics.Sum(x => x.FreeMemory) / 1024
-            },
-            Timestamp = JavascriptUtils.ToTimestamp(statistic.Timestamp)
-          };
+          status.CoreStatus.TotalCores += statistic.SlaveStatistics.Sum(x => x.Cores);
+          freeCores += statistic.SlaveStatistics.Sum(x => x.FreeCores);
+          status.CpuUtilizationStatus.TotalCpuUtilization += statistic.SlaveStatistics.Any()
+                                                             ? statistic.SlaveStatistics.Average(x => x.CpuUtilization)
+                                                             : 0.0;
+          status.MemoryStatus.TotalMemory += statistic.SlaveStatistics.Sum(x => x.Memory);
+          freeMemory += statistic.SlaveStatistics.Sum(x => x.FreeMemory);
+          if (i >= increment) {
+            status.Timestamp = JavascriptUtils.ToTimestamp(statistic.Timestamp);
+            status.CoreStatus.TotalCores /= i;
+            freeCores /= i;
+            status.CpuUtilizationStatus.TotalCpuUtilization /= i;
+            status.MemoryStatus.TotalMemory /= i;
+            freeMemory /= i;
+            status.CoreStatus.ActiveCores = status.CoreStatus.TotalCores;
+            status.MemoryStatus.ActiveMemory = status.MemoryStatus.TotalMemory;
+            status.CpuUtilizationStatus.ActiveCpuUtilization = status.CpuUtilizationStatus.TotalCpuUtilization;
+            status.CpuUtilizationStatus.CalculatingCpuUtilization = status.CpuUtilizationStatus.CalculatingCpuUtilization;
+            status.CoreStatus.CalculatingCores = status.CoreStatus.TotalCores - freeCores;
+            status.MemoryStatus.UsedMemory = status.MemoryStatus.TotalMemory - freeMemory;
+            yield return status;
+            status = new DTO.Status {
+              CoreStatus = new DTO.CoreStatus(),
+              CpuUtilizationStatus = new DTO.CpuUtilizationStatus(),
+              MemoryStatus = new DTO.MemoryStatus()
+            };
+            freeCores = 0;
+            freeMemory = 0;
+            i = 1;
+          } else {
+            i++;
+          }
         }
       }
Index: stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/Slave.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/Slave.cs	(revision 12428)
+++ stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/Slave.cs	(revision 12563)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.Services.WebApp.Status.WebApi.DataTransfer {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Services.WebApp.Status.WebApi.DataTransfer {
   public class Slave {
     public string Id { get; set; } // currently unused
Index: stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/Status.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/Status.cs	(revision 12428)
+++ stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/Status.cs	(revision 12563)
@@ -1,3 +1,24 @@
-﻿using System.Collections.Generic;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
 
 namespace HeuristicLab.Services.WebApp.Status.WebApi.DataTransfer {
@@ -5,16 +26,20 @@
   public class CoreStatus {
     public int TotalCores { get; set; }
-    public int AvailableCores { get; set; }
-    public int FreeCores { get; set; }
+    public int FreeCores { get; set; } // temporary quickfix for old chart data
+    public int ActiveCores { get; set; }
+    public int CalculatingCores { get; set; }
   }
 
   public class CpuUtilizationStatus {
     public double TotalCpuUtilization { get; set; }
-    public double UsedCpuUtilization { get; set; }
+    public double ActiveCpuUtilization { get; set; }
+    public double CalculatingCpuUtilization { get; set; }
   }
 
   public class MemoryStatus {
     public int TotalMemory { get; set; }
-    public int FreeMemory { get; set; }
+    public int FreeMemory { get; set; } // temporary quickfix for old chart data
+    public int ActiveMemory { get; set; }
+    public int UsedMemory { get; set; }
   }
 
@@ -25,7 +50,13 @@
   }
 
-  public class SlaveCpuStatus {
+  public class SlaveStatus {
     public Slave Slave { get; set; }
     public double CpuUtilization { get; set; }
+    public int Cores { get; set; }
+    public int FreeCores { get; set; }
+    public int Memory { get; set; }
+    public int FreeMemory { get; set; }
+    public bool IsAllowedToCalculate { get; set; }
+    public string State { get; set; }
   }
 
@@ -35,5 +66,5 @@
     public MemoryStatus MemoryStatus { get; set; }
     public IEnumerable<TaskStatus> TasksStatus { get; set; }
-    public IEnumerable<SlaveCpuStatus> SlavesCpuStatus { get; set; }
+    public IEnumerable<SlaveStatus> SlavesStatus { get; set; }
     public long Timestamp { get; set; }
   }
Index: stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/User.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/User.cs	(revision 12428)
+++ stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataTransfer/User.cs	(revision 12563)
@@ -1,3 +1,23 @@
-﻿
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
 namespace HeuristicLab.Services.WebApp.Status.WebApi.DataTransfer {
   public class User {
Index: stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/JavascriptUtils.cs
===================================================================
--- trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/JavascriptUtils.cs	(revision 12428)
+++ stable/HeuristicLab.Services.WebApp.Status/3.3/WebApi/JavascriptUtils.cs	(revision 12563)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
 
 namespace HeuristicLab.Services.WebApp.Status.WebApi {
@@ -6,5 +27,5 @@
       var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
       var time = input.Subtract(new TimeSpan(epoch.Ticks));
-      return (long)(time.Ticks / 10000);
+      return time.Ticks / 10000;
     }
   }
