diff --git a/NOCQ.userprefs b/NOCQ.userprefs
index 0cde9f1..2a64010 100644
--- a/NOCQ.userprefs
+++ b/NOCQ.userprefs
@@ -2,25 +2,9 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/NOCQ/Model/Alert.cs b/src/NOCQ/Model/Alert.cs
new file mode 100644
index 0000000..fa5908e
--- /dev/null
+++ b/src/NOCQ/Model/Alert.cs
@@ -0,0 +1,18 @@
+using System;
+
+namespace NOCQ
+{
+ public class Alert : IAlert
+ {
+
+ public DateTime TimeStamp {get; set;}
+ public string Source {get;set;}
+ public string System {get;set;}
+ public string Service {get;set;}
+ public string Data {get;set;}
+ public string Runbook {get; set;}
+ public string Severity {get;set;}
+ }
+}
+
+
diff --git a/src/NOCQ/Model/IAlert.cs b/src/NOCQ/Model/IAlert.cs
new file mode 100644
index 0000000..2de249d
--- /dev/null
+++ b/src/NOCQ/Model/IAlert.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace NOCQ
+{
+ public interface IAlert
+ {
+ DateTime TimeStamp {get; set;}
+ string Source {get;set;}
+ string System {get;set;}
+ string Service {get;set;}
+ string Data {get;set;}
+ string Runbook {get; set;}
+ string Severity {get;set;}
+ }
+}
+
diff --git a/src/NOCQ/NOCQ.csproj b/src/NOCQ/NOCQ.csproj
index 6206afc..0a1d4a5 100644
--- a/src/NOCQ/NOCQ.csproj
+++ b/src/NOCQ/NOCQ.csproj
@@ -68,6 +68,9 @@
+
+
+
@@ -79,5 +82,6 @@
+
diff --git a/src/NOCQ/Plugins/Email/EmailSettings.cs b/src/NOCQ/Plugins/Email/EmailSettings.cs
index d5af464..acd6613 100644
--- a/src/NOCQ/Plugins/Email/EmailSettings.cs
+++ b/src/NOCQ/Plugins/Email/EmailSettings.cs
@@ -12,7 +12,7 @@ namespace NOCQ.Plugins.Email
public string Folder {get;set;}
public bool IsSsl {get;set;}
public int Frequency { get; set; }
- public IEnumerable ParseRules {get;set;}
+ public IEnumerable ParseRules {get;set;}
}
}
diff --git a/src/NOCQ/Plugins/Email/IEmailSetting.cs b/src/NOCQ/Plugins/Email/IEmailSetting.cs
index e4244ca..0ca692b 100644
--- a/src/NOCQ/Plugins/Email/IEmailSetting.cs
+++ b/src/NOCQ/Plugins/Email/IEmailSetting.cs
@@ -11,7 +11,7 @@ namespace NOCQ.Plugins.Email
string Folder {get;set;}
bool IsSsl {get;set;}
int Frequency { get; set; }
- IEnumerable ParseRules {get;set;}
+ IEnumerable ParseRules {get;set;}
}
}
diff --git a/src/NOCQ/Plugins/Email/IParseRule.cs b/src/NOCQ/Plugins/Email/IParseRule.cs
new file mode 100644
index 0000000..4d0eedb
--- /dev/null
+++ b/src/NOCQ/Plugins/Email/IParseRule.cs
@@ -0,0 +1,18 @@
+using System;
+
+namespace NOCQ.Plugins.Email
+{
+ public interface IParseRule
+ {
+ string Name { get; set; }
+ bool Enabled { get; set; }
+ string From {get;set;}
+ string Source {get;set;}
+ string System {get;set;}
+ string Service {get;set;}
+ string Data {get;set;}
+ string Runbook { get; set;}
+ string Severity {get;set;}
+ }
+}
+
diff --git a/src/NOCQ/Plugins/Email/ImapInput.cs b/src/NOCQ/Plugins/Email/ImapInput.cs
index 33ae6e3..95e798a 100644
--- a/src/NOCQ/Plugins/Email/ImapInput.cs
+++ b/src/NOCQ/Plugins/Email/ImapInput.cs
@@ -16,13 +16,13 @@ namespace NOCQ.Plugins.Email
int port { get; set; }
bool ssl { get; set; }
DateTime lastRun { get; set; }
- List parseRules{ get; set; }
+ List parseRules{ get; set; }
public ImapInput (dynamic settings)
{
var sets = settings as EmailSettings;
- if (sets.GetType().GetProperty("Username") == null
+ if (sets.GetType().GetProperty("Username") == null
|| sets.GetType().GetProperty("Password") == null
|| sets.GetType().GetProperty("Host") == null
|| sets.GetType().GetProperty("Folder") == null)
diff --git a/src/NOCQ/Plugins/Email/ParseRule.cs b/src/NOCQ/Plugins/Email/ParseRule.cs
index a67b10f..7c89b42 100644
--- a/src/NOCQ/Plugins/Email/ParseRule.cs
+++ b/src/NOCQ/Plugins/Email/ParseRule.cs
@@ -2,7 +2,7 @@ using System;
namespace NOCQ.Plugins.Email
{
- public class ParseRule
+ public class ParseRule : IParseRule
{
public string Name { get; set; }
public bool Enabled { get; set; }