// GET: Worker public ActionResult Index() { ViewBag.Devices = DeviceModel.GetAllDevices(); ViewBag.Commands = CommandModel.GetAllCommands(); ViewBag.Actions = ActionModel.GetAllActions(); ViewBag.Jobs = JobModel.GetAllJobs(); ViewBag.ReturnLogs = ReturnLogModel.GetAllReturnLogs(); return(View()); }
public IActionResult GetAllJobs( [FromQuery] SortRequestDto sortDto, [FromQuery] AdvancedFilterRequestDto filterRequestDto) { try { var filter = AdvancedFilterRequestDto.ParseFilterRequest(filterRequestDto); var sort = SortRequestDto.MapSortRequest(sortDto); var jobEntries = _jobModel.GetAllJobs(sort, filter); return(Json(jobEntries)); } catch (Exception e) { return(ResolveException(e)); } }