Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 11259)
@@ -288,4 +288,5 @@
       <Column Name="TotalTimeOffline" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
       <Column Name="TotalTimeUnavailable" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
+      <Column Name="SlaveState" Type="global::HeuristicLab.Services.Hive.DataAccess.SlaveState" DbType="VarChar(15)" CanBeNull="false" />
       <Association Name="DimClient_FactClientInfo" Member="DimClient" ThisKey="ClientId" OtherKey="Id" Type="DimClient" IsForeignKey="true" />
       <Association Name="DimTime_FactClientInfo" Member="DimTime" ThisKey="Time" OtherKey="Time" Type="DimTime" IsForeignKey="true" />
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 11259)
@@ -200,5 +200,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(6.5 : 1.69314697265625); (6.125 : 1.69314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(6.5 : 1.69314697265625); (6.125 : 1.69314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Task/Task_TaskData" />
       <nodes>
@@ -207,5 +207,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Task/Task_StateLog" />
       <nodes>
@@ -277,8 +277,8 @@
       </nestedChildShapes>
     </classShape>
-    <classShape Id="053a5cff-b18a-4ee5-8d43-48ed5c5dcfad" absoluteBounds="2.625, 11, 2, 3.3093082682291666">
+    <classShape Id="053a5cff-b18a-4ee5-8d43-48ed5c5dcfad" absoluteBounds="2.625, 11, 2, 3.5016097005208326">
       <DataClassMoniker Name="/HiveDataContext/FactClientInfo" />
       <nestedChildShapes>
-        <elementListCompartment Id="0a1cc913-6636-455c-95b3-302f533527db" absoluteBounds="2.6399999999999997, 11.46, 1.9700000000000002, 2.7493082682291665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+        <elementListCompartment Id="0a1cc913-6636-455c-95b3-302f533527db" absoluteBounds="2.6399999999999997, 11.46, 1.9700000000000002, 2.941609700520833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
       </nestedChildShapes>
     </classShape>
@@ -290,5 +290,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(8.5 : 10.7035953776042); (8.5 : 11.25)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(8.5 : 10.7035953776042); (8.5 : 11.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/DimJob/DimJob_FactTask" />
       <nodes>
@@ -297,5 +297,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(5.02343625 : 10.2708968098958); (5.02343625 : 14.6266072005208); (5.90885291666667 : 14.6266072005208 : JumpStart); (6.07551958333333 : 14.6266072005208 : JumpEnd); (6.875 : 14.6266072005208)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(5.02343625 : 10.2708968098958); (5.02343625 : 14.7227579166667); (6.875 : 14.7227579166667)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/DimTime/DimTime_FactTask" />
       <nodes>
@@ -311,5 +311,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(5.99218625 : 15.25); (5.99218625 : 12.1788329785157); (5.50521083333333 : 12.1788329785157 : JumpStart); (5.33854416666667 : 12.1788329785157 : JumpEnd); (5.10676958333333 : 12.1788329785157 : JumpStart); (4.94010291666667 : 12.1788329785157 : JumpEnd); (4.625 : 12.1788329785157)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(5.99218625 : 15.25); (5.99218625 : 12.1788329785157); (5.50521083333333 : 12.1788329785157 : JumpStart); (5.33854416666667 : 12.1788329785157 : JumpEnd); (5.10676958333333 : 12.1788329785157 : JumpStart); (4.94010291666667 : 12.1788329785157 : JumpEnd); (4.625 : 12.1788329785157)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactClientInfo" />
       <nodes>
@@ -318,5 +318,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(4.125 : 10.2708968098958); (4.125 : 11)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(4.125 : 10.2708968098958); (4.125 : 11)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/DimTime/DimTime_FactClientInfo" />
       <nodes>
@@ -325,5 +325,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(1.59375 : 10.0689925130208); (1.59375 : 12.6546541341146); (2.625 : 12.6546541341146)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(1.59375 : 10.0689925130208); (1.59375 : 12.7508048502604); (2.625 : 12.7508048502604)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/DimUser/DimUser_FactClientInfo" />
       <nodes>
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 11259)
@@ -5951,4 +5951,6 @@
 		private double _TotalTimeUnavailable;
 		
+		private global::HeuristicLab.Services.Hive.DataAccess.SlaveState _SlaveState;
+		
 		private EntityRef<DimClient> _DimClient;
 		
@@ -5987,4 +5989,6 @@
     partial void OnTotalTimeUnavailableChanging(double value);
     partial void OnTotalTimeUnavailableChanged();
+    partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.DataAccess.SlaveState value);
+    partial void OnSlaveStateChanged();
     #endregion
 		
@@ -6269,4 +6273,24 @@
 		}
 		
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveState", DbType="VarChar(15)", CanBeNull=false)]
+		public global::HeuristicLab.Services.Hive.DataAccess.SlaveState SlaveState
+		{
+			get
+			{
+				return this._SlaveState;
+			}
+			set
+			{
+				if ((this._SlaveState != value))
+				{
+					this.OnSlaveStateChanging(value);
+					this.SendPropertyChanging();
+					this._SlaveState = value;
+					this.SendPropertyChanged("SlaveState");
+					this.OnSlaveStateChanged();
+				}
+			}
+		}
+		
 		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactClientInfo", Storage="_DimClient", ThisKey="ClientId", OtherKey="Id", IsForeignKey=true)]
 		public DimClient DimClient
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql	(revision 11259)
@@ -239,4 +239,5 @@
     [TotalMemory]           INT              NOT NULL,
     [CpuUtilization]        FLOAT (53)       NOT NULL,
+	[SlaveState]			VarChar(15) 	 NOT NULL,
     [TotalTimeIdle]         FLOAT (53)       NOT NULL,
     [TotalTimeCalculating]  FLOAT (53)       NOT NULL,
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml	(revision 11259)
@@ -448,5 +448,5 @@
 }
 
-@helper CreateStreamChart(string dataName, string destinationTag, string url, string title, string format = null, double? maxY = null)
+@helper CreateStreamChart(string dataName, string destinationTag, string url, string title, string slaveState, string format = null, double? maxY = null)
 {
   <text>
@@ -459,5 +459,5 @@
   //Get the most recent value(s) from the given URL
   $.ajax({ 
-    async: false, url: '@(url)', datatype: "json", success: function (result) {
+    async: false, url: "@(url)?state=" + @(slaveState), datatype: "json", success: function (result) {
       for(i = 0; i < result.length; i++) {
         @(dataName)CurrentValue[i] = result[i];
@@ -531,5 +531,5 @@
 }
 
-@helper UpdateStreamChart(string dataName, string destinationTag, string url, string fixedY = null)
+@helper UpdateStreamChart(string dataName, string destinationTag, string url, string slaveState, string fixedY = null)
 {
   <text>
@@ -543,5 +543,5 @@
   //Get the up-to-date data, each result assigned to it's own array
   $.ajax({
-    async: false, url: '@(url)', datatype: "json", success: function (result) {
+    async: false, url: "@(url)?state=" + @(slaveState), datatype: "json", success: function (result) {
       for(i = 0; i < result.length; i++) {
         window[ "@(dataName)Data" + i].push([(new Date()).getTime(), result[i]]);
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css	(revision 11259)
@@ -560,4 +560,14 @@
 }
 
+label.slaveStateFilter {
+  margin-left: 2%;
+  display: inline;
+}
+
+select.slaveStateFilter {
+  margin-top: 2%;
+  display: inline;
+}
+
 /* User Page Styles*/
 #TasksContainer div[id^="Task"] {
@@ -579,5 +589,5 @@
 }
 
-.chartContainer > label:first-of-type, .moreTaskInfo {
+.chartContainer > label:first-of-type:not(.slaveStateFilter), .moreTaskInfo {
   margin-bottom: 1%;
   display: block;
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs	(revision 11259)
@@ -92,5 +92,5 @@
     }
 
-    public JsonResult CurrentCpuUtilization()
+    public JsonResult CurrentCpuUtilization(string state)
     {
       using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
@@ -102,5 +102,9 @@
                                on clients.ResourceId equals resource.ResourceId
                              where clients.ExpirationTime == null &&
-                             (resource.SlaveState == SlaveState.Calculating || resource.SlaveState == SlaveState.Idle)
+                             (state == "All") ||
+                             (state == "Online") &&
+                             (client.SlaveState == SlaveState.Idle || client.SlaveState == SlaveState.Calculating ) ||
+                             (state == "Available") &&
+                             (client.SlaveState == SlaveState.Idle)
                              select new { client.ClientId, client.CpuUtilization, client.Time })
                              .OrderBy(c => c.Time).GroupBy(c => c.ClientId).ToList();
@@ -113,5 +117,5 @@
     }
 
-    public JsonResult CurrentCores()
+    public JsonResult CurrentCores(string state)
     {
       using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
@@ -123,5 +127,9 @@
                              on clients.ResourceId equals resource.ResourceId
                             where clients.ExpirationTime == null &&
-                            (resource.SlaveState == SlaveState.Calculating || resource.SlaveState == SlaveState.Idle)
+                            (state == "All") ||
+                            (state == "Online") &&
+                            (client.SlaveState == SlaveState.Idle || client.SlaveState == SlaveState.Calculating) ||
+                            (state == "Available") &&
+                            (client.SlaveState == SlaveState.Idle)
                             select new { client.ClientId, client.NumTotalCores, client.NumUsedCores, client.Time })
                             .OrderBy(c => c.Time).GroupBy(c => c.ClientId).ToList();
@@ -135,5 +143,5 @@
     }
 
-    public JsonResult CurrentMemory()
+    public JsonResult CurrentMemory(string state)
     {
       using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
@@ -145,5 +153,9 @@
                               on clients.ResourceId equals resource.ResourceId
                             where clients.ExpirationTime == null &&
-                            (resource.SlaveState == SlaveState.Calculating || resource.SlaveState == SlaveState.Idle)
+                            (state == "All") ||
+                            (state == "Online") &&
+                            (client.SlaveState == SlaveState.Idle || client.SlaveState == SlaveState.Calculating) ||
+                            (state == "Available") &&
+                            (client.SlaveState == SlaveState.Idle)
                             select new { client.ClientId, client.TotalMemory, client.UsedMemory, client.Time })
                             .OrderBy(c => c.Time).GroupBy(c => c.ClientId).ToList();
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Scripts/CollapsingSection.js
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Scripts/CollapsingSection.js	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Scripts/CollapsingSection.js	(revision 11259)
@@ -3,9 +3,9 @@
 $(".collapse").click(function () {
   if ($(this).html() == "-") {
-    $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeOut();
+    $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeOut();
     $(this).html("+");
   }
   else {
-    $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn();
+    $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
     $(this).html("-");
   }
@@ -18,9 +18,9 @@
   var jqCaller = $(caller);
   if (jqCaller.html() == "-") {
-    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeOut();
+    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeOut();
     jqCaller.html("+");
   }
   else {
-    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn();
+    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
     jqCaller.html("-");
   }
@@ -30,5 +30,5 @@
   section */
 function CollapsedByDefault(caller) {
-  $(caller).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").hide();
+  $(caller).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").hide();
 }
 
@@ -36,5 +36,5 @@
 function OpenOnError(caller) {
   var jqCaller = $(caller);
-  jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn();
+  jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
   jqCaller.parent().children("button").html("-");
 }
@@ -45,9 +45,9 @@
   var jqCaller = $(caller);
   if (jqCaller.html() == "-") {
-    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table").hide();
+    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table, select").hide();
     jqCaller.html("+");
   }
   else {
-    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table").show();
+    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table, select").show();
     jqCaller.html("-");
   }
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml	(revision 11259)
@@ -31,4 +31,10 @@
   <h1 class="title">Current Hive Status</h1>
   <button class="collapse">-</button>
+  <label class="slaveStateFilter">Slave State:</label>
+  <select id="SlaveState" class="slaveStateFilter">
+    <option>All</option>
+    <option selected="selected">Online</option>
+    <option>Available</option>
+  </select>
   <div id="CurrentCPUUtilization"></div>
   <div id="CurrentTotalUsedCores"></div>
@@ -104,4 +110,6 @@
         RefreshCharts();
       });
+
+      
     });
 
@@ -116,4 +124,11 @@
 
     $(document).ready(function () {
+      var slaveState;
+      slaveState = $("#SlaveState").val();
+
+      $("#SlaveState").change(function () {
+        slaveState = $(this).val();
+      });
+
       @ChartHelper.UserTasks(Url.Action("UserTasks", "ChartData"), "section.currentStats", "Calculating");
       @ChartHelper.UserTasks(Url.Action("UserTasks", "ChartData"), "section.currentStats", "Waiting");
@@ -121,12 +136,12 @@
       @ChartHelper.SetStreamingProperties(1000,20,5)
 
-      @ChartHelper.CreateStreamChart("CurrentCPU", "CurrentCPUUtilization",Url.Action("CurrentCpuUtilization","ChartData"),"Current CPU Utilization","%.2f%%",100.00)
-      @ChartHelper.CreateStreamChart("CurrentCores", "CurrentTotalUsedCores",Url.Action("CurrentCores","ChartData"),"Current Total vs. Used Cores")
-      @ChartHelper.CreateStreamChart("CurrentMemory", "CurrentTotalUsedMemory",Url.Action("CurrentMemory","ChartData"),"Current Total vs. Used Memory")
+      @ChartHelper.CreateStreamChart("CurrentCPU", "CurrentCPUUtilization",Url.Action("CurrentCpuUtilization","ChartData"),"Current CPU Utilization","slaveState","%.2f%%",100.00)
+      @ChartHelper.CreateStreamChart("CurrentCores", "CurrentTotalUsedCores",Url.Action("CurrentCores","ChartData"),"Current Total vs. Used Cores","slaveState")
+      @ChartHelper.CreateStreamChart("CurrentMemory", "CurrentTotalUsedMemory",Url.Action("CurrentMemory","ChartData"),"Current Total vs. Used Memory","slaveState")
 
       function DoUpdate() {
-        @ChartHelper.UpdateStreamChart("CurrentCPU","CurrentCPUUtilization", Url.Action("CurrentCpuUtilization","ChartData"),"FixedY")
-        @ChartHelper.UpdateStreamChart("CurrentCores","CurrentTotalUsedCores", Url.Action("CurrentCores","ChartData"))
-        @ChartHelper.UpdateStreamChart("CurrentMemory","CurrentTotalUsedMemory", Url.Action("CurrentMemory","ChartData"))
+        @ChartHelper.UpdateStreamChart("CurrentCPU","CurrentCPUUtilization", Url.Action("CurrentCpuUtilization","ChartData"),"slaveState","FixedY")
+        @ChartHelper.UpdateStreamChart("CurrentCores","CurrentTotalUsedCores", Url.Action("CurrentCores","ChartData"),"slaveState")
+        @ChartHelper.UpdateStreamChart("CurrentMemory","CurrentTotalUsedMemory", Url.Action("CurrentMemory","ChartData"),"slaveState")
         setTimeout(DoUpdate, refreshRate);
       }
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs	(revision 11258)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs	(revision 11259)
@@ -200,4 +200,5 @@
           TotalMemory = s.Slave.Memory ?? 0,
           CpuUtilization = s.Slave.CpuUtilization,
+          SlaveState = s.Slave.SlaveState,
           TotalTimeIdle = s.Slave.SlaveState == SlaveState.Idle && s.Slave.IsAllowedToCalculate
                                   ? duration : 0.0,
