diff --git a/src/main/java/org/usf/inspect/server/config/TraceApiColumn.java b/src/main/java/org/usf/inspect/server/config/TraceApiColumn.java index 735826d..84a9361 100644 --- a/src/main/java/org/usf/inspect/server/config/TraceApiColumn.java +++ b/src/main/java/org/usf/inspect/server/config/TraceApiColumn.java @@ -82,6 +82,7 @@ public enum TraceApiColumn implements ColumnDecorator { COUNT_ERROR_CLIENT("countClientErrorRows", FilterConstant::countClientErrorStatus), COUNT_ERROR_SERVER("countServerErrorRows", FilterConstant::countServerErrorStatus), + COUNT_UNAVAILABLE_SERVER("countServerUnavailableRows", FilterConstant::countServerUnavailableStatus), COUNT_SUCCES("countSuccesRows", FilterConstant::countSuccesStatus), COUNT_200("count200", FilterConstant::countStatus200), //set type improve perf COUNT_400("count400", FilterConstant::countStatus400), diff --git a/src/main/java/org/usf/inspect/server/config/constant/FilterConstant.java b/src/main/java/org/usf/inspect/server/config/constant/FilterConstant.java index ade9a4e..f92f9cf 100644 --- a/src/main/java/org/usf/inspect/server/config/constant/FilterConstant.java +++ b/src/main/java/org/usf/inspect/server/config/constant/FilterConstant.java @@ -85,6 +85,10 @@ public static OperationColumn countServerErrorStatus(ViewDecorator table) { return countStatusByType(table, ge(500)); } + public static OperationColumn countServerUnavailableStatus(ViewDecorator table) { + return countStatusByType(table, eq(0)); + } + public static OperationColumn countSuccesStatus(ViewDecorator table) { return countStatusByType(table, ge(200).and(lt(300))); } diff --git a/src/main/java/org/usf/inspect/server/config/constant/JoinConstant.java b/src/main/java/org/usf/inspect/server/config/constant/JoinConstant.java index 5197df6..fa1cb15 100644 --- a/src/main/java/org/usf/inspect/server/config/constant/JoinConstant.java +++ b/src/main/java/org/usf/inspect/server/config/constant/JoinConstant.java @@ -43,12 +43,12 @@ public class JoinConstant { public static final String SMTP_REQUEST_JOIN = "smtp_request"; public static final String LDAP_REQUEST_JOIN = "ldap_request"; - // public static final String - public static JoinBuilder mainSessionJoins(String name) { return switch (name) { case INSTANCE_JOIN -> () -> new ViewJoin[]{innerJoin(INSTANCE.view(), MAIN_SESSION.column(INSTANCE_ENV).eq(INSTANCE.column(ID)))}; + case REST_REQUEST_JOIN -> + () -> new ViewJoin[]{innerJoin(REST_REQUEST.view(), MAIN_SESSION.column(ID).eq(REST_REQUEST.column(PARENT)))}; default -> null; }; }