File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
dashboard/src/main/resources
threat-detection-backend/src/main/java/com/akto/threat/backend/service Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 8421
8421
<param
8422
8422
name =" includeProperties" >^actionErrors.*</param >
8423
8423
</result >
8424
- <result name =" SUCCESS" type =" json" > </result >
8424
+ <result name =" SUCCESS" type =" json" >
8425
+ <param name =" includeProperties" >^categoryCounts.*</param >
8426
+ </result >
8425
8427
<result name =" ERROR" type =" json" >
8426
8428
<param name =" statusCode" >422</param >
8427
8429
<param name =" ignoreHierarchy" >false</param >
8453
8455
<param
8454
8456
name =" includeProperties" >^actionErrors.*</param >
8455
8457
</result >
8456
- <result name =" SUCCESS" type =" json" > </result >
8458
+ <result name =" SUCCESS" type =" json" >
8459
+ <param name =" includeProperties" >^actorsCounts.*</param >
8460
+ </result >
8457
8461
<result name =" ERROR" type =" json" >
8458
8462
<param name =" statusCode" >422</param >
8459
8463
<param name =" ignoreHierarchy" >false</param >
8485
8489
<param
8486
8490
name =" includeProperties" >^actionErrors.*</param >
8487
8491
</result >
8488
- <result name =" SUCCESS" type =" json" > </result >
8492
+ <result name =" SUCCESS" type =" json" >
8493
+ <param name =" includeProperties" >^threatActivityTimelines.*</param >
8494
+ </result >
8489
8495
<result name =" ERROR" type =" json" >
8490
8496
<param name =" statusCode" >422</param >
8491
8497
<param name =" ignoreHierarchy" >false</param >
Original file line number Diff line number Diff line change @@ -141,7 +141,8 @@ public ThreatCategoryWiseCountResponse getSubCategoryWiseCount(
141
141
// 3. Group by category and subCategory
142
142
pipeline .add (new Document ("$group" ,
143
143
new Document ("_id" ,
144
- new Document ("category" , "$category" ))
144
+ new Document ("category" , "$category" )
145
+ .append ("subCategory" , "$subCategory" ))
145
146
.append ("count" , new Document ("$sum" , 1 ))));
146
147
147
148
// 4. Sort by count descending
@@ -158,6 +159,7 @@ public ThreatCategoryWiseCountResponse getSubCategoryWiseCount(
158
159
categoryWiseCounts .add (
159
160
ThreatCategoryWiseCountResponse .SubCategoryCount .newBuilder ()
160
161
.setCategory (agg .getString ("category" ))
162
+ .setSubCategory (agg .getString ("subCategory" ))
161
163
.setCount (doc .getInteger ("count" , 0 ))
162
164
.build ());
163
165
}
You can’t perform that action at this time.
0 commit comments