Skip to content

Commit

Permalink
Merge pull request #2518 from abarz722/develop
Browse files Browse the repository at this point in the history
last hit, bug fix + renaming
  • Loading branch information
tpurschke committed Sep 3, 2024
2 parents 97e5985 + 2a9ad45 commit 7db2fff
Show file tree
Hide file tree
Showing 70 changed files with 1,165 additions and 1,125 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query getTickets($fromState: Int!, $toState: Int!) {
request_ticket(where: {_or: [{_and: [{state_id: {_gte: $fromState}}, {state_id: {_lt: $toState}}]}, {reqtasks: {_and: [{state_id: {_gte: $fromState}}, {state_id: {_lt: $toState}}]}}]}, order_by: {id: asc}) {
request_ticket(where: {_or: [{_and: [{state_id: {_gte: $fromState}}, {state_id: {_lt: $toState}}]}, {reqtasks: {_and: [{state_id: {_gte: $fromState}}, {state_id: {_lt: $toState}}]}}]}, order_by: {id: desc}) {
...ticketDetails
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
rule_metadata_id
rule_created
rule_first_hit
rule_last_hit
rule_last_modified
rule_last_certified
rule_last_certifier_dn
Expand Down
12 changes: 6 additions & 6 deletions roles/lib/files/FWO.Api.Client/Data/NwObjectElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public string IpString
get { return Cidr.CidrString; }
set { Cidr = new Cidr(value); }
}
public Cidr Cidr { get; set; } = new Cidr();
public Cidr Cidr { get; set; } = new();

[JsonProperty("ip_end"), JsonPropertyName("ip_end")]
public string IpEndString
{
get { return CidrEnd.CidrString; } // ?? Cidr.CidrString; }
set { CidrEnd = new Cidr(value ?? Cidr.CidrString); } // if End value is not set, asume host and set start ip as end ip
}
public Cidr CidrEnd { get; set; } = new Cidr();
public Cidr CidrEnd { get; set; } = new();

[JsonProperty("name"), JsonPropertyName("name")]
public string? Name { get; set; }
Expand Down Expand Up @@ -55,9 +55,9 @@ public NwObjectElement(IPAddressRange ipAddressRange, long taskId)
TaskId = taskId;
}

public RequestReqElement ToReqElement(ElemFieldType field)
public WfReqElement ToReqElement(ElemFieldType field)
{
RequestReqElement element = new RequestReqElement()
WfReqElement element = new()
{
Id = ElemId,
TaskId = TaskId,
Expand All @@ -68,9 +68,9 @@ public RequestReqElement ToReqElement(ElemFieldType field)
return element;
}

public RequestImplElement ToImplElement(ElemFieldType field)
public WfImplElement ToImplElement(ElemFieldType field)
{
RequestImplElement element = new RequestImplElement()
WfImplElement element = new()
{
Id = ElemId,
ImplTaskId = TaskId,
Expand Down
8 changes: 4 additions & 4 deletions roles/lib/files/FWO.Api.Client/Data/NwRuleElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ public class NwRuleElement
public string RuleUid { get; set; } = "";


public RequestReqElement ToReqElement()
public WfReqElement ToReqElement()
{
RequestReqElement element = new RequestReqElement()
WfReqElement element = new()
{
Id = ElemId,
TaskId = TaskId,
Expand All @@ -19,9 +19,9 @@ public RequestReqElement ToReqElement()
return element;
}

public RequestImplElement ToImplElement()
public WfImplElement ToImplElement()
{
RequestImplElement element = new RequestImplElement()
WfImplElement element = new()
{
Id = ElemId,
ImplTaskId = TaskId,
Expand Down
8 changes: 4 additions & 4 deletions roles/lib/files/FWO.Api.Client/Data/NwServiceElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ public class NwServiceElement
public long? ServiceId { get; set; }


public RequestReqElement ToReqElement()
public WfReqElement ToReqElement()
{
RequestReqElement element = new ()
WfReqElement element = new ()
{
Id = ElemId,
TaskId = TaskId,
Expand All @@ -23,9 +23,9 @@ public RequestReqElement ToReqElement()
return element;
}

public RequestImplElement ToImplElement()
public WfImplElement ToImplElement()
{
RequestImplElement element = new ()
WfImplElement element = new ()
{
Id = ElemId,
ImplTaskId = TaskId,
Expand Down
12 changes: 0 additions & 12 deletions roles/lib/files/FWO.Api.Client/Data/RequestApprovalWriter.cs

This file was deleted.

51 changes: 0 additions & 51 deletions roles/lib/files/FWO.Api.Client/Data/RequestReqTaskWriter.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace FWO.Api.Data
{
public class RequestApproval : RequestApprovalBase
public class WfApproval : WfApprovalBase
{
[JsonProperty("id"), JsonPropertyName("id")]
public long Id { get; set; }
Expand All @@ -12,13 +12,13 @@ public class RequestApproval : RequestApprovalBase
public long TaskId { get; set; }

[JsonProperty("comments"), JsonPropertyName("comments")]
public List<RequestCommentDataHelper> Comments { get; set; } = new ();
public List<WfCommentDataHelper> Comments { get; set; } = new ();


public RequestApproval()
public WfApproval()
{ }

public RequestApproval(RequestApproval approval) : base(approval)
public WfApproval(WfApproval approval) : base(approval)
{
Id = approval.Id;
TaskId = approval.TaskId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace FWO.Api.Data
{
public class RequestApprovalBase : RequestStatefulObject
public class WfApprovalBase : WfStatefulObject
{
[JsonProperty("date_opened"), JsonPropertyName("date_opened")]
public DateTime DateOpened { get; set; } = DateTime.Now;
Expand All @@ -30,10 +30,10 @@ public class RequestApprovalBase : RequestStatefulObject
public bool InitialApproval { get; set; } = true;


public RequestApprovalBase()
public WfApprovalBase()
{ }

public RequestApprovalBase(RequestApprovalBase approval) : base(approval)
public WfApprovalBase(WfApprovalBase approval) : base(approval)
{
DateOpened = approval.DateOpened;
ApprovalDate = approval.ApprovalDate;
Expand Down
12 changes: 12 additions & 0 deletions roles/lib/files/FWO.Api.Client/Data/WfApprovalWriter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace FWO.Api.Data
{
public class WfApprovalWriter : WfApprovalBase
{
public WfApprovalWriter()
{ }

public WfApprovalWriter(WfApproval approval) : base(approval)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@

namespace FWO.Api.Data
{
public class RequestComment : RequestCommentBase
public class WfComment : WfCommentBase
{
[JsonProperty("id"), JsonPropertyName("id")]
public int Id { get; set; }


public RequestComment()
public WfComment()
{ }

public RequestComment(RequestComment comment) : base(comment)
public WfComment(WfComment comment) : base(comment)
{
Id = comment.Id;
}
}

public class RequestCommentDataHelper
public class WfCommentDataHelper
{
[JsonProperty("comment"), JsonPropertyName("comment")]
public RequestComment Comment { get; set; } = new ();
public WfComment Comment { get; set; } = new ();


public RequestCommentDataHelper()
public WfCommentDataHelper()
{}

public RequestCommentDataHelper(RequestComment comment)
public WfCommentDataHelper(WfComment comment)
{
Comment = comment;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace FWO.Api.Data
{
public class RequestCommentBase
public class WfCommentBase
{
[JsonProperty("ref_id"), JsonPropertyName("ref_id")]
public long? RefId { get; set; }
Expand All @@ -21,10 +21,10 @@ public class RequestCommentBase
public string CommentText { get; set; } = "";


public RequestCommentBase()
public WfCommentBase()
{ }

public RequestCommentBase(RequestCommentBase comment)
public WfCommentBase(WfCommentBase comment)
{
RefId = comment.RefId;
Scope = comment.Scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum ElemFieldType
rule
}

public class RequestElementBase
public class WfElementBase
{
[JsonProperty("ip"), JsonPropertyName("ip")]
public string? IpString { get; set; }
Expand Down Expand Up @@ -41,10 +41,10 @@ public class RequestElementBase
public string? RuleUid { get; set; }


public RequestElementBase()
public WfElementBase()
{ }

public RequestElementBase(RequestElementBase element)
public WfElementBase(WfElementBase element)
{
IpString = element.IpString;
Port = element.Port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum ExtStates
Rejected
}

public class RequestExtState
public class WfExtState
{
[JsonProperty("id"), JsonPropertyName("id")]
public int? Id { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace FWO.Api.Data
{
public class RequestImplElement : RequestElementBase
public class WfImplElement : WfElementBase
{
[JsonProperty("id"), JsonPropertyName("id")]
public long Id { get; set; }
Expand All @@ -16,18 +16,18 @@ public class RequestImplElement : RequestElementBase

public Cidr Cidr { get; set; } = new Cidr();

public RequestImplElement()
public WfImplElement()
{}

public RequestImplElement(RequestImplElement element) : base(element)
public WfImplElement(WfImplElement element) : base(element)
{
Id = element.Id;
ImplTaskId = element.ImplTaskId;
ImplAction = element.ImplAction;
Cidr = new Cidr(element.Cidr != null ? element.Cidr.CidrString : "");
}

public RequestImplElement(RequestReqElement element)
public WfImplElement(WfReqElement element)
{
Id = 0;
ImplAction = element.RequestAction;
Expand Down
Loading

0 comments on commit 7db2fff

Please sign in to comment.