Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/AdminDataController.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/AdminDataController.cs	(revision 11020)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/AdminDataController.cs	(revision 11030)
@@ -24,5 +24,5 @@
     }
 
-    public JsonResult UserTaskStats(string userName, DateTime start, DateTime end)
+    public JsonResult TaskStats(DateTime start, DateTime end, string userName=null)
     {
       using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
@@ -31,7 +31,7 @@
                         join jobs in db.DimJobs
                           on tasks.JobId equals jobs.JobId
-                        where jobs.UserName == userName &&
-                        tasks.StartTime >= start &&
-                        tasks.EndTime < end
+                        where tasks.StartTime >= start &&
+                        tasks.EndTime < end &&
+                        (string.IsNullOrEmpty(userName) || jobs.UserName == userName)
                         select new { tasks.TotalWaitingTime, tasks.TotalTransferTime, tasks.TotalRuntime, tasks.NumCalculationRuns, 
                           tasks.CoresRequired, tasks.MemoryRequired, tasks.TaskSize, tasks.ResultSize})
@@ -51,38 +51,4 @@
       }
     }
-
-    public JsonResult AllTaskStats(DateTime start, DateTime end)
-    {
-      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
-      {
-        var taskStats = (from tasks in db.FactTasks
-                         where tasks.StartTime >= start &&
-                         tasks.EndTime < end
-                         select new
-                         {
-                           tasks.TotalWaitingTime,
-                           tasks.TotalTransferTime,
-                           tasks.TotalRuntime,
-                           tasks.NumCalculationRuns,
-                           tasks.CoresRequired,
-                           tasks.MemoryRequired,
-                           tasks.TaskSize,
-                           tasks.ResultSize
-                         })
-                          .ToList();
-
-        List<double> FullStats = new List<double>();
-        FullStats.Add(taskStats.Sum(w => w.TotalWaitingTime));
-        FullStats.Add(taskStats.Sum(t => t.TotalTransferTime));
-        FullStats.Add(taskStats.Sum(r => r.TotalRuntime));
-        FullStats.Add(taskStats.Sum(n => n.NumCalculationRuns));
-        FullStats.Add(taskStats.Sum(c => c.CoresRequired));
-        FullStats.Add(taskStats.Sum(m => m.MemoryRequired));
-        FullStats.Add(taskStats.Sum(ts => ts.TaskSize));
-        FullStats.Add(taskStats.Sum(rs => Convert.ToDouble(rs.ResultSize)));
-
-        return Json(FullStats, JsonRequestBehavior.AllowGet);
-      }
-    }
   }
 }
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 11020)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs	(revision 11030)
@@ -139,37 +139,117 @@
     }
 
-    public JsonResult GetUserTask(string userName, DateTime? start = null, DateTime? end = null)
-    {
-      start = start ?? DateTime.Now - DefaultDuration;
-      end = end ?? DateTime.Now;
-      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
-      {
-        var data =
+    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 &&
-          tasks.StartTime >= start &&
-          tasks.EndTime < end
-          select new
-          {
-            TotalWaiting = tasks.TotalWaitingTime,
-            TotalTransfer = tasks.TotalTransferTime,
-            TotalRuntime = tasks.TotalRuntime
-          }).ToList();
-
-        List<List<double>> overallResult = new List<List<double>>();
+           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,
+             TotalWaiting = tasks.TotalWaitingTime,
+             TotalTransfer = tasks.TotalTransferTime,
+             TotalRuntime = tasks.TotalRuntime,
+             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 GetUserTask(string userName, string limit, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState=null, string currentPage=null)
+    {
+      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
+      {
+        TaskState state = GetTaskState(taskState);
+        var data =
+          (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,
+             TotalWaiting = tasks.TotalWaitingTime,
+             TotalTransfer = tasks.TotalTransferTime,
+             TotalRuntime = tasks.TotalRuntime,
+             StartDate = tasks.StartTime
+           }).OrderByDescending(s => s.StartDate).ToList();
+
+        if (currentPage != null) {
+          data.RemoveRange(0, (Convert.ToInt32(currentPage) - 1) * Convert.ToInt32(limit));
+          if (data.Count > Convert.ToInt32(limit)) {
+            data.RemoveRange(Convert.ToInt32(limit), data.Count - Convert.ToInt32(limit));
+          }
+        }
+        else if (data.Count > Convert.ToInt32(limit))
+        {
+          data.RemoveRange(Convert.ToInt32(limit), data.Count - Convert.ToInt32(limit));
+        }
+
+        List<string> id = new List<string>();
         List<double> wait = new List<double>();
         List<double> transfer = new List<double>();
         List<double> run = new List<double>();
+        data.ForEach(i => id.Add(i.TaskID.ToString()));
         data.ForEach(w => wait.Add(w.TotalWaiting));
         data.ForEach(t => transfer.Add(t.TotalTransfer));
         data.ForEach(r => run.Add(r.TotalRuntime));
-        overallResult.Add(wait);
-        overallResult.Add(transfer);
-        overallResult.Add(run);
-
-        return Json(overallResult,JsonRequestBehavior.AllowGet);
-      }
+
+        List<List<double>> taskStats = new List<List<double>>();
+        taskStats.Add(wait);
+        taskStats.Add(transfer);
+        taskStats.Add(run);
+
+        return Json(new KeyValuePair<List<string>, List<List<double>>>(id, taskStats), JsonRequestBehavior.AllowGet);
+      }
+    }
+
+    private static TaskState GetTaskState(string taskState) {
+      TaskState state = TaskState.Finished;
+      switch (taskState)
+      {
+        case "Aborted":
+          state = TaskState.Aborted;
+          break;
+        case "Calculating":
+          state = TaskState.Calculating;
+          break;
+        case "Failed":
+          state = TaskState.Failed;
+          break;
+        case "Finished":
+          state = TaskState.Finished;
+          break;
+        case "Offline":
+          state = TaskState.Offline;
+          break;
+        case "Paused":
+          state = TaskState.Paused;
+          break;
+        case "Transferring":
+          state = TaskState.Transferring;
+          break;
+        case "Waiting":
+          state = TaskState.Waiting;
+          break;
+      }
+      return state;
     }
 
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 11030)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ExceptionDataController.cs	(revision 11030)
@@ -0,0 +1,74 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using HeuristicLab.Services.Hive.DataAccess;
+
+namespace HeuristicLab.Services.Hive.Statistics.Controllers {
+  public class ExceptionDataController : Controller {
+
+    public JsonResult TaskExceptions(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 data =
+        (from errors in db.StateLogs
+          join tasks in db.FactTasks
+            on errors.TaskId equals tasks.TaskId
+          join jobs in db.DimJobs
+            on tasks.JobId equals jobs.JobId
+          where jobs.UserName == userName &&
+          errors.Exception != null && 
+          !errors.Exception.Equals(string.Empty) &&
+          (!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 = errors.TaskId,
+            ErrorMessage = errors.Exception,
+            StartDate = tasks.StartTime
+          }).OrderByDescending(s => s.StartDate).Take(Convert.ToInt32(limit)).ToList();
+
+        List<string> Task = new List<string>();
+        List<string> Error = new List<string>();
+        data.ForEach(t => Task.Add(t.TaskID.ToString()));
+        data.ForEach(e => Error.Add(e.ErrorMessage));
+
+        return Json(new KeyValuePair<List<string>, List<string>>(Task, Error), JsonRequestBehavior.AllowGet);
+      }
+    }
+
+    private static TaskState GetTaskState(string taskState) {
+      TaskState state = TaskState.Finished;
+      switch (taskState) {
+        case "Aborted":
+          state = TaskState.Aborted;
+          break;
+        case "Calculating":
+          state = TaskState.Calculating;
+          break;
+        case "Failed":
+          state = TaskState.Failed;
+          break;
+        case "Finished":
+          state = TaskState.Finished;
+          break;
+        case "Offline":
+          state = TaskState.Offline;
+          break;
+        case "Paused":
+          state = TaskState.Paused;
+          break;
+        case "Transferring":
+          state = TaskState.Transferring;
+          break;
+        case "Waiting":
+          state = TaskState.Waiting;
+          break;
+      }
+      return state;
+    }
+  }
+}
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/LoginRequiredController.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/LoginRequiredController.cs	(revision 11020)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/LoginRequiredController.cs	(revision 11030)
@@ -5,4 +5,5 @@
 using System.Web.Mvc;
 using HeuristicLab.Services.Hive.Statistics.Models;
+using HeuristicLab.Services.Hive.DataAccess;
 
 namespace HeuristicLab.Services.Hive.Statistics.Controllers {
@@ -14,4 +15,12 @@
         UserName = User.Identity.Name
       };
+
+      //Initialize drop down list values
+      var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
+      ViewBag.JobNames = new SelectList(db.DimJobs, "JobId", "JobName");
+      var TaskStateList = (from task in db.FactTasks
+                           select task.TaskState).Distinct();
+      ViewBag.TaskStates = new SelectList(TaskStateList);
+
       return View(result);
     }
@@ -25,4 +34,11 @@
       if (User.IsInRole("Hive Administrator")) {
         result.IsAdmin = true;
+
+        //Initialize drop down list values
+        var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
+        ViewBag.JobNames = new SelectList(db.DimJobs, "JobId", "JobName");
+        var TaskStateList = (from task in db.FactTasks
+                             select task.TaskState).Distinct();
+        ViewBag.TaskStates = new SelectList(TaskStateList);
       }
 
