Added pluginName in execute_ACTION_TRIGGERED analytics event (#4610)

This commit is contained in:
Abhijeet 2021-05-21 15:50:48 +05:30 committed by GitHub
parent c156560313
commit 1845de739e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -756,12 +756,14 @@ public class NewActionServiceImpl extends BaseService<NewActionRepository, NewAc
.flatMap(application -> Mono.zip(
Mono.just(application),
sessionUserService.getCurrentUser(),
newPageService.getNameByPageId(actionDTO.getPageId(), viewMode)
newPageService.getNameByPageId(actionDTO.getPageId(), viewMode),
pluginService.getById(action.getPluginId())
))
.map(tuple -> {
final Application application = tuple.getT1();
final User user = tuple.getT2();
final String pageName = tuple.getT3();
final Plugin plugin = tuple.getT4();
final PluginType pluginType = action.getPluginType();
final Map<String, Object> data = new HashMap<>();
@ -769,6 +771,7 @@ public class NewActionServiceImpl extends BaseService<NewActionRepository, NewAc
data.putAll(Map.of(
"username", user.getUsername(),
"type", pluginType,
"pluginName", plugin.getName(),
"name", actionDTO.getName(),
"datasource", Map.of(
"name", datasource.getName()
@ -777,11 +780,11 @@ public class NewActionServiceImpl extends BaseService<NewActionRepository, NewAc
"appId", action.getApplicationId(),
"appMode", TRUE.equals(viewMode) ? "view" : "edit",
"appName", application.getName(),
"isExampleApp", application.isAppIsExample(),
"request", request
"isExampleApp", application.isAppIsExample()
));
data.putAll(Map.of(
"request", request,
"pageId", ObjectUtils.defaultIfNull(actionDTO.getPageId(), ""),
"pageName", pageName,
"isSuccessfulExecution", ObjectUtils.defaultIfNull(actionExecutionResult.getIsExecutionSuccess(), false),