Added test button to notification edit

This commit is contained in:
Mark McDowall 2013-06-12 19:55:11 -07:00
parent 38589742e3
commit 1f4cf0034e
7 changed files with 78 additions and 8 deletions

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using NzbDrone.Api.ClientSchema;
using NzbDrone.Common.Reflection;
using NzbDrone.Core.Annotations;
@ -21,8 +22,6 @@ namespace NzbDrone.Api.Notifications
private List<NotificationResource> GetSchema()
{
//Need to get all the possible Notification's same as we would for settiings (but keep them empty)
var notifications = _notificationService.Schema();
var result = new List<NotificationResource>(notifications.Count);
@ -32,6 +31,7 @@ namespace NzbDrone.Api.Notifications
var notificationResource = new NotificationResource();
notificationResource.InjectFrom(notification);
notificationResource.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
notificationResource.Command = String.Format("test{0}", notification.Implementation.ToLowerInvariant());
result.Add(notificationResource);
}