more email rule stuff
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
<Compile Include="Plugins\Email\EmailSettings.cs" />
|
||||
<Compile Include="Imports\IDataImportHook.cs" />
|
||||
<Compile Include="Imports\DataImports.cs" />
|
||||
<Compile Include="Plugins\Email\ParseRule.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace NOCQ.Plugins.Email
|
||||
public string Folder {get;set;}
|
||||
public bool IsSsl {get;set;}
|
||||
public int Frequency { get; set; }
|
||||
public IEnumerable<ParseRule> ParseRules {get;set;}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace NOCQ.Plugins.Email
|
||||
private int port { get; set; }
|
||||
private bool ssl { get; set; }
|
||||
private DateTime lastRun { get; set; }
|
||||
|
||||
private IEnumerable<ParseRule> parseRules{ get; set; }
|
||||
|
||||
public ImapInput (dynamic settings)
|
||||
{
|
||||
@@ -29,6 +29,8 @@ namespace NOCQ.Plugins.Email
|
||||
|| sets.IsSsl == null)
|
||||
throw new ArgumentException ("You are missing a required setting.");
|
||||
|
||||
parseRules = sets.ParseRules.Where (x => x.Enabled);
|
||||
|
||||
loginName = settings.Login;
|
||||
password = settings.Password;
|
||||
server = settings.Server;
|
||||
|
||||
18
src/NOCQ/Plugins/Email/ParseRule.cs
Normal file
18
src/NOCQ/Plugins/Email/ParseRule.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace NOCQ.Plugins.Email
|
||||
{
|
||||
public class ParseRule
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public string From {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;}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user