public ActionResult Details(string instanceName, string groupName, string itemName) { Models.InstanceModel instance = instanceRepo.GetInstance(instanceName); Models.JobRepository jobRepo = new QuartzAdmin.web.Models.JobRepository(instance); Models.TriggerRepository triggerRepo = new QuartzAdmin.web.Models.TriggerRepository(instance); Quartz.JobDetail job = jobRepo.GetJob(itemName, groupName); Models.JobViewModel jvm = new QuartzAdmin.web.Models.JobViewModel(); jvm.JobDetail = job; if (job != null) { jvm.Triggers = triggerRepo.GetTriggersForJob(itemName, groupName); } ViewData["instanceName"] = instanceName; if (job == null) { return(View("NotFound")); } else { return(View(jvm)); } }
public ActionResult Details(string instanceName, string groupName, string itemName) { Models.InstanceModel instance = instanceRepo.GetInstance(instanceName); Models.JobRepository jobRepo = new QuartzAdmin.web.Models.JobRepository(instance); Models.TriggerRepository triggerRepo = new QuartzAdmin.web.Models.TriggerRepository(instance); Quartz.IJobDetail job = jobRepo.GetJob(itemName, groupName); Models.JobViewModel jvm = new QuartzAdmin.web.Models.JobViewModel(); jvm.JobDetail = job; if (job != null) { jvm.Triggers = triggerRepo.GetTriggersForJob(itemName, groupName); } ViewData["instanceName"] = instanceName; if (job == null) { return View("NotFound"); } else { return View(jvm); } }
public ActionResult Details2(string instanceName, string groupName, string itemName) { Models.JobRepository jobRepo = new QuartzAdmin.web.Models.JobRepository(instanceName); Quartz.JobDetail job = jobRepo.GetJob(itemName, groupName); if (job == null) { return(View("NotFound")); } else { return(View(job)); } }
public ActionResult Details2(string instanceName, string groupName, string itemName) { Models.JobRepository jobRepo = new QuartzAdmin.web.Models.JobRepository(instanceName); Quartz.IJobDetail job = jobRepo.GetJob(itemName, groupName); if (job == null) { return View("NotFound"); } else { return View(job); } }
public ActionResult RunNow(string instanceName, string groupName, string itemName) { Models.InstanceModel instance = Repository.GetByName(instanceName); Models.JobRepository jobRepo = new QuartzAdmin.web.Models.JobRepository(instance); //var jdm_keys = this.ValueProvider.Keys.Where(k=>k.StartsWith("jdm_")); IJobDetail job = jobRepo.GetJob(itemName, groupName); foreach (string jdm_key in this.Request.Form.Keys) { if (jdm_key.StartsWith("jdm_")) { if (job.JobDataMap.Contains(jdm_key.Substring(4))) { job.JobDataMap[jdm_key.Substring(4)] = Convert.ChangeType(Request.Form[jdm_key], job.JobDataMap[jdm_key.Substring(4)].GetType()); } } } jobRepo.RunJobNow(itemName, groupName, job.JobDataMap); return Content("Job execution started"); }
public ActionResult RunNow(string instanceName, string groupName, string itemName) { Models.InstanceModel instance = Repository.GetByName(instanceName); Models.JobRepository jobRepo = new QuartzAdmin.web.Models.JobRepository(instance); //var jdm_keys = this.ValueProvider.Keys.Where(k=>k.StartsWith("jdm_")); IJobDetail job = jobRepo.GetJob(itemName, groupName); foreach (string jdm_key in this.Request.Form.Keys) { if (jdm_key.StartsWith("jdm_")) { if (job.JobDataMap.Contains(jdm_key.Substring(4))) { job.JobDataMap[jdm_key.Substring(4)] = Convert.ChangeType(Request.Form[jdm_key], job.JobDataMap[jdm_key.Substring(4)].GetType()); } } } jobRepo.RunJobNow(itemName, groupName, job.JobDataMap); return(Content("Job execution started")); }