mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Added ImageLink helpers for Ajax and Html links.
Added run button to System/Jobs.
This commit is contained in:
@@ -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" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user