Merge pull request #818 from iceljc/master

add criteria
This commit is contained in:
iceljc 2025-01-08 11:25:39 -06:00 committed by GitHub
commit adc916702f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -13,4 +13,7 @@ public class AgentRule
[JsonPropertyName("entity_type")]
public string EntityType { get; set; }
[JsonPropertyName("criteria")]
public string Criteria { get; set; }
}

View file

@ -8,6 +8,7 @@ public class AgentRuleMongoElement
public bool Disabled { get; set; }
public string EventName { get; set; }
public string EntityType { get; set; }
public string Criteria { get; set; }
public static AgentRuleMongoElement ToMongoElement(AgentRule rule)
{
@ -16,7 +17,8 @@ public class AgentRuleMongoElement
TriggerName = rule.TriggerName,
Disabled = rule.Disabled,
EventName = rule.EventName,
EntityType = rule.EntityType
EntityType = rule.EntityType,
Criteria = rule.Criteria
};
}
@ -27,7 +29,8 @@ public class AgentRuleMongoElement
TriggerName = rule.TriggerName,
Disabled = rule.Disabled,
EventName = rule.EventName,
EntityType = rule.EntityType
EntityType = rule.EntityType,
Criteria = rule.Criteria
};
}
}