mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 08:33:58 -07:00
Added ImageLink helpers for Ajax and Html links.
Added run button to System/Jobs.
This commit is contained in:
parent
ed566e6e9a
commit
9264dcdf88
8 changed files with 99 additions and 3 deletions
|
@ -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" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue