@@ -39,9 +39,6 @@ public class EngagementService {
39
39
40
40
@ ConfigProperty (name = "commit.msg.filter.list" , defaultValue = "not.set" )
41
41
List <String > commitFilteredMessages ;
42
-
43
- @ ConfigProperty (name = "v2.enabled" )
44
- boolean v2Enabled ;
45
42
46
43
@ Inject
47
44
ParticipantService participantService ;
@@ -52,6 +49,9 @@ public class EngagementService {
52
49
@ Inject
53
50
ArtifactService artifactService ;
54
51
52
+ @ Inject
53
+ ConfigService configService ;
54
+
55
55
@ Inject
56
56
@ RestClient
57
57
EngagementApiClient engagementApiClient ;
@@ -342,6 +342,9 @@ public Response getEngagementsPaged(ListFilterOptions listFilterOptions) {
342
342
343
343
Response response = engagementApiClient .getEngagements (page , pageSize , listFilterOptions .getV2Regions ());
344
344
List <Engagement > engagements = response .readEntity (new GenericType <>(){});
345
+
346
+ Map <String , String > engagementOptions = configService .getEngagementOptions ();
347
+
345
348
//TODO this loop is to allow frontend to change after v2 deployment.
346
349
// FE should use participant, artifact count field, and categories (string version)
347
350
for (Engagement e : engagements ) {
@@ -359,6 +362,8 @@ public Response getEngagementsPaged(ListFilterOptions listFilterOptions) {
359
362
e .addCategory (cat );
360
363
}
361
364
}
365
+
366
+ e .setPrettyType (engagementOptions .containsKey (e .getType ()) ? engagementOptions .get (e .getType ()) : e .getType ());
362
367
}
363
368
return Response .ok (engagements ).header ("x-total-engagements" , response .getHeaderString ("x-total-engagements" )).build ();
364
369
}
0 commit comments