Added ImageLink helpers for Ajax and Html links.

Added run button to System/Jobs.
This commit is contained in:
Mark McDowall 2011-12-15 00:25:16 -08:00
parent ed566e6e9a
commit 9264dcdf88
8 changed files with 99 additions and 3 deletions

View file

@ -35,7 +35,14 @@ namespace NzbDrone.Web.Controllers
TargetId = c.TargetId,
SecondaryTargetId = c.SecondaryTargetId
});
return View(_jobProvider.All());
var jobs = _jobProvider.All();
foreach(var jobDefinition in jobs)
{
jobDefinition.Command = "<a href=\"http://www.google.ca\"></a>";
}
return View(jobs);
}
public ActionResult Indexers()
@ -131,5 +138,13 @@ namespace NzbDrone.Web.Controllers
return new JsonResult { Data = "ok" };
}
public JsonResult RunJob(string typeName)
{
if (!_jobProvider.QueueJob(typeName))
return Json(new NotificationResult { Title = "Failed to Start Job", Text = "Invalid job name", NotificationType = NotificationType.Error });
return Json(new NotificationResult { Title = "Job Queued" });
}
}
}