Skip to content

Commit

Permalink
Merge pull request #30 from YoussefDahi/develop
Browse files Browse the repository at this point in the history
edit :
  • Loading branch information
usfalami authored Oct 9, 2023
2 parents 6b384b9 + 10e5066 commit 220278d
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 184 deletions.
1 change: 0 additions & 1 deletion src/main/java/org/usf/trace/api/server/ApiController.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public List<ApiSession> getIncomingRequestByCriteria(
@RequestParam(required = false, name = "start") Instant start,
@RequestParam(required = false, name = "end") Instant end ){ // without tree
FilterCriteria fc = new FilterCriteria(id,name,env,port,null,start,end);
System.out.println(fc.toString());
return dao.getIncomingRequestByCriteria(lazy,fc);
}

Expand Down
168 changes: 84 additions & 84 deletions src/main/java/org/usf/trace/api/server/config/DataConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,118 +20,118 @@ public final class DataConstants {

public static String sessionColumns(TraceApiColumn column) {
switch (column) {
case ID: return "ID_SES";
case NAME: return "VA_NAME";
case START: return "DH_DBT";
case END: return "DH_FIN";
case USER: return "VA_USR";
case OS: return "VA_OS";
case RE: return "VA_RE";
case TYPE: return "LNCH";
case LOCATION: return "LOC";
case THREAD: return "VA_THRED";
case APP_NAME: return "VA_APP_NME";
case VERSION: return "VA_VRS";
case ADDRESS: return "VA_ADRS";
case ENVIRONEMENT: return "VA_ENV";
case ERR_TYPE: return "VA_ERR_CLS";
case ERR_MSG: return "VA_ERR_MSG";
case ID: return "id_ses";
case NAME: return "va_name";
case START: return "dh_dbt";
case END: return "dh_fin";
case USER: return "va_usr";
case OS: return "va_os";
case RE: return "va_re";
case TYPE: return "lnch";
case LOCATION: return "loc";
case THREAD: return "va_thred";
case APP_NAME: return "va_app_nme";
case VERSION: return "va_vrs";
case ADDRESS: return "va_adrs";
case ENVIRONEMENT: return "va_env";
case ERR_TYPE: return "va_err_cls";
case ERR_MSG: return "va_err_msg";
default: return null;
}
}

public static String incReqColumns(TraceApiColumn column) {
switch (column) {
case ID: return "ID_SES";
case METHOD: return "VA_MTH";
case PROTOCOL: return "VA_PRTCL";
case HOST: return "VA_HST";
case PORT: return "CD_PRT";
case PATH: return "VA_PTH";
case QUERY: return "VA_QRY";
case MEDIA: return "VA_CNT_TYP";
case AUTH: return "VA_AUTH";
case STATUS: return "CD_STT";
case SIZE_IN: return "VA_I_SZE";
case SIZE_OUT: return "VA_O_SZE";
case START: return "DH_DBT";
case END: return "DH_FIN";
case THREAD: return "VA_THRED";
case API_NAME: return "VA_API_NME";
case USER: return "VA_USR";
case APP_NAME: return "VA_APP_NME";
case VERSION: return "VA_VRS";
case ADDRESS: return "VA_ADRS";
case ENVIRONEMENT: return "VA_ENV";
case OS: return "VA_OS";
case RE: return "VA_RE";
case ID: return "id_ses";
case METHOD: return "va_mth";
case PROTOCOL: return "va_prtcl";
case HOST: return "va_hst";
case PORT: return "cd_prt";
case PATH: return "va_pth";
case QUERY: return "va_qry";
case MEDIA: return "va_cnt_typ";
case AUTH: return "va_auth";
case STATUS: return "cd_stt";
case SIZE_IN: return "va_i_sze";
case SIZE_OUT: return "va_o_sze";
case START: return "dh_dbt";
case END: return "dh_fin";
case THREAD: return "va_thred";
case API_NAME: return "va_api_nme";
case USER: return "va_usr";
case APP_NAME: return "va_app_nme";
case VERSION: return "va_vrs";
case ADDRESS: return "va_adrs";
case ENVIRONEMENT: return "va_env";
case OS: return "va_os";
case RE: return "va_re";
default: return null;
}
}

public static String outReqColumns(TraceApiColumn column) {
switch (column) {
case ID: return "CD_API";
case METHOD: return "VA_MTH";
case PROTOCOL: return "VA_PRTCL";
case HOST: return "VA_HST";
case PORT: return "CD_PRT";
case PATH: return "VA_PTH";
case QUERY: return "VA_QRY";
case MEDIA: return "VA_CNT_TYP";
case AUTH: return "VA_AUTH";
case STATUS: return "CD_STT";
case SIZE_IN: return "VA_I_SZE";
case SIZE_OUT: return "VA_O_SZE";
case START: return "DH_DBT";
case END: return "DH_FIN";
case THREAD: return "VA_THRED";
case PARENT: return "CD_SES";
case ID: return "cd_api";
case METHOD: return "va_mth";
case PROTOCOL: return "va_prtcl";
case HOST: return "va_hst";
case PORT: return "cd_prt";
case PATH: return "va_pth";
case QUERY: return "va_qry";
case MEDIA: return "va_cnt_typ";
case AUTH: return "va_auth";
case STATUS: return "cd_stt";
case SIZE_IN: return "va_i_sze";
case SIZE_OUT: return "va_o_sze";
case START: return "dh_dbt";
case END: return "dh_fin";
case THREAD: return "va_thred";
case PARENT: return "cd_ses";
default: return null;
}
}
public static String outQryColumns(TraceApiColumn column) {
switch (column){
case ID: return "ID_OUT_QRY";
case HOST: return "VA_HST";
case PORT: return "CD_PRT";
case SCHEMA: return "VA_SCHMA";
case START: return "DH_DBT";
case END: return "DH_FIN";
case USER: return "VA_USR";
case THREAD: return "VA_THRED";
case DRIVER: return "VA_DRV";
case DB_NAME: return "VA_DB_NME";
case DB_VERSION: return "VA_DB_VRS";
case COMPLETE: return "VA_CMPLT";
case PARENT: return "CD_SES";
case ID: return "id_out_qry";
case HOST: return "va_hst";
case PORT: return "cd_prt";
case SCHEMA: return "va_schma";
case START: return "dh_dbt";
case END: return "dh_fin";
case USER: return "va_usr";
case THREAD: return "va_thred";
case DRIVER: return "va_drv";
case DB_NAME: return "va_db_nme";
case DB_VERSION: return "va_db_vrs";
case COMPLETE: return "va_cmplt";
case PARENT: return "cd_ses";
default: return null;
}
}

public static String outStgColumns(TraceApiColumn column) {
switch (column){
case NAME: return "VA_NAME";
case LOCATION: return "LOC";
case START: return "DH_DBT";
case END: return "DH_FIN";
case USER: return "VA_USR";
case THREAD: return "VA_THRED";
case ERR_TYPE: return "VA_ERR_CLS";
case ERR_MSG: return "VA_ERR_MSG";
case PARENT: return "CD_SES";
default: return null;
case NAME: return "va_name";
case LOCATION: return "loc";
case START: return "dh_dbt";
case END: return "dh_fin";
case USER: return "va_usr";
case THREAD: return "va_thred";
case ERR_TYPE: return "va_err_cls";
case ERR_MSG: return "va_err_msg";
case PARENT: return "cd_ses";
default: return null;
}
}

public static String dbActColumns(TraceApiColumn column){
switch (column){
case TYPE: return"VA_TYP";
case START: return "DH_DBT";
case END: return "DH_FIN";
case ERR_TYPE: return "VA_ERR_CLS";
case ERR_MSG: return "VA_ERR_MSG";
case PARENT: return "CD_OUT_QRY";
case TYPE: return "va_typ";
case START: return "dh_dbt";
case END: return "dh_fin";
case ERR_TYPE: return "va_err_cls";
case ERR_MSG: return "va_err_msg";
case PARENT: return "cd_out_qry";
default: return null;
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/usf/trace/api/server/config/TraceApiTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
@RequiredArgsConstructor
public enum TraceApiTable implements TableDecorator {

OUT("E_API_REQ", DataConstants::outReqColumns),
REQUEST("E_API_SES", DataConstants::incReqColumns),
SESSION("E_MAIN_SES", DataConstants::sessionColumns),
QUERY("E_DB_REQ",DataConstants::outQryColumns),
STAGES("E_STG",DataConstants::outStgColumns),
DBACTION("E_DB_ACT",DataConstants::dbActColumns);
OUT("e_api_req", DataConstants::outReqColumns),
REQUEST("e_api_ses", DataConstants::incReqColumns),
SESSION("e_main_ses", DataConstants::sessionColumns),
QUERY("e_db_req",DataConstants::outQryColumns),
STAGES("e_stg",DataConstants::outStgColumns),
DBACTION("e_db_act",DataConstants::dbActColumns);

@NonNull
private final String tableName;
Expand Down
Loading

0 comments on commit 220278d

Please sign in to comment.