adding some interfaces and added alert class
This commit is contained in:
@@ -2,25 +2,9 @@
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="src/NOCQ/Plugins/Email/ImapInput.cs">
|
||||
<Files>
|
||||
<File FileName="src/NOCQ/Plugins/Email/EmailSettings.cs" Line="15" Column="16" />
|
||||
<File FileName="src/NOCQ/Plugins/Email/ImapInput.cs" Line="68" Column="31" />
|
||||
<File FileName="src/NOCQ/DB/RedisDataase.cs" Line="10" Column="6" />
|
||||
<File FileName="src/NOCQ/Plugins/Email/ImapInput.cs" Line="9" Column="24" />
|
||||
</Files>
|
||||
<Pads>
|
||||
<Pad Id="ProjectPad">
|
||||
<State expanded="True">
|
||||
<Node name="NOCQ" expanded="True">
|
||||
<Node name="Extensability" expanded="True" />
|
||||
<Node name="Imports" expanded="True" />
|
||||
<Node name="Plugins" expanded="True">
|
||||
<Node name="Email" expanded="True" />
|
||||
</Node>
|
||||
</Node>
|
||||
<Node name="NOCQ.Application" expanded="True" selected="True">
|
||||
<Node name="References" expanded="True" />
|
||||
</Node>
|
||||
</State>
|
||||
</Pad>
|
||||
</Pads>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
|
||||
18
src/NOCQ/Model/Alert.cs
Normal file
18
src/NOCQ/Model/Alert.cs
Normal file
@@ -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;}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
16
src/NOCQ/Model/IAlert.cs
Normal file
16
src/NOCQ/Model/IAlert.cs
Normal file
@@ -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;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
<Compile Include="DB\RedisDataase.cs" />
|
||||
<Compile Include="Plugins\Email\ParseRule.cs" />
|
||||
<Compile Include="Plugins\Email\IEmailSetting.cs" />
|
||||
<Compile Include="Model\Alert.cs" />
|
||||
<Compile Include="Plugins\Email\IParseRule.cs" />
|
||||
<Compile Include="Model\IAlert.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
@@ -79,5 +82,6 @@
|
||||
<Folder Include="DB\" />
|
||||
<Folder Include="Plugins\" />
|
||||
<Folder Include="Plugins\Email\" />
|
||||
<Folder Include="Model\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -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<ParseRule> ParseRules {get;set;}
|
||||
public IEnumerable<IParseRule> ParseRules {get;set;}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace NOCQ.Plugins.Email
|
||||
string Folder {get;set;}
|
||||
bool IsSsl {get;set;}
|
||||
int Frequency { get; set; }
|
||||
IEnumerable<ParseRule> ParseRules {get;set;}
|
||||
IEnumerable<IParseRule> ParseRules {get;set;}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
18
src/NOCQ/Plugins/Email/IParseRule.cs
Normal file
18
src/NOCQ/Plugins/Email/IParseRule.cs
Normal file
@@ -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;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace NOCQ.Plugins.Email
|
||||
int port { get; set; }
|
||||
bool ssl { get; set; }
|
||||
DateTime lastRun { get; set; }
|
||||
List<ParseRule> parseRules{ get; set; }
|
||||
List<IParseRule> parseRules{ get; set; }
|
||||
|
||||
public ImapInput (dynamic settings)
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user