added new debug filter property
This commit is contained in:
parent
4245bd4809
commit
bd5ecc2e9b
@ -33,6 +33,13 @@ public class CalculatedFieldDebugEventFilter extends DebugEventFilter {
|
|||||||
protected String msgId;
|
protected String msgId;
|
||||||
@Schema(description = "String value representing the message type", example = "POST_TELEMETRY_REQUEST")
|
@Schema(description = "String value representing the message type", example = "POST_TELEMETRY_REQUEST")
|
||||||
protected String msgType;
|
protected String msgType;
|
||||||
|
@Schema(description = "String value representing the arguments that were used in the calculation performed",
|
||||||
|
example = "{\"x\":{\"ts\":1739432016629,\"value\":20},\"y\":{\"ts\":1739429717656,\"value\":12}}")
|
||||||
|
protected String arguments;
|
||||||
|
@Schema(description = "String value representing the result of a calculation",
|
||||||
|
example = "{\"x + y\":54}")
|
||||||
|
protected String result;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EventType getEventType() {
|
public EventType getEventType() {
|
||||||
@ -41,7 +48,9 @@ public class CalculatedFieldDebugEventFilter extends DebugEventFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isNotEmpty() {
|
public boolean isNotEmpty() {
|
||||||
return super.isNotEmpty() || !StringUtils.isEmpty(entityId) || !StringUtils.isEmpty(entityType) || !StringUtils.isEmpty(msgId) || !StringUtils.isEmpty(msgType);
|
return super.isNotEmpty() || !StringUtils.isEmpty(entityId) || !StringUtils.isEmpty(entityType)
|
||||||
|
|| !StringUtils.isEmpty(msgId) || !StringUtils.isEmpty(msgType)
|
||||||
|
|| !StringUtils.isEmpty(arguments) || !StringUtils.isEmpty(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,8 @@ public interface CalculatedFieldDebugEventRepository extends EventRepository<Cal
|
|||||||
"AND (:eventEntityType IS NULL OR e.e_entity_type ILIKE concat('%', :eventEntityType, '%')) " +
|
"AND (:eventEntityType IS NULL OR e.e_entity_type ILIKE concat('%', :eventEntityType, '%')) " +
|
||||||
"AND (:msgId IS NULL OR e.e_msg_id = uuid(:msgId)) " +
|
"AND (:msgId IS NULL OR e.e_msg_id = uuid(:msgId)) " +
|
||||||
"AND (:msgType IS NULL OR e.e_msg_type ILIKE concat('%', :msgType, '%')) " +
|
"AND (:msgType IS NULL OR e.e_msg_type ILIKE concat('%', :msgType, '%')) " +
|
||||||
|
"AND (:eventArguments IS NULL OR e.e_args ILIKE concat('%', :eventArguments, '%')) " +
|
||||||
|
"AND (:eventResult IS NULL OR e.e_result ILIKE concat('%', :eventResult, '%')) " +
|
||||||
"AND ((:isError = FALSE) OR e.e_error IS NOT NULL) " +
|
"AND ((:isError = FALSE) OR e.e_error IS NOT NULL) " +
|
||||||
"AND (:error IS NULL OR e.e_error ILIKE concat('%', :error, '%'))"
|
"AND (:error IS NULL OR e.e_error ILIKE concat('%', :error, '%'))"
|
||||||
,
|
,
|
||||||
@ -73,6 +75,8 @@ public interface CalculatedFieldDebugEventRepository extends EventRepository<Cal
|
|||||||
"AND (:eventEntityType IS NULL OR e.e_entity_type ILIKE concat('%', :eventEntityType, '%')) " +
|
"AND (:eventEntityType IS NULL OR e.e_entity_type ILIKE concat('%', :eventEntityType, '%')) " +
|
||||||
"AND (:msgId IS NULL OR e.e_msg_id = uuid(:msgId)) " +
|
"AND (:msgId IS NULL OR e.e_msg_id = uuid(:msgId)) " +
|
||||||
"AND (:msgType IS NULL OR e.e_msg_type ILIKE concat('%', :msgType, '%')) " +
|
"AND (:msgType IS NULL OR e.e_msg_type ILIKE concat('%', :msgType, '%')) " +
|
||||||
|
"AND (:eventArguments IS NULL OR e.e_args ILIKE concat('%', :eventArguments, '%')) " +
|
||||||
|
"AND (:eventResult IS NULL OR e.e_result ILIKE concat('%', :eventResult, '%')) " +
|
||||||
"AND ((:isError = FALSE) OR e.e_error IS NOT NULL) " +
|
"AND ((:isError = FALSE) OR e.e_error IS NOT NULL) " +
|
||||||
"AND (:error IS NULL OR e.e_error ILIKE concat('%', :error, '%'))"
|
"AND (:error IS NULL OR e.e_error ILIKE concat('%', :error, '%'))"
|
||||||
)
|
)
|
||||||
@ -86,6 +90,8 @@ public interface CalculatedFieldDebugEventRepository extends EventRepository<Cal
|
|||||||
@Param("eventEntityType") String eventEntityType,
|
@Param("eventEntityType") String eventEntityType,
|
||||||
@Param("msgId") String eventMsgId,
|
@Param("msgId") String eventMsgId,
|
||||||
@Param("msgType") String eventMsgType,
|
@Param("msgType") String eventMsgType,
|
||||||
|
@Param("eventArguments") String eventArguments,
|
||||||
|
@Param("eventResult") String eventResult,
|
||||||
@Param("isError") boolean isError,
|
@Param("isError") boolean isError,
|
||||||
@Param("error") String error,
|
@Param("error") String error,
|
||||||
Pageable pageable);
|
Pageable pageable);
|
||||||
@ -117,6 +123,8 @@ public interface CalculatedFieldDebugEventRepository extends EventRepository<Cal
|
|||||||
"AND (:eventEntityType IS NULL OR e.e_entity_type ILIKE concat('%', :eventEntityType, '%')) " +
|
"AND (:eventEntityType IS NULL OR e.e_entity_type ILIKE concat('%', :eventEntityType, '%')) " +
|
||||||
"AND (:msgId IS NULL OR e.e_msg_id = uuid(:msgId)) " +
|
"AND (:msgId IS NULL OR e.e_msg_id = uuid(:msgId)) " +
|
||||||
"AND (:msgType IS NULL OR e.e_msg_type ILIKE concat('%', :msgType, '%')) " +
|
"AND (:msgType IS NULL OR e.e_msg_type ILIKE concat('%', :msgType, '%')) " +
|
||||||
|
"AND (:eventArguments IS NULL OR e.e_args ILIKE concat('%', :eventArguments, '%')) " +
|
||||||
|
"AND (:eventResult IS NULL OR e.e_result ILIKE concat('%', :eventResult, '%')) " +
|
||||||
"AND ((:isError = FALSE) OR e.e_error IS NOT NULL) " +
|
"AND ((:isError = FALSE) OR e.e_error IS NOT NULL) " +
|
||||||
"AND (:error IS NULL OR e.e_error ILIKE concat('%', :error, '%'))")
|
"AND (:error IS NULL OR e.e_error ILIKE concat('%', :error, '%'))")
|
||||||
void removeEvents(@Param("tenantId") UUID tenantId,
|
void removeEvents(@Param("tenantId") UUID tenantId,
|
||||||
@ -129,6 +137,8 @@ public interface CalculatedFieldDebugEventRepository extends EventRepository<Cal
|
|||||||
@Param("eventEntityType") String eventEntityType,
|
@Param("eventEntityType") String eventEntityType,
|
||||||
@Param("msgId") String eventMsgId,
|
@Param("msgId") String eventMsgId,
|
||||||
@Param("msgType") String eventMsgType,
|
@Param("msgType") String eventMsgType,
|
||||||
|
@Param("eventArguments") String eventArguments,
|
||||||
|
@Param("eventResult") String eventResult,
|
||||||
@Param("isError") boolean isError,
|
@Param("isError") boolean isError,
|
||||||
@Param("error") String error);
|
@Param("error") String error);
|
||||||
|
|
||||||
|
|||||||
@ -308,6 +308,8 @@ public class JpaBaseEventDao implements EventDao {
|
|||||||
eventFilter.getEntityType(),
|
eventFilter.getEntityType(),
|
||||||
eventFilter.getMsgId(),
|
eventFilter.getMsgId(),
|
||||||
eventFilter.getMsgType(),
|
eventFilter.getMsgType(),
|
||||||
|
eventFilter.getArguments(),
|
||||||
|
eventFilter.getResult(),
|
||||||
eventFilter.isError(),
|
eventFilter.isError(),
|
||||||
eventFilter.getErrorStr(),
|
eventFilter.getErrorStr(),
|
||||||
DaoUtil.toPageable(pageLink, EventEntity.eventColumnMap)));
|
DaoUtil.toPageable(pageLink, EventEntity.eventColumnMap)));
|
||||||
@ -401,6 +403,8 @@ public class JpaBaseEventDao implements EventDao {
|
|||||||
eventFilter.getEntityType(),
|
eventFilter.getEntityType(),
|
||||||
eventFilter.getMsgId(),
|
eventFilter.getMsgId(),
|
||||||
eventFilter.getMsgType(),
|
eventFilter.getMsgType(),
|
||||||
|
eventFilter.getArguments(),
|
||||||
|
eventFilter.getResult(),
|
||||||
eventFilter.isError(),
|
eventFilter.isError(),
|
||||||
eventFilter.getErrorStr());
|
eventFilter.getErrorStr());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user