more email rule stuff
This commit is contained in:
@@ -1,6 +1,27 @@
|
||||
<Properties>
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="src/NOCQ/Extensability/Catalog.cs">
|
||||
<Files>
|
||||
<File FileName="src/NOCQ/Plugins/Email/EmailSettings.cs" Line="13" Column="37" />
|
||||
<File FileName="src/NOCQ/Plugins/Email/ImapInput.cs" Line="60" Column="4" />
|
||||
<File FileName="src/NOCQ/Extensability/Catalog.cs" Line="8" Column="6" />
|
||||
</Files>
|
||||
<Pads>
|
||||
<Pad Id="ProjectPad">
|
||||
<State expanded="True">
|
||||
<Node name="NOCQ" expanded="True">
|
||||
<Node name="Extensability" expanded="True">
|
||||
<Node name="Catalog.cs" selected="True" />
|
||||
</Node>
|
||||
<Node name="Plugins" expanded="True">
|
||||
<Node name="Email" expanded="True" />
|
||||
</Node>
|
||||
</Node>
|
||||
<Node name="NOCQ.Application" expanded="True" />
|
||||
</State>
|
||||
</Pad>
|
||||
</Pads>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
|
||||
@@ -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