Cleaned as much of notifications as I could find.

This commit is contained in:
kay.one 2012-01-18 21:01:47 -08:00
parent 121f3258af
commit 3cb61e4c34
16 changed files with 95 additions and 213 deletions

View file

@ -30,11 +30,12 @@ namespace NzbDrone.Web.Controllers
public ActionResult Jobs()
{
ViewData["Queue"] = _jobProvider.Queue.Select(c => new JobQueueItemModel {
Name = c.JobType.Name,
TargetId = c.TargetId,
SecondaryTargetId = c.SecondaryTargetId
});
ViewData["Queue"] = _jobProvider.Queue.Select(c => new JobQueueItemModel
{
Name = c.JobType.Name,
TargetId = c.TargetId,
SecondaryTargetId = c.SecondaryTargetId
});
var jobs = _jobProvider.All();
@ -139,9 +140,9 @@ namespace NzbDrone.Web.Controllers
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 JsonNotificationResult.Opps("Invalid Job Name");
return Json(new NotificationResult { Title = "Job Queued" });
return JsonNotificationResult.Info("Job Queued");
}
}
}