Skip to content

Commit 4107338

Browse files
authored
Merge pull request CactuseSecurity#3073 from Y4nnikH/feat/rsb-enhancements
feat(ui): rsb enhancements
2 parents 1ffe959 + 09e7932 commit 4107338

File tree

17 files changed

+271
-178
lines changed

17 files changed

+271
-178
lines changed

roles/lib/files/FWO.Api.Client/APIcalls/allObjects/getAllObjectDetails.graphql

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ query getAllObjectDetails (
22
$management_id: [Int!]
33
$type: [String!]
44
$uid: [String!]
5-
$import_id: bigint
5+
$import_id_start: bigint
6+
$import_id_end: bigint
67
$obj_name: [String!]
78
$limit: Int
89
$offset: Int
@@ -25,8 +26,8 @@ query getAllObjectDetails (
2526
offset: $offset
2627
where: {
2728
stm_obj_typ: { obj_typ_name: { _in: $type } }
28-
obj_last_seen: { _gte: $import_id }
29-
obj_create: { _lte: $import_id }
29+
obj_last_seen: { _gte: $import_id_start }
30+
obj_create: { _lte: $import_id_end }
3031
obj_name: { _in: $obj_name }
3132
obj_uid: { _in: $uid }
3233
}
@@ -39,8 +40,8 @@ query getAllObjectDetails (
3940
offset: $offset
4041
where: {
4142
stm_svc_typ: { svc_typ_name: { _in: $type } }
42-
svc_last_seen: { _gte: $import_id }
43-
svc_create: { _lte: $import_id }
43+
svc_last_seen: { _gte: $import_id_start }
44+
svc_create: { _lte: $import_id_end }
4445
svc_name: { _in: $obj_name }
4546
svc_uid: { _in: $uid }
4647
}
@@ -53,8 +54,8 @@ query getAllObjectDetails (
5354
offset: $offset
5455
where: {
5556
stm_usr_typ: { usr_typ_name: { _in: $type } }
56-
user_last_seen: { _gte: $import_id }
57-
user_create: { _lte: $import_id }
57+
user_last_seen: { _gte: $import_id_start }
58+
user_create: { _lte: $import_id_end }
5859
user_name: { _in: $obj_name }
5960
user_uid: { _in: $uid }
6061
}

roles/lib/files/FWO.Api.Client/APIcalls/networkObject/getNetworkObjectDetails.graphql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ query getNetworkObjectDetails(
22
$management_id: [Int!]
33
$nwObjTyp: [String!]
44
$nwObjUid: [String!]
5-
$import_id: bigint
5+
$import_id_start: bigint
6+
$import_id_end: bigint
67
$obj_name: [String!]
78
$obj_ip: [cidr!]
89
$limit: Int
@@ -16,8 +17,8 @@ query getNetworkObjectDetails(
1617
offset: $offset
1718
where: {
1819
stm_obj_typ: { obj_typ_name: { _in: $nwObjTyp } }
19-
obj_last_seen: { _gte: $import_id }
20-
obj_create: { _lte: $import_id }
20+
obj_last_seen: { _gte: $import_id_start }
21+
obj_create: { _lte: $import_id_end }
2122
obj_name: { _in: $obj_name }
2223
obj_ip: { _in: $obj_ip }
2324
obj_uid: { _in: $nwObjUid }

roles/lib/files/FWO.Api.Client/APIcalls/networkService/getNetworkServiceDetails.graphql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
query getNetworkServiceDetails(
22
$management_id: [Int!]
3-
$import_id: bigint
3+
$import_id_start: bigint
4+
$import_id_end: bigint
45
$svc_name: [String!]
56
$svc_port: [Int!]
67
$limit: Int
@@ -13,8 +14,8 @@ query getNetworkServiceDetails(
1314
limit: $limit
1415
offset: $offset
1516
where: {
16-
svc_last_seen: { _gte: $import_id }
17-
svc_create: { _lte: $import_id }
17+
svc_last_seen: { _gte: $import_id_start }
18+
svc_create: { _lte: $import_id_end }
1819
svc_name: { _in: $svc_name }
1920
svc_port: { _in: $svc_port }
2021
}

roles/lib/files/FWO.Api.Client/APIcalls/rule/getRuleDetails.graphql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ query getRuleDetails(
55
$rule_uid: [String!]
66
$ruleSrcName: [String!]
77
$ruleSrcIp: [cidr!]
8+
$import_id: bigint
89
$limit: Int
910
$offset: Int
1011
) {
@@ -26,7 +27,8 @@ query getRuleDetails(
2627
where: {
2728
rule_id: { _in: $rule_id }
2829
rule_uid: { _in: $rule_uid }
29-
active: { _eq: true }
30+
rule_last_seen: { _gte: $import_id }
31+
rule_create: { _lte: $import_id }
3032
rule_src: { _in: $ruleSrcName }
3133
rule_froms: { object: { obj_ip: { _in: $ruleSrcIp } } }
3234
access_rule: { _eq: true }

roles/lib/files/FWO.Api.Client/APIcalls/user/getUserDetails.graphql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
query getUserDetails(
22
$management_id: [Int!]
3-
$import_id: bigint
3+
$import_id_start: bigint
4+
$import_id_end: bigint
45
$user_name: [String!]
56
$limit: Int
67
$offset: Int
@@ -12,8 +13,8 @@ query getUserDetails(
1213
limit: $limit
1314
offset: $offset
1415
where: {
15-
user_last_seen: { _gte: $import_id }
16-
user_create: { _lte: $import_id }
16+
user_last_seen: { _gte: $import_id_start }
17+
user_create: { _lte: $import_id_end }
1718
user_name: { _in: $user_name }
1819
}
1920
order_by: [{ user_name: asc }, { user_id: asc }]

roles/lib/files/FWO.Data/Rule.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Text.Json.Serialization;
1+
using System.Text.Json.Serialization;
22
using Newtonsoft.Json;
33

44
namespace FWO.Data
@@ -96,6 +96,7 @@ public class Rule
9696
public NetworkLocation[] DisregardedFroms { get; set; } = [];
9797
public NetworkLocation[] DisregardedTos { get; set; } = [];
9898
public bool ShowDisregarded { get; set; } = false;
99+
public bool Detailed = false;
99100

100101
public bool IsDropRule()
101102
{

roles/lib/files/FWO.Report.Filter/DynGraphqlQuery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ private static void SetTimeFilter(ref DynGraphqlQuery query, TimeFilter? timeFil
416416
}
417417
}
418418

419-
private static (string, string) ResolveTimeRange(TimeFilter timeFilter)
419+
public static (string, string) ResolveTimeRange(TimeFilter timeFilter)
420420
{
421421
string start;
422422
string stop;

roles/lib/files/FWO.Report/Data/ManagementReport.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Newtonsoft.Json;
1+
using Newtonsoft.Json;
22
using System.Text.Json.Serialization;
33
using FWO.Data;
44

@@ -59,6 +59,7 @@ public class ManagementReport
5959
public List<long> RelevantObjectIds = [];
6060
public List<long> HighlightedObjectIds = [];
6161

62+
public bool[] Detailed = [false, false, false]; // nobj, nsrv, user
6263

6364
public ManagementReport()
6465
{}

roles/ui/files/FWO.UI/Pages/Reporting/Report.razor

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<div class="p-3">
4848
<h5 class="text-left">@(userConfig.GetText("report_time"))</h5>
4949
<div class="input-group">
50-
<input type="text" class="form-control form-control-sm" value="@actReportFilters.DisplayedTimeSelection" />
50+
<input type="text" class="form-control form-control-sm" value="@actReportFilters.DisplayedTimeSelection" disabled />
5151
<button type="button" class="btn btn-sm btn-secondary" @onclick="SelectTime">@(userConfig.GetText("change"))</button>
5252
</div>
5353
</div>
@@ -155,7 +155,8 @@
155155
<RightSidebar @bind-Width="sidebarRightWidth" CurrentReport="currentReport"
156156
@bind-SelectedRules="selectedItemsRuleReportTable"
157157
AllTabVisible="(tenantFilteringAllowed && actReportFilters.SelectedTenant == null)"
158-
SelectedReportType = "actReportFilters.ReportType"/>
158+
SelectedReportType="actReportFilters.ReportType"
159+
LSBTime="actReportFilters.TimeFilter"/>
159160
}
160161

161162
@* ==== POPUPS ==== *@

roles/ui/files/FWO.UI/Pages/Reporting/ReportSelectTime.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@using FWO.Report
1+
@using FWO.Report
22
@using FWO.Report.Filter
33

44
@inject UserConfig userConfig
55

66

7-
<PopUp Size=PopupSize.Small Title="@(userConfig.GetText("report_time"))" Show="@Display">
7+
<PopUp Size=PopupSize.Small Title="@(userConfig.GetText("report_time"))" Show="@Display" OnClose="Close">
88
<Body>
99
<div>
1010
@if (SelectedReportType.IsChangeReport())

0 commit comments

Comments
 (0)