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 11083)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml	(revision 11084)
@@ -102,4 +102,49 @@
 }
 
+@helper ResizeCharts()
+{
+  <text>
+  function resizeCharts(caller) {
+    //If current plot is collapsed
+    if($(caller).css("display") == "none") {
+      //Display the contents of chartContainer
+      ResizeOpenClose($(caller).siblings(".collapse"));
+      //Reset barWidth for bar charts
+      $.each(window[caller.id].series, function(index, series) { 
+        series.barWidth = undefined; 
+      });
+      //Replot the chart with same name as element id
+      window[caller.id].replot({ resetAxes: false });
+      //Hide the contents of the current div
+      ResizeOpenClose($(caller).siblings(".collapse"));
+    }
+    //Current plot is expanded
+    else {
+      //Reset barWidth for bar charts
+      $.each(window[caller.id].series, function(index, series) { 
+        series.barWidth = undefined; 
+      });
+      //Replot the chart with same name as element id
+      window[caller.id].replot({ resetAxes: false });
+    }
+  }
+
+  $(window).resize(function() {
+    $("div.jqplot-target",".chartContainer").each(function() {
+      var potentialTab = $(this).parent().parent().parent();
+      //If the section is tabular and currently hidden
+      if(potentialTab.hasClass("tabSection") && potentialTab.css("display") == "none") {
+        ResizeOpenCloseTabular(potentialTab);
+        resizeCharts(this);
+        ResizeOpenCloseTabular(potentialTab);
+      }
+      else {
+        resizeCharts(this);
+      }
+    });
+  });
+  </text>
+}
+
 @helper NumberPages(string records, string limit, string container, string functionName, string currentPage = null)
 {
@@ -134,24 +179,28 @@
 }
 
-@helper TasksForUser(string container, string destinationTag, string url, string functionName, string userName, string limit, string startDate = null, string endDate = null, string jobId=null, string taskState=null, string pageNumber=null)
-{
-  <text>
-    var GetRequest = "?userName=" + @(userName) + "&limit=" + @(limit);
-    @if(startDate!=null) {
+@helper TasksForUser(string destinationTag, string url, string functionName, string userName, string limit, string startDate = null, string endDate = null, string jobId = null, string taskState = null, string pageNumber = null)
+{
+  <text>
+    var GetRequest = "?userName=" + @(userName);
+    @if (startDate != null)
+    {
       @:if(@(startDate)!=null) {
         @:GetRequest += "&start=" + @startDate;
       @:}
     }
-    @if(endDate!=null) {
+    @if (endDate != null)
+    {
       @:if(@(endDate)!=null) {
         @:GetRequest += "&end=" + @endDate;
       @:}
     }
-    @if(jobId!=null) {
+    @if (jobId != null)
+    {
       @:if(@(jobId)!=null) {
         @:GetRequest += "&jobId=" + @jobId;
       @:}
     }
-    @if(taskState!=null) {
+    @if (taskState != null)
+    {
       @:if(@(taskState)!=null) {
         @:GetRequest += "&taskState=" + @taskState;
@@ -161,5 +210,5 @@
       async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) {
       if(@(userName) == null) {
-        $("#@container").append(
+        $("#@(destinationTag)").append(
           '<section class="chartContainer">' + 
             '<h1 class="title">Please select a user!</h1>' + 
@@ -168,5 +217,5 @@
       }
       else if(result.length==0) {
-        $("#@container").append(
+        $("#@(destinationTag)").append(
           '<section class="chartContainer">' + 
             '<h1 class="title">' + @userName + ' has no tasks for the specified filters!</h1>' + 
@@ -182,5 +231,5 @@
         //Checks if multipage display, if it is then trims results to
         //the results for the page to be displayed
-        @ChartHelper.NumberPages("result",limit,container,functionName,pageNumber)
+        @ChartHelper.NumberPages("result", limit, destinationTag, functionName, pageNumber)
 
         //Globally accesible, for use when resizing, eliminates extra DB request
@@ -188,11 +237,11 @@
 
         //Set display of all errors to none, errors matching the tasks will be reset below
-        $("#@(container)").find(".errorContainer, .errorTitle, .errorTask, .errorMessage").css('display','none');
+        $("#@(destinationTag)").find(".errorContainer, .errorTitle, .errorTask, .errorMessage").css('display','none');
 
         //For each result create a seperate collapsable section with a chart and info label
         for(var i = 0; i < result.length; i++){
-          $("#" + "@container").append(
+          $("#" + "@(destinationTag)").append(
             '<section class="chartContainer">' + 
-              '<h1 class="title" id="@(container)' + result[i].Key + '">Task ' + result[i].Key + '</h1>' + 
+              '<h1 class="title" id="@(destinationTag)' + result[i].Key + 'PlotTitle">Task ' + result[i].Key + '</h1>' + 
               '<button class="collapse" onclick="CollapseSection(this)">+</button>' + 
               '<div id="@(destinationTag)Plot' + i + '"></div>' + 
@@ -202,9 +251,9 @@
           //Re-enables the error display if any of the tasks on the page have Ids matching
           //those of errors
-          $(".errorTask","#" + "@(container)").each(function() { 
+          $(".errorTask","#" + "@(destinationTag)").each(function() { 
             if($(this).html()==result[i].Key) {
-              $("#@(container)" + result[i].Key).css("color","red");
-              $("#@(container)" + result[i].Key).append(" - ERROR");
-              $(".errorContainer, .errorTitle, .underline").css('display','inline-block');
+              $("#@(destinationTag)" + result[i].Key + "PlotTitle").css("color","red");
+              $("#@(destinationTag)" + result[i].Key + "PlotTitle").append(" - ERROR");
+              $(".errorContainer, .errorTitle, .underline","#@(destinationTag)").css('display','inline-block');
               $(this).css('display','inline-block');
               $(this).next().css('display','inline-block');
@@ -250,5 +299,5 @@
           });
 
-          CollapsedByDefault(document.getElementById("@(container)" + result[i].Key));
+          CollapsedByDefault(document.getElementById("@(destinationTag)Plot" + i));
         }
       }
@@ -257,29 +306,6 @@
 }
 
-@helper ResizeTasks(string destinationTag)
-{
-  <text>
-  //Resize event, resets bar width for task charts and replots them
-  $(window).resize(function() {
-    if(typeof numberTasks !== 'undefined') {
-      for(var i = 0; i < numberTasks; i++) {
-        $.each(window[ "@(destinationTag)Plot" + i].series, function(index, series) { 
-          series.barWidth = undefined; 
-        });
-        if($("#@(destinationTag)Plot" + i).css("display") == "none") {
-          ResizeOpenClose($("#@(destinationTag)Plot" + i).siblings(".collapse"));
-          window["@(destinationTag)Plot" + i].replot({ resetAxes: true });
-          ResizeOpenClose($("#@(destinationTag)Plot" + i).siblings(".collapse"));
-        }
-        else {
-          window["@(destinationTag)Plot" + i].replot({ resetAxes: true });
-        }
-      }
-    }
-  });
-  </text>
-}
-
-@helper SetStreamingProperties(int refresh, int chartLength, int upperY) {
+@helper SetStreamingProperties(int refresh, int chartLength, int upperY)
+{
   <text>
   //Refresh time (in millisec)
@@ -307,5 +333,6 @@
 }
 
-@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 format = null, double? maxY = null)
+{
   <text>
   //Get current time, used to create initial values
@@ -352,8 +379,10 @@
         </text>}
         min: 0, 
-        @if (maxY != null) {
+        @if (maxY != null)
+        {
           @:max: @maxY,
         }
-        else{
+        else
+        {
           @:max: window["@(dataName)Data" + 0][window["@(dataName)Data" + 0].length - 1][1] + upperYBuffer,
         }
@@ -375,5 +404,6 @@
 }
 
-@helper UpdateStreamChart(string dataName, string destinationTag, string url, string fixedY = null) {
+@helper UpdateStreamChart(string dataName, string destinationTag, string url, string fixedY = null)
+{
   <text>
   //If the data is beyond chartSize use shift to trim one off the end
@@ -406,5 +436,6 @@
   @(destinationTag)PlotOptions.axes.xaxis.min = window["@(dataName)Data" + 0][0][0];
   @(destinationTag)PlotOptions.axes.xaxis.max = window["@(dataName)Data" + 0][window["@(dataName)Data" + 0].length - 1][0];
-  @if (fixedY == null) {
+  @if (fixedY == null)
+  {
     @:@(destinationTag)PlotOptions.axes.yaxis.max = window["@(dataName)Data" + 0][window["@(dataName)Data" + 0].length - 1][1] + upperYBuffer;
   }
@@ -416,25 +447,50 @@
 }
 
-@helper SlaveInfoChart(string destinationTag, string url, string limit, bool singleSlave, string startDate=null, string endDate=null, string userName=null, string functionName=null, string pageNumber=null, string slaveId=null) {
-  <text>
-  var GetRequest = "?limit=" + @(limit);
-  @if(startDate!=null) {
+@helper SlaveInfoChart(string destinationTag, string url, string limit, bool singleSlave, string startDate = null, string endDate = null, string userName = null, string functionName = null, string pageNumber = null, string slaveId = null)
+{
+  <text>
+  var GetRequest = "";
+  @if (startDate != null)
+  {
     @:if(@(startDate)!=null) {
-      @:GetRequest += "&start=" + @startDate;
+      @:if(GetRequest == "") {
+        @:GetRequest += "?start=" + @startDate;
+      @:}
+      @:else {
+        @:GetRequest += "&start=" + @startDate;
+      @:}
     @:}
   }
-  @if(endDate!=null) {
+  @if (endDate != null)
+  {
     @:if(@(endDate)!=null) {
-      @:GetRequest += "&end=" + @endDate;
+      @:if(GetRequest == "") {
+        @:GetRequest += "?end=" + @endDate;
+      @:}
+      @:else {
+        @:GetRequest += "&end=" + @endDate;
+      @:}
     @:}
   }
-  @if (userName != null) {
+  @if (userName != null)
+  {
     @:if(@(userName)!=null) {
-      @:GetRequest += "&userName=" + @userName;
+      @:if(GetRequest == "") {
+        @:GetRequest += "?userName=" + @userName;
+      @:}
+      @:else {
+        @:GetRequest += "&userName=" + @userName;
+      @:}
     @:}
   }
-  @if (slaveId != null) {
+  @if (slaveId != null)
+  {
     @:if(@(slaveId)!=null) {
-      @:GetRequest += "&slaveId=" + @slaveId;
+      @:if(GetRequest == "") {
+        @:GetRequest += "?slaveId=" + @slaveId;
+      @:}
+      @:else {
+        @:GetRequest += "&slaveId=" + @slaveId;
+      @:}
     @:}
   }
@@ -452,4 +508,7 @@
 
     if(result.length == 0) {
+      @if (!singleSlave) {
+        @:$('#' + destTag).html("");
+      }
       $('#' + destTag).append(
         '<section class="chartContainer">' + 
@@ -461,5 +520,6 @@
       var time = new Date();
 
-      @if(!singleSlave) {
+      @if (!singleSlave)
+      {
         @:$('#' + destTag).html("");
 
@@ -468,7 +528,4 @@
         @ChartHelper.NumberPages("result", limit, destinationTag, functionName, pageNumber)
       }
-
-      //Globally accesible, for use when resizing, eliminates extra DB request
-      window["numberSlaves"] = result.length;
 
       for(i = 0; i < result.length; i++) {
@@ -483,9 +540,9 @@
         $('#' + destTag).append(
           '<section class="chartContainer">' + 
-            '<h1 class="title" id="' + result[i][0].SlaveID + '">Slave ' + result[i][0].SlaveID + '</h1>' + 
+            '<h1 class="title" id="' + destTag + result[i][0].SlaveID + 'PlotTitle">Slave ' + result[i][0].SlaveID + '</h1>' + 
             '<button class="collapse" onclick="CollapseSection(this)">+</button>' + 
-            '<div id="' + slaveChartNames[0] + 'Plot' + i + '"></div>' + 
-            '<div id="' + slaveChartNames[1] + 'Plot' + i + '"></div>' + 
-            '<div id="' + slaveChartNames[2] + 'Plot' + i + '"></div>' + 
+            '<div id="' + destTag + slaveChartNames[0] + 'Plot' + i + '"></div>' + 
+            '<div id="' + destTag + slaveChartNames[1] + 'Plot' + i + '"></div>' + 
+            '<div id="' + destTag + slaveChartNames[2] + 'Plot' + i + '"></div>' + 
           '</section>');
         for(j = 0; j < result[i].length; j++) {
@@ -498,15 +555,15 @@
         }
         if(result[i].length > 1) {
-          @ChartHelper.LineChartGivenSeries("slaveChartNames[0]","i","coreSeries","Total/Used Cores")
-          @ChartHelper.LineChartGivenSeries("slaveChartNames[1]","i","memorySeries","Total/Used Memory",0)
-          @ChartHelper.LineChartGivenSeries("slaveChartNames[2]","i","cpuSeries","CPU Utilization",0,100,"%.1f%%")
+          @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[0]", "i", "coreSeries", "Total/Used Cores")
+          @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[1]", "i", "memorySeries", "Total/Used Memory", 0)
+          @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[2]", "i", "cpuSeries", "CPU Utilization", 0, 100, "%.1f%%")
         }
         else {
-          @ChartHelper.BarChartGivenSeries("slaveChartNames[0]","i","coreSeries","Total/Used Cores")
-          @ChartHelper.BarChartGivenSeries("slaveChartNames[1]","i","memorySeries","Total/Used Memory",0)
-          @ChartHelper.BarChartGivenSeries("slaveChartNames[2]","i","cpuSeries","CPU Utilization",0,100,"%.1f%%")
+          @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[0]", "i", "coreSeries", "Total/Used Cores")
+          @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[1]", "i", "memorySeries", "Total/Used Memory", 0)
+          @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[2]", "i", "cpuSeries", "CPU Utilization", 0, 100, "%.1f%%")
         }
         for(k = 0; k < slaveChartNames.length; k++) {
-          CollapsedByDefault(document.getElementById(slaveChartNames[k] + "Plot" + i));
+          CollapsedByDefault(document.getElementById(destTag + slaveChartNames[k] + "Plot" + i));
         }
       }
@@ -516,40 +573,6 @@
 }
 
-@helper ResizeSlaves() {
-  <text>
-  //Resize event, resets bar width for slave charts and replots them
-  $(window).resize(function() {
-    if(typeof numberSlaves !== 'undefined') {
-
-      //Set chart names for use in creation below, must be set identically in
-      //SlaveInfoChart
-      var slaveChartNames = ["TotalUsedCores","TotalUsedMemory","CPUUtilization"];
-
-      for(i = 0; i < numberSlaves; i++) {
-        if($("#" + slaveChartNames[0] + "Plot" + i).css("display") == "none") {
-          ResizeOpenClose($("#" + slaveChartNames[0] + "Plot" + i).siblings(".collapse"));
-          for(j = 0; j < slaveChartNames.length; j++) {
-            $.each(window[slaveChartNames[j] + "Plot" + i].series, function(index, series) { 
-              series.barWidth = undefined; 
-            });
-            window[slaveChartNames[j] + "Plot" + i].replot({ resetAxes: true });
-          }
-          ResizeOpenClose($("#" + slaveChartNames[0] + "Plot" + i).siblings(".collapse"));
-        }
-        else {
-          for(j = 0; j < slaveChartNames.length; j++) {
-            $.each(window[slaveChartNames[j] + "Plot" + i].series, function(index, series) { 
-              series.barWidth = undefined; 
-            });
-            window[slaveChartNames[j] + "Plot" + i].replot({ resetAxes: true });
-          }
-        }
-      }
-    }
-  });
-  </text>
-}
-
-@helper LineChartGivenSeries(string destinationTag, string chartId, string series, string title, double? minY = null, double? maxY = null, string axisYFormat = null) {
+@helper LineChartGivenSeries(string destinationTag, string chartId, string series, string title, double? minY = null, double? maxY = null, string axisYFormat = null)
+{
   <text>
   window[@(destinationTag) + "Plot" + @(chartId)] = $.jqplot(@(destinationTag) + "Plot" + @(chartId), @series, {
@@ -562,5 +585,6 @@
       },
       yaxis: {
-        @if (axisYFormat != null) {
+        @if (axisYFormat != null)
+        {
           <text>
           tickOptions: {
@@ -569,11 +593,13 @@
           </text>
         }
-        @if (minY != null) {
+        pad: 0,
+        @if (minY != null)
+        {
             @:min: @minY,
         }
-        @if (maxY != null) {
+        @if (maxY != null)
+        {
             @:max: @maxY,
         }
-        pad: 0
       }
     },
@@ -591,5 +617,6 @@
 }
 
-@helper BarChartGivenSeries(string destinationTag, string chartId, string series, string title, double? minY = null, double? maxY = null, string axisYFormat = null) {
+@helper BarChartGivenSeries(string destinationTag, string chartId, string series, string title, double? minY = null, double? maxY = null, string axisYFormat = null)
+{
   <text>
   window[@(destinationTag) + "Plot" + @(chartId)] = $.jqplot(@(destinationTag) + "Plot" + @(chartId), @series, {
@@ -607,5 +634,6 @@
       },
       yaxis: {
-        @if (axisYFormat != null) {
+        @if (axisYFormat != null)
+        {
           <text>
           tickOptions: {
@@ -614,11 +642,13 @@
           </text>
         }
-        @if (minY != null) {
+        pad: 0,
+        @if (minY != null)
+        {
             @:min: @minY,
         }
-        @if (maxY != null) {
+        @if (maxY != null)
+        {
             @:max: @maxY,
         }
-        pad: 0
       }
     },
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ExceptionHelper.cshtml
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ExceptionHelper.cshtml	(revision 11083)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ExceptionHelper.cshtml	(revision 11084)
@@ -18,49 +18,90 @@
  *@
 
-@helper UserExceptions(string destinationTag, string url, string limit, string userName = null, string startDate = null, string endDate = null, string jobId = null, string taskState = null)
+@helper UserExceptions(string destinationTag, string url, string limit, string userName = null, string startDate = null, string endDate = null, string jobId = null, string taskState = null, string slaveId=null)
 {
   <text>
-    var GetRequest = "?limit=" + @(limit);
-    @if (userName != null) {
-      @:if(@(userName)!=null) {
+  var GetRequest = "";
+  @if (userName != null) {
+    @:if(@(userName)!=null) {
+      @:if(GetRequest == "") {
+        @:GetRequest += "?userName=" + @userName;
+      @:}
+      @:else {
         @:GetRequest += "&userName=" + @userName;
       @:}
-    }
-    @if(startDate!=null) {
-      @:if(@(startDate)!=null) {
+    @:}
+  }
+  @if (startDate != null)
+  {
+    @:if(@(startDate)!=null) {
+      @:if(GetRequest == "") {
+        @:GetRequest += "?start=" + @startDate;
+      @:}
+      @:else {
         @:GetRequest += "&start=" + @startDate;
       @:}
-    }
-    @if(endDate!=null) {
-      @:if(@(endDate)!=null) {
+    @:}
+  }
+  @if (endDate != null)
+  {
+    @:if(@(endDate)!=null) {
+      @:if(GetRequest == "") {
+        @:GetRequest += "?end=" + @endDate;
+      @:}
+      @:else {
         @:GetRequest += "&end=" + @endDate;
       @:}
-    }
-    @if(jobId!=null) {
-      @:if(@(jobId)!=null) {
+    @:}
+  }
+  @if (jobId != null)
+  {
+    @:if(@(jobId)!=null) {
+      @:if(GetRequest == "") {
+        @:GetRequest += "?jobId=" + @jobId;
+      @:}
+      @:else {
         @:GetRequest += "&jobId=" + @jobId;
       @:}
-    }
-    @if(taskState!=null) {
-      @:if(@(taskState)==null) {
+    @:}
+  }
+  @if (taskState != null)
+  {
+    @:if(@(taskState)!=null) {
+      @:if(GetRequest == "") {
+        @:GetRequest += "?taskState=" + @taskState;
+      @:}
+      @:else {
         @:GetRequest += "&taskState=" + @taskState;
       @:}
-    }
-    $.ajax({async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) {
-        $("#" + "@destinationTag").html("");
-        if(result.Key.length > 0) {
-          var ErrorHTML = '<section class="errorContainer">' + 
-                            '<p class="errorTitle">Some tasks were found in error state!</p>' + 
-                            '<label class="errorTask underline">Task</label>' + 
-                            '<label class="errorMessage underline">Error</label>';
-          for (var i = 0; i < result.Key.length; i++) {
-            ErrorHTML += '<a class="errorTask" onclick="ScrollTo(this)">' + result.Key[i] + '</a>' + 
-                         '<label class="errorMessage">' + result.Value[i] + '</label>';
-          }
-          ErrorHTML += '</section>';
-          $("#" + "@destinationTag").append(ErrorHTML);
+    @:}
+  }
+  @if (slaveId != null)
+  {
+    @:if(@(slaveId)!=null) {
+      @:if(GetRequest == "") {
+        @:GetRequest += "?slaveId=" + @slaveId;
+      @:}
+      @:else {
+        @:GetRequest += "&slaveId=" + @slaveId;
+      @:}
+    @:}
+  }
+
+  $.ajax({async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) {
+      $("#" + "@destinationTag").html("");
+      if(result.Key.length > 0) {
+        var ErrorHTML = '<section class="errorContainer">' + 
+                          '<p class="errorTitle">Some tasks were found in error state!</p>' + 
+                          '<label class="errorTask underline">Task</label>' + 
+                          '<label class="errorMessage underline">Error</label>';
+        for (var i = 0; i < result.Key.length; i++) {
+          ErrorHTML += '<a class="errorTask" onclick="ScrollTo(this)">' + result.Key[i] + '</a>' + 
+                        '<label class="errorMessage">' + result.Value[i] + '</label>';
         }
-      }
-    });
+        ErrorHTML += '</section>';
+        $("#" + "@destinationTag").append(ErrorHTML);
+      }
+    }
+  });
   </text>
 }
@@ -69,5 +110,5 @@
   <text>
     function ScrollTo(caller) {
-      var taskErrorId = $(caller).parent().parent().attr('id') + $(caller).html();
+      var taskErrorId = $(caller).parent().parent().attr('id') + $(caller).html() + "PlotTitle";
       OpenOnError(document.getElementById(taskErrorId));
       $('html, body').animate({
@@ -107,28 +148,54 @@
 }
 
-@helper ErrorsOnSlaves(string destinationTag, string url, string limit, string startDate = null, string endDate = null, string clientId=null) {
-  <text>
-  var GetRequest = "?limit=" + @(limit);
-  @if(startDate!=null) {
+@helper ErrorsOnSlaves(string destinationTag, string url, string limit, string startDate = null, string endDate = null, string clientId=null, string functionName=null, string pageNumber=null) {
+  <text>
+  var GetRequest = "";
+  @if (startDate != null)
+  {
     @:if(@(startDate)!=null) {
-      @:GetRequest += "&start=" + @startDate;
-    @:}
-  }
-  @if(endDate!=null) {
+      @:if(GetRequest == "") {
+        @:GetRequest += "?start=" + @startDate;
+      @:}
+      @:else {
+        @:GetRequest += "&start=" + @startDate;
+      @:}
+    @:}
+  }
+  @if (endDate != null)
+  {
     @:if(@(endDate)!=null) {
-      @:GetRequest += "&end=" + @endDate;
-    @:}
-  }
-  @if (clientId != null) {
+      @:if(GetRequest == "") {
+        @:GetRequest += "?end=" + @endDate;
+      @:}
+      @:else {
+        @:GetRequest += "&end=" + @endDate;
+      @:}
+    @:}
+  }
+  @if (clientId != null)
+  {
     @:if(@(clientId)!=null) {
-      @:GetRequest += "&clientId=" + @clientId;
+      @:if(GetRequest == "") {
+        @:GetRequest += "?clientId=" + @clientId;
+      @:}
+      @:else {
+        @:GetRequest += "&clientId=" + @clientId;
+      @:}
     @:}
   }
   $.ajax({
     async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) {
+
+      //Checks if multipage display, if it is then trims results to
+      //the results for the page to be displayed
+      @ChartHelper.NumberPages("result",limit,destinationTag,functionName,pageNumber)
+
+      //Set display of all errors to none, errors matching the tasks will be reset below
+      $("#" + "@(destinationTag)").find(".errorContainer, .errorTitle, .errorTask, .errorMessage").css('display','none');
+
       for(i = 0; i < result.length; i++) {
         $("#" + "@(destinationTag)").append(
-          '<section id="' + result[i][0] + 'Container" class="chartContainer">' + 
-            '<h1 class="title" id="@(destinationTag)' + result[i][0] + '">Task ' + result[i][0] + '</h1>' + 
+          '<section id="@(destinationTag)' + result[i][0] + '" class="chartContainer">' + 
+            '<h1 class="title" id="@(destinationTag)' + result[i][0] + 'PlotTitle">Task ' + result[i][0] + '</h1>' + 
             '<button class="collapse" onclick="CollapseSection(this)">+</button>' + 
             '<label id="' + result[i][0] + 'ErrorMessage">Error Message: ' + result[i][1] + '</label>' + 
@@ -138,5 +205,18 @@
           '</section>'
         );
-        CollapsedByDefault(document.getElementById("@(destinationTag)" + result[i][0]));
+
+        //Re-enables the error display if any of the sections on the page have Ids matching
+        //those of errors
+        $(".errorTask","#" + "@(destinationTag)").each(function() { 
+          if($(this).html()==result[i][0]) {
+            $("#@(destinationTag)" + result[i][0] + "PlotTitle").css("color","red");
+            $("#@(destinationTag)" + result[i][0] + "PlotTitle").append(" - ERROR");
+            $('.errorContainer, .errorTitle, .underline','#@(destinationTag)').css('display','inline-block');
+            $(this).css('display','inline-block');
+            $(this).next().css('display','inline-block');
+          }
+        });
+
+        CollapsedByDefault(document.getElementById("@(destinationTag)" + result[i][0] + "PlotTitle"));
       }
     }
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 11083)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css	(revision 11084)
@@ -89,5 +89,5 @@
   font-size: 1.3em;
   color: #FF5640;
-  display: inline-block;
+  display: none;
 }
 
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 11083)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs	(revision 11084)
@@ -139,33 +139,5 @@
     }
 
-    public JsonResult NumberPages(string userName, string limit, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState = null)
-    {
-      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
-      {
-        TaskState state = GetTaskState(taskState);
-        var numberRecords =
-          (from tasks in db.FactTasks
-           join jobs in db.DimJobs
-             on tasks.JobId equals jobs.JobId
-           where jobs.UserName == userName &&
-           (!start.HasValue || tasks.StartTime >= start) &&
-           (!end.HasValue || tasks.EndTime < end) &&
-           (string.IsNullOrEmpty(jobId) || tasks.JobId.ToString() == jobId) &&
-           (string.IsNullOrEmpty(taskState) || tasks.TaskState == state)
-           select new
-           {
-             TaskID = tasks.TaskId,
-             StartDate = tasks.StartTime
-           }).OrderByDescending(s => s.StartDate).ToList().Count;
-
-        var numberPages = numberRecords / Convert.ToDecimal(limit);
-        numberPages = Decimal.Truncate(numberPages);
-        numberPages += 1;
-
-        return Json(numberPages, JsonRequestBehavior.AllowGet);
-      }
-    }
-
-    public JsonResult UserTask(string userName, string limit, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState=null)
+    public JsonResult UserTask(string userName, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState=null)
     {
       using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
@@ -204,5 +176,5 @@
     }
 
-    public JsonResult SlaveInfo(string limit, DateTime? start = null, DateTime? end = null, string userName = null, string slaveId=null)
+    public JsonResult SlaveInfo(DateTime? start = null, DateTime? end = null, string userName = null, string slaveId=null)
     {
       using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ExceptionDataController.cs
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ExceptionDataController.cs	(revision 11083)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ExceptionDataController.cs	(revision 11084)
@@ -9,5 +9,5 @@
   public class ExceptionDataController : Controller {
 
-    public JsonResult TaskExceptions(string limit, string userName, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState = null)
+    public JsonResult TaskExceptions(string userName, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState = null, string slaveId = null)
     {
       using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) {
@@ -23,5 +23,6 @@
           (!end.HasValue || tasks.EndTime < end) &&
           (string.IsNullOrEmpty(jobId) || tasks.JobId.ToString() == jobId) &&
-          (string.IsNullOrEmpty(taskState) || tasks.TaskState == state)
+          (string.IsNullOrEmpty(taskState) || tasks.TaskState == state) &&
+          (string.IsNullOrEmpty(slaveId) || tasks.LastClientId.ToString() == slaveId)
           select new
           {
@@ -29,5 +30,5 @@
             ErrorMessage = tasks.Exception,
             StartDate = tasks.StartTime
-          }).OrderByDescending(s => s.StartDate).Take(Convert.ToInt32(limit)).ToList();
+          }).OrderByDescending(s => s.StartDate).ToList();
 
         List<string> Task = new List<string>();
@@ -57,5 +58,5 @@
            UserName = jobs.UserName,
            StartDate = tasks.StartTime
-         }).OrderByDescending(s => s.StartDate).Take(Convert.ToInt32(limit)).ToList();
+         }).OrderByDescending(s => s.StartDate).ToList();
 
         List<List<string>> results = new List<List<string>>();
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 11083)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Scripts/CollapsingSection.js	(revision 11084)
@@ -45,10 +45,22 @@
   var jqCaller = $(caller);
   if (jqCaller.html() == "-") {
-    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer").hide();
+    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection").hide();
     jqCaller.html("+");
   }
   else {
-    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer").show();
+    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection").show();
     jqCaller.html("-");
   }
 }
+
+/* Because some chart sections are collapsed(display=none) on resize the charts will not chart
+  properly unless they are opened, them updated, then closed again. */
+function ResizeOpenCloseTabular(caller) {
+  var jqCaller = $(caller);
+  if (jqCaller.css("display") != "none") {
+    jqCaller.hide();
+  }
+  else {
+    jqCaller.show();
+  }
+}
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/Admin.cshtml
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/Admin.cshtml	(revision 11083)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/Admin.cshtml	(revision 11084)
@@ -122,5 +122,5 @@
       <label>Limit</label>
       <select id="ExceptionLimit">
-        <option>20</option>
+        <option>2</option>
         <option>50</option>
         <option selected="selected">100</option>
@@ -244,10 +244,7 @@
       }
       @ExceptionHelper.UserExceptions("TasksContainer", Url.Action("TaskExceptions", "ExceptionData"), "limit", "selectedUser", "startDate", "endDate", "jobId", "taskState")
-      @ChartHelper.TasksForUser("TasksContainer", "Task", Url.Action("UserTask", "ChartData"), "RefreshUser", "selectedUser", "limit", "startDate", "endDate", "jobId", "taskState", "pageNumber")
+      @ChartHelper.TasksForUser("TasksContainer",Url.Action("UserTask", "ChartData"), "RefreshUser", "selectedUser", "limit", "startDate", "endDate", "jobId", "taskState", "pageNumber")
       pageNumber = null;
     }
-
-    @ChartHelper.ResizeTasks("Task")
-    @ExceptionHelper.ScrollToException()
 
     //Task Overview
@@ -280,6 +277,4 @@
     }
 
-    @ChartHelper.ResizeSlaves()
-
     //Exceptions Overview
     $("#ExceptionSlaveList").change(function () {
@@ -299,9 +294,12 @@
         selectedSlave = $('#Slaves').val();
       }
-      @ExceptionHelper.UserExceptions("ExceptionContainer", Url.Action("TaskExceptions", "ExceptionData"), "limit", null, "startDate", "endDate", null, null)
-      @ExceptionHelper.ShowErrors("ExceptionContainer")
-      @ExceptionHelper.ErrorsOnSlaves("ExceptionContainer",Url.Action("SlaveExceptions", "ExceptionData"),"limit","startDate", "endDate","selectedSlave")
+      @ExceptionHelper.UserExceptions("ExceptionContainer",Url.Action("TaskExceptions","ExceptionData"),"limit",null,"startDate","endDate",null,null,"selectedSlave")
+      @ExceptionHelper.ErrorsOnSlaves("ExceptionContainer",Url.Action("SlaveExceptions","ExceptionData"),"limit","startDate","endDate","selectedSlave","RefreshException","pageNumber")
     }
-    @ExceptionHelper.ShowSlaveInfo(Url.Action("SlaveInfo", "ChartData"),"limit","startDate","endDate")
+    @ExceptionHelper.ShowSlaveInfo(Url.Action("SlaveInfo","ChartData"),"limit","startDate","endDate")
+
+    //General Chart Methods
+    @ChartHelper.ResizeCharts()
+    @ExceptionHelper.ScrollToException()
   </script>
 }
Index: /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/UserTask.cshtml
===================================================================
--- /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/UserTask.cshtml	(revision 11083)
+++ /branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/UserTask.cshtml	(revision 11084)
@@ -130,5 +130,5 @@
       }
       @ExceptionHelper.UserExceptions("TasksContainer",Url.Action("TaskExceptions", "ExceptionData"),"limit","userName","startDate","endDate","jobId","taskState")
-      @ChartHelper.TasksForUser("TasksContainer","Task",Url.Action("UserTask", "ChartData"),"TaskInformation","userName","limit","startDate","endDate","jobId","taskState","pageNumber")
+      @ChartHelper.TasksForUser("TasksContainer",Url.Action("UserTask", "ChartData"),"TaskInformation","userName","limit","startDate","endDate","jobId","taskState","pageNumber")
       pageNumber = null;
     }
@@ -149,5 +149,5 @@
 
     TaskInformation();
-    @ChartHelper.ResizeTasks("Task")
+    @ChartHelper.ResizeCharts()
     @ExceptionHelper.ScrollToException()
   </script>
