MessageDto instead of String in Event history

This commit is contained in:
Szakalakamaka
2020-11-19 10:14:51 +01:00
parent 56baf9641e
commit 52893c2888
18 changed files with 84 additions and 74 deletions

85
.idea/workspace.xml generated
View File

@@ -26,12 +26,19 @@
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/EventController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/EventController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/KlausController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/KlausController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/model/Event.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/model/Event.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepositoryImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepositoryImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/service/KlausServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/service/KlausServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/logback.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/logback.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/static/js/etrackPaggination.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/static/js/etrackPaggination.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/templates/etrack.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/etrack.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/controller/EventController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/controller/EventController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/controller/KlausController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/controller/KlausController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/model/Event$EventBuilder.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/model/Event$EventBuilder.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/model/Event.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/model/Event.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/repository/EventRepositoryImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/repository/EventRepositoryImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/service/KlausServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/service/KlausServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/logback.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/logback.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/static/js/etrackPaggination.js" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/static/js/etrackPaggination.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@@ -292,13 +299,6 @@
<option name="presentableId" value="Default" />
<updated>1598862102028</updated>
</task>
<task id="LOCAL-00068" summary="moving docker to a separate package">
<created>1601380914561</created>
<option name="number" value="00068" />
<option name="presentableId" value="LOCAL-00068" />
<option name="project" value="LOCAL" />
<updated>1601380914561</updated>
</task>
<task id="LOCAL-00069" summary="moving docker to a separate package">
<created>1601381175986</created>
<option name="number" value="00069" />
@@ -635,7 +635,14 @@
<option name="project" value="LOCAL" />
<updated>1604770061650</updated>
</task>
<option name="localTasksCounter" value="117" />
<task id="LOCAL-00117" summary="MessageDto instead of String in Event history">
<created>1605708181861</created>
<option name="number" value="00117" />
<option name="presentableId" value="LOCAL-00117" />
<option name="project" value="LOCAL" />
<updated>1605708181861</updated>
</task>
<option name="localTasksCounter" value="118" />
<servers />
</component>
<component name="UnknownFeatures">
@@ -655,7 +662,6 @@
</component>
<component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="fabric8" />
<MESSAGE value="updating Dockerfile, adding fabric8" />
<MESSAGE value="testing docker jenkins" />
<MESSAGE value="testing docker - jenkins" />
@@ -680,7 +686,8 @@
<MESSAGE value="changing eureka address" />
<MESSAGE value="cleaning properties" />
<MESSAGE value="front-end update" />
<option name="LAST_COMMIT_MESSAGE" value="front-end update" />
<MESSAGE value="MessageDto instead of String in Event history" />
<option name="LAST_COMMIT_MESSAGE" value="MessageDto instead of String in Event history" />
</component>
<component name="WindowStateProjectService">
<state x="904" y="236" key="#Notifications" timestamp="1600868491636">
@@ -743,68 +750,68 @@
<state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824/1920.0.1920.1160@0.0.1536.824" timestamp="1602662342585" />
<state x="2606" y="235" key="FileChooserDialogImpl/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1604501503902" />
<state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1602147205037" />
<state width="1877" height="227" key="GridCell.Tab.0.bottom" timestamp="1605706977407">
<state width="1877" height="267" key="GridCell.Tab.0.bottom" timestamp="1605721034181">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="239" key="GridCell.Tab.0.bottom/-1920.0.1536.832/0.0.1920.1040@0.0.1920.1040" timestamp="1600275797041" />
<state width="1493" height="99" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605701721838" />
<state width="1877" height="227" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605706977407" />
<state width="1877" height="267" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605721034181" />
<state width="1493" height="89" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1160@0.0.1536.824" timestamp="1604916507124" />
<state width="1877" height="315" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1604501251887" />
<state width="1493" height="185" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1605634220571" />
<state width="1877" height="227" key="GridCell.Tab.0.center" timestamp="1605706977407">
<state width="1877" height="267" key="GridCell.Tab.0.center" timestamp="1605721034181">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="239" key="GridCell.Tab.0.center/-1920.0.1536.832/0.0.1920.1040@0.0.1920.1040" timestamp="1600275797041" />
<state width="1493" height="99" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605701721838" />
<state width="1877" height="227" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605706977407" />
<state width="1877" height="267" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605721034181" />
<state width="1493" height="89" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1160@0.0.1536.824" timestamp="1604916507123" />
<state width="1877" height="315" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1604501251887" />
<state width="1493" height="185" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1605634220571" />
<state width="1877" height="227" key="GridCell.Tab.0.left" timestamp="1605706977407">
<state width="1877" height="267" key="GridCell.Tab.0.left" timestamp="1605721034181">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="239" key="GridCell.Tab.0.left/-1920.0.1536.832/0.0.1920.1040@0.0.1920.1040" timestamp="1600275797041" />
<state width="1493" height="99" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605701721838" />
<state width="1877" height="227" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605706977407" />
<state width="1877" height="267" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605721034181" />
<state width="1493" height="89" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1160@0.0.1536.824" timestamp="1604916507123" />
<state width="1877" height="315" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1604501251887" />
<state width="1493" height="185" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1605634220570" />
<state width="1877" height="227" key="GridCell.Tab.0.right" timestamp="1605706977407">
<state width="1877" height="267" key="GridCell.Tab.0.right" timestamp="1605721034181">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="1877" height="239" key="GridCell.Tab.0.right/-1920.0.1536.832/0.0.1920.1040@0.0.1920.1040" timestamp="1600275797041" />
<state width="1493" height="99" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605701721838" />
<state width="1877" height="227" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605706977407" />
<state width="1877" height="267" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605721034181" />
<state width="1493" height="89" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1160@0.0.1536.824" timestamp="1604916507123" />
<state width="1877" height="315" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1604501251887" />
<state width="1493" height="185" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1605634220571" />
<state width="1877" height="40" key="GridCell.Tab.1.bottom" timestamp="1605705726263">
<state width="1877" height="267" key="GridCell.Tab.1.bottom" timestamp="1605721061519">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="1493" height="67" key="GridCell.Tab.1.bottom/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605699975611" />
<state width="1877" height="40" key="GridCell.Tab.1.bottom/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605705726263" />
<state width="1877" height="267" key="GridCell.Tab.1.bottom/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605721061519" />
<state width="1877" height="297" key="GridCell.Tab.1.bottom/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1602672852817" />
<state width="1493" height="252" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1605633861934" />
<state width="1877" height="40" key="GridCell.Tab.1.center" timestamp="1605705726263">
<state width="1877" height="267" key="GridCell.Tab.1.center" timestamp="1605721061519">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="1493" height="67" key="GridCell.Tab.1.center/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605699975610" />
<state width="1877" height="40" key="GridCell.Tab.1.center/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605705726263" />
<state width="1877" height="267" key="GridCell.Tab.1.center/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605721061519" />
<state width="1877" height="297" key="GridCell.Tab.1.center/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1602672852817" />
<state width="1493" height="252" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1605633861934" />
<state width="1877" height="40" key="GridCell.Tab.1.left" timestamp="1605705726262">
<state width="1877" height="267" key="GridCell.Tab.1.left" timestamp="1605721061519">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="1493" height="67" key="GridCell.Tab.1.left/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605699975610" />
<state width="1877" height="40" key="GridCell.Tab.1.left/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605705726262" />
<state width="1877" height="267" key="GridCell.Tab.1.left/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605721061519" />
<state width="1877" height="297" key="GridCell.Tab.1.left/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1602672852817" />
<state width="1493" height="252" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1605633861934" />
<state width="1877" height="40" key="GridCell.Tab.1.right" timestamp="1605705726263">
<state width="1877" height="267" key="GridCell.Tab.1.right" timestamp="1605721061519">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="1493" height="67" key="GridCell.Tab.1.right/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605699975611" />
<state width="1877" height="40" key="GridCell.Tab.1.right/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605705726263" />
<state width="1877" height="267" key="GridCell.Tab.1.right/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605721061519" />
<state width="1877" height="297" key="GridCell.Tab.1.right/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1602672852817" />
<state width="1493" height="252" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1605633861934" />
<state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1598862685882">
@@ -834,11 +841,11 @@
<state x="361" y="145" key="Vcs.Push.Dialog.v2/0.0.1536.824/1920.0.1920.1160@0.0.1536.824" timestamp="1604494473937" />
<state x="2371" y="204" key="Vcs.Push.Dialog.v2/0.0.1536.824/1920.0.1920.1160@1920.0.1920.1160" timestamp="1604499402409" />
<state x="361" y="145" key="Vcs.Push.Dialog.v2/0.0.1536.824@0.0.1536.824" timestamp="1602145235569" />
<state width="775" height="419" key="XDebugger.FullValuePopup" timestamp="1605697810993">
<screen x="0" y="0" width="1536" height="824" />
<state width="968" height="528" key="XDebugger.FullValuePopup" timestamp="1605717895740">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state width="775" height="419" key="XDebugger.FullValuePopup/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1605697810993" />
<state width="968" height="528" key="XDebugger.FullValuePopup/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605694291421" />
<state width="968" height="528" key="XDebugger.FullValuePopup/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605717895740" />
<state x="2595" y="262" key="com.intellij.testIntegration.createTest.CreateTestDialog" timestamp="1604313748925">
<screen x="1920" y="0" width="1920" height="1160" />
</state>
@@ -858,12 +865,12 @@
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="499" y="170" key="refactoring.ChangeSignatureDialog/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599668344218" />
<state x="2451" y="236" key="run.anything.popup" timestamp="1605696334550">
<state x="2451" y="236" key="run.anything.popup" timestamp="1605716394224">
<screen x="1920" y="0" width="1920" height="1040" />
</state>
<state x="531" y="236" key="run.anything.popup/-1920.0.1536.832/0.0.1920.1040@0.0.1920.1040" timestamp="1600270936259" />
<state x="425" y="187" key="run.anything.popup/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599846632766" />
<state x="2451" y="236" key="run.anything.popup/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605696334550" />
<state x="2451" y="236" key="run.anything.popup/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1605716394224" />
<state x="425" y="187" key="run.anything.popup/0.0.1536.824@0.0.1536.824" timestamp="1601461825087" />
<state x="2459" y="204" width="840" height="955" key="search.everywhere.popup" timestamp="1603984139797">
<screen x="1920" y="0" width="1920" height="1160" />
@@ -877,27 +884,29 @@
<breakpoints>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepositoryImpl.java</url>
<line>38</line>
<line>40</line>
<option name="timeStamp" value="20" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepositoryImpl.java</url>
<line>42</line>
<line>44</line>
<properties>
<option name="lambda-ordinal" value="-1" />
</properties>
<option name="timeStamp" value="21" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/release11/klaus/service/EtrackServiceImpl.java</url>
<line>28</line>
<option name="timeStamp" value="22" />
<url>file://$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/KlausController.java</url>
<line>61</line>
<option name="timeStamp" value="36" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
<watches-manager>
<configuration name="Application">
<watch expression="eventString.hash" />
<watch expression="s2" language="JAVA" />
<watch expression="s" />
</configuration>
</watches-manager>
</component>

View File

@@ -14,7 +14,6 @@ import javax.validation.Valid;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
@@ -27,7 +26,6 @@ public class EventController {
private final EtrackService etrackService;
private final List<Event> eventList = new LinkedList<>();
private final List<String> messageDtoList = new ArrayList<>();
@GetMapping("/etrack/{uuid}")
public String showEtrack(@Valid EventRequestDto eventRequestDto, @PathVariable UUID uuid, final Model model,
@@ -49,11 +47,8 @@ public class EventController {
if (updateList){
eventList.clear();
eventList.addAll(etrackService.getEventsByDateTimeAndBusinessKeys(eventRequestDto));
eventList.forEach(event -> messageDtoList.add(String.valueOf(event.getMessage())));
}
model.addAttribute("eventList", eventList);
model.addAttribute("messageDtoList", messageDtoList);
}
@ModelAttribute("eventRequestDto")

View File

@@ -55,15 +55,20 @@ public class KlausController {
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "getMockedResponse - request",
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseId)));
// MockedMessageDto.builder()
// .httpHeaders(requestEntity.getHeaders().toSingleValueMap())
// .httpStatus(requestEntity.)
// .messageBody()
// .mediaType()
// .mockedResponseId(mockedResponseId)
// .clientUUID(clientUUID)
// .build();
// log.info(objectMapper.writeValueAsString(mockedMessageDto));
String s = requestEntity.toString();
String s2 = String.valueOf(requestEntity).replaceAll("\"", "\\\\\"");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:");
log.info("<GET http://localhost:8098/klaus/v1/get/c82c47a8-c4c3-4e1b-91a4-f06c1fdd7066/1,[accept-encoding:\"gzip,deflate\", host:\"localhost:8098\", connection:\"Keep-Alive\", user-agent:\"Apache-HttpClient/4.5.5 (Java/12.0.1)\"]>");
log.info(requestEntity.toString().replaceAll("\"", "\\\\\""));
// log.info(requestEntity.toString().replaceAll("\"", "\\\\\""));
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "getMockedResponse - response",
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseId)));

View File

@@ -24,5 +24,5 @@ public class Event {
private String thread;
private String level;
@Nullable
private MockedMessageDto message;
private String message;
}

View File

@@ -5,6 +5,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.release11.klaus.model.Event;
import com.release11.klaus.utilis.BusinessKey;
import lombok.AllArgsConstructor;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.springframework.stereotype.Repository;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
@@ -61,8 +63,11 @@ public class EventRepositoryImpl implements EventRepository {
List<Event> events = new ArrayList<>();
for (String eventString : eventStrings) {
try {
eventString = eventString.replaceAll("\\R", "");
events.add(objectMapper.readValue(eventString, Event.class));
} catch (JsonProcessingException e) {
JSONObject jsonObject = new JSONObject(eventString);
} catch (JsonProcessingException | JSONException e) {
e.printStackTrace();
}
}

View File

@@ -30,10 +30,8 @@ public class KlausServiceImpl implements KlausService {
@Override
public void deleteMockedResponse(UUID clientUUID, int mockedResponseId) {
String key = clientUUID.toString() + "_" + mockedResponseId;
MockedMessage mockedMessage =
mockedResponseRepository.getByCompositePrimaryKey(clientUUID.toString() + "_" + mockedResponseId);
mockedResponseRepository.deleteById(key);
log.info(String.valueOf(mockedMessageMapper.mockedMessageToMockedMessageDto(mockedMessage)));
log.info("Message " + mockedResponseId + " has been removed.");
}
@Override
@@ -51,18 +49,22 @@ public class KlausServiceImpl implements KlausService {
MockedMessageDto mockedMessageDto = KlausMvcController.getGlobalMockedMessageDto();
if (optionalMockedMessage.isPresent()) {
mockedMessageDto = mockedMessageMapper.mockedMessageToMockedMessageDto(optionalMockedMessage.get());
log.info(objectMapper.writeValueAsString(mockedMessageDto));
log.info(mockedMessageDto.toString().replaceAll("\"", "\\\\\""));
return mockedMessageDto;
}
log.info(mockedMessageDto.toString());
log.info(mockedMessageDto.toString().replaceAll("\"", "\\\\\""));
return mockedMessageDto;
}
@SneakyThrows
@Override
public ResponseEntity<String> setMockedResponse(MockedMessageDto mockedMessageDto) {
mockedResponseRepository.save(mockedMessageMapper.mockedMessageDtoToMockedMessage(mockedMessageDto));
log.info(objectMapper.writeValueAsString(mockedMessageDto));
String s = objectMapper.writeValueAsString(mockedMessageDto);
String s1 = mockedMessageDto.toString();
String s2 = String.valueOf(mockedMessageDto);
log.info(mockedMessageDto.toString().replaceAll("\"", "\\\\\""));
return new ResponseEntity<>("MockedResponse has been setup successfully!", new HttpHeaders(),
HttpStatus.ACCEPTED);
}

View File

@@ -9,7 +9,7 @@
<layout class="ch.qos.logback.classic.PatternLayout">
<!--https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html-->
<Pattern>
{"dateTimeStamp" : "%d{yyyy-MM-dd}T%d{HH:mm:ss}", "eventId":"%X{eventId}", "interfaceName":"%X{interfaceName}", "clientUUID":"%X{clientUUID}", "messageId":"%X{messageId}", "thread":"%t","level":"%-5level", "message":%msg}%n
{"dateTimeStamp" : "%d{yyyy-MM-dd}T%d{HH:mm:ss}", "eventId":"%X{eventId}", "interfaceName":"%X{interfaceName}", "clientUUID":"%X{clientUUID}", "messageId":"%X{messageId}", "thread":"%t","level":"%-5level", "message":"%msg"}%n
</Pattern>
</layout>
</appender>

View File

@@ -13,8 +13,7 @@ var state = {
'window': 5,
}
var myList, data, previousSort, messageList;
messageList = messageListForPagination;
var myList, data, previousSort;
state.querySet = listForPagination;
buildTable();
@@ -101,6 +100,7 @@ function showTable() {
var table = $('#table-body')
table.empty();
var color;
console.log(myList);
for (var i = 1; i <= myList.length; i++) {
var j = i + (state.page - 1) * 10;
i % 2 === 0 ? color = "#b3ffff" : color="#e6ffff";
@@ -111,7 +111,7 @@ function showTable() {
<td>${myList[i-1].interfaceName}</td>
</tr>
<tr bgcolor="${color}" id="etrack-tr-${j}-body" name="tr-body" hidden>
<td colspan="4">"${messageList[i-1]}"</td>
<td colspan="4">"${JSON.stringify(myList[i-1])}"</td>
</tr>`
table.append(row)

View File

@@ -84,9 +84,6 @@ $.get("https://raw.githubusercontent.com/Szakalakamaka/viewpresenter/master/src/
});
</script>
<script type="text/javascript" th:inline="javascript">
var messageListForPagination = /*[[${messageDtoList}]]*/;
</script>
<script type="text/javascript" th:inline="javascript">
var listForPagination = /*[[${eventList}]]*/;
</script>
<script src="/js/etrackPaggination.js"></script>

View File

@@ -9,7 +9,7 @@
<layout class="ch.qos.logback.classic.PatternLayout">
<!--https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html-->
<Pattern>
{"dateTimeStamp" : "%d{yyyy-MM-dd}T%d{HH:mm:ss}", "eventId":"%X{eventId}", "interfaceName":"%X{interfaceName}", "clientUUID":"%X{clientUUID}", "messageId":"%X{messageId}", "thread":"%t","level":"%-5level", "message":%msg}%n
{"dateTimeStamp" : "%d{yyyy-MM-dd}T%d{HH:mm:ss}", "eventId":"%X{eventId}", "interfaceName":"%X{interfaceName}", "clientUUID":"%X{clientUUID}", "messageId":"%X{messageId}", "thread":"%t","level":"%-5level", "message":"%msg"}%n
</Pattern>
</layout>
</appender>

View File

@@ -13,8 +13,7 @@ var state = {
'window': 5,
}
var myList, data, previousSort, messageList;
messageList = messageListForPagination;
var myList, data, previousSort;
state.querySet = listForPagination;
buildTable();
@@ -101,6 +100,7 @@ function showTable() {
var table = $('#table-body')
table.empty();
var color;
console.log(myList);
for (var i = 1; i <= myList.length; i++) {
var j = i + (state.page - 1) * 10;
i % 2 === 0 ? color = "#b3ffff" : color="#e6ffff";
@@ -111,7 +111,7 @@ function showTable() {
<td>${myList[i-1].interfaceName}</td>
</tr>
<tr bgcolor="${color}" id="etrack-tr-${j}-body" name="tr-body" hidden>
<td colspan="4">"${messageList[i-1]}"</td>
<td colspan="4">"${JSON.stringify(myList[i-1])}"</td>
</tr>`
table.append(row)

View File

@@ -84,9 +84,6 @@ $.get("https://raw.githubusercontent.com/Szakalakamaka/viewpresenter/master/src/
});
</script>
<script type="text/javascript" th:inline="javascript">
var messageListForPagination = /*[[${messageDtoList}]]*/;
</script>
<script type="text/javascript" th:inline="javascript">
var listForPagination = /*[[${eventList}]]*/;
</script>
<script src="/js/etrackPaggination.js"></script>