Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/04/14 08:59:24 (10 years ago)
Author:
mroscoe
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs

    r11053 r11084  
    139139    }
    140140
    141     public JsonResult NumberPages(string userName, string limit, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState = null)
    142     {
    143       using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
    144       {
    145         TaskState state = GetTaskState(taskState);
    146         var numberRecords =
    147           (from tasks in db.FactTasks
    148            join jobs in db.DimJobs
    149              on tasks.JobId equals jobs.JobId
    150            where jobs.UserName == userName &&
    151            (!start.HasValue || tasks.StartTime >= start) &&
    152            (!end.HasValue || tasks.EndTime < end) &&
    153            (string.IsNullOrEmpty(jobId) || tasks.JobId.ToString() == jobId) &&
    154            (string.IsNullOrEmpty(taskState) || tasks.TaskState == state)
    155            select new
    156            {
    157              TaskID = tasks.TaskId,
    158              StartDate = tasks.StartTime
    159            }).OrderByDescending(s => s.StartDate).ToList().Count;
    160 
    161         var numberPages = numberRecords / Convert.ToDecimal(limit);
    162         numberPages = Decimal.Truncate(numberPages);
    163         numberPages += 1;
    164 
    165         return Json(numberPages, JsonRequestBehavior.AllowGet);
    166       }
    167     }
    168 
    169     public JsonResult UserTask(string userName, string limit, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState=null)
     141    public JsonResult UserTask(string userName, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState=null)
    170142    {
    171143      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
     
    204176    }
    205177
    206     public JsonResult SlaveInfo(string limit, DateTime? start = null, DateTime? end = null, string userName = null, string slaveId=null)
     178    public JsonResult SlaveInfo(DateTime? start = null, DateTime? end = null, string userName = null, string slaveId=null)
    207179    {
    208180      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
Note: See TracChangeset for help on using the changeset viewer.