your messages table with update, delete buttons
This commit is contained in:
1
.idea/dictionaries/lomba.xml
generated
1
.idea/dictionaries/lomba.xml
generated
@@ -2,7 +2,6 @@
|
||||
<dictionary name="lomba">
|
||||
<words>
|
||||
<w>logstashes</w>
|
||||
<w>paggination</w>
|
||||
<w>workdir</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: io.projectreactor:reactor-test:3.3.6.RELEASE">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/projectreactor/reactor-test/3.3.6.RELEASE/reactor-test-3.3.6.RELEASE.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/projectreactor/reactor-test/3.3.6.RELEASE/reactor-test-3.3.6.RELEASE-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/projectreactor/reactor-test/3.3.6.RELEASE/reactor-test-3.3.6.RELEASE-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -1,13 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: jakarta.persistence:jakarta.persistence-api:2.2.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -1,13 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: net.logstash.logback:logstash-logback-encoder:6.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/net/logstash/logback/logstash-logback-encoder/6.4/logstash-logback-encoder-6.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/net/logstash/logback/logstash-logback-encoder/6.4/logstash-logback-encoder-6.4-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/net/logstash/logback/logstash-logback-encoder/6.4/logstash-logback-encoder-6.4-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -1,13 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.springframework.boot:spring-boot-starter-data-redis-reactive:2.3.1.RELEASE">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis-reactive/2.3.1.RELEASE/spring-boot-starter-data-redis-reactive-2.3.1.RELEASE.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis-reactive/2.3.1.RELEASE/spring-boot-starter-data-redis-reactive-2.3.1.RELEASE-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis-reactive/2.3.1.RELEASE/spring-boot-starter-data-redis-reactive-2.3.1.RELEASE-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -1,13 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.springframework.data:spring-data-redis:2.2.6.RELEASE">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/2.2.6.RELEASE/spring-data-redis-2.2.6.RELEASE.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/2.2.6.RELEASE/spring-data-redis-2.2.6.RELEASE-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/2.2.6.RELEASE/spring-data-redis-2.2.6.RELEASE-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
185
.idea/workspace.xml
generated
185
.idea/workspace.xml
generated
@@ -20,30 +20,14 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="458cde88-df3d-44bc-9d57-a33823e2f1a6" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_5.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_3_1_RELEASE.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/target/classes/static/js/paggination.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Klaus.iml" beforeDir="false" afterPath="$PROJECT_DIR$/Klaus.iml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/KlausMvcController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/KlausMvcController.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/img/avataaars.svg" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/img/favicon.ico" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/img/portfolio/cabin.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/img/portfolio/cake.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/img/portfolio/circus.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/img/portfolio/game.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/img/portfolio/safe.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/img/portfolio/submarine.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/mail/contact_me.js" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/mail/contact_me.php" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/assets/mail/jqBootstrapValidation.js" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/css/styles.css" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/index.html" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/startbootstrap-freelancer-gh-pages/js/scripts.js" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/target/classes/META-INF/Klaus.kotlin_module" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/controller/KlausMvcController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/controller/KlausMvcController.class" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/target/generated-sources/annotations/com/release11/klaus/mappers/MockedMessageMapperImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/target/generated-sources/annotations/com/release11/klaus/mappers/MockedMessageMapperImpl.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/model/EventRequestDto$EventRequestDtoBuilder.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/model/EventRequestDto$EventRequestDtoBuilder.class" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/model/EventRequestDto.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/model/EventRequestDto.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/EtrackServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/service/EtrackServiceImpl.class" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/target/classes/static/js/paggination.js" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/static/js/paggination.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/target/classes/templates/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/templates/index.html" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/target/test-classes/com/release11/klaus/KlausApplicationTests.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/com/release11/klaus/KlausApplicationTests.class" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -82,7 +66,8 @@
|
||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/main/resources/static/img" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="restartRequiresConfirmation" value="false" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CreateClassDialog.RecentsKey">
|
||||
@@ -194,9 +179,9 @@
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Application.KlausApplication" />
|
||||
<item itemvalue="JUnit.KlausApplicationTests.contextLoads" />
|
||||
<item itemvalue="JUnit.MockedResponseRedisRepositoryTest.setMockedResponse" />
|
||||
<item itemvalue="JUnit.RedisConfigTest.jedisPool" />
|
||||
<item itemvalue="JUnit.KlausApplicationTests.contextLoads" />
|
||||
<item itemvalue="JUnit.MockedResponseRedisRepositoryTest.getMockedResponse" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
@@ -401,7 +386,35 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1599641271632</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="28" />
|
||||
<task id="LOCAL-00028" summary="allmessages visible after addheader, removeheader operations">
|
||||
<created>1599650846480</created>
|
||||
<option name="number" value="00028" />
|
||||
<option name="presentableId" value="LOCAL-00028" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1599650846480</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00029" summary="new operation delete message">
|
||||
<created>1599658106007</created>
|
||||
<option name="number" value="00029" />
|
||||
<option name="presentableId" value="LOCAL-00029" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1599658106007</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00030" summary="delete and update buttons for all messages table">
|
||||
<created>1599668629804</created>
|
||||
<option name="number" value="00030" />
|
||||
<option name="presentableId" value="LOCAL-00030" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1599668629804</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00031" summary="solved problem with binding lists between thymeleaf and controller added id filter for event searcher">
|
||||
<created>1599739605273</created>
|
||||
<option name="number" value="00031" />
|
||||
<option name="presentableId" value="LOCAL-00031" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1599739605273</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="32" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
@@ -418,9 +431,6 @@
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
||||
<MESSAGE value="renaming package name" />
|
||||
<MESSAGE value="redis spring repo data indexes for redis repo" />
|
||||
<MESSAGE value="adding processes for history search adding custom redis appender" />
|
||||
<MESSAGE value="Adding logic for events" />
|
||||
<MESSAGE value="html form for events" />
|
||||
<MESSAGE value="get events by days" />
|
||||
@@ -442,13 +452,17 @@
|
||||
<MESSAGE value="pageable list for all messages" />
|
||||
<MESSAGE value="implementing buttons for all messages table" />
|
||||
<MESSAGE value="all messages table visible for all controllers" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="all messages table visible for all controllers" />
|
||||
<MESSAGE value="allmessages visible after addheader, removeheader operations" />
|
||||
<MESSAGE value="new operation delete message" />
|
||||
<MESSAGE value="delete and update buttons for all messages table" />
|
||||
<MESSAGE value="solved problem with binding lists between thymeleaf and controller added id filter for event searcher" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="solved problem with binding lists between thymeleaf and controller added id filter for event searcher" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="574" y="128" key="#com.intellij.ide.util.MemberChooser" timestamp="1599550232513">
|
||||
<state x="574" y="128" key="#com.intellij.ide.util.MemberChooser" timestamp="1599641773245">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="574" y="128" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1599550232513" />
|
||||
<state x="574" y="128" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1599641773245" />
|
||||
<state x="432" y="337" key="#com.intellij.refactoring.move.MoveHandler.SelectRefactoringDialog" timestamp="1599492129736">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
@@ -461,79 +475,120 @@
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="178" y="0" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/0.0.1536.824@0.0.1536.824" timestamp="1599551270234" />
|
||||
<state x="499" y="159" key="#com.intellij.refactoring.typeMigration.ui.FailedConversionsDialog" timestamp="1598966629552">
|
||||
<state x="499" y="159" key="#com.intellij.refactoring.typeMigration.ui.FailedConversionsDialog" timestamp="1599721825830">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="499" y="159" key="#com.intellij.refactoring.typeMigration.ui.FailedConversionsDialog/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599721825830" />
|
||||
<state x="499" y="159" key="#com.intellij.refactoring.typeMigration.ui.FailedConversionsDialog/0.0.1536.824@0.0.1536.824" timestamp="1598966629552" />
|
||||
<state x="549" y="167" key="FileChooserDialogImpl" timestamp="1599229212212">
|
||||
<state x="549" y="167" key="FileChooserDialogImpl" timestamp="1599642328449">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1599229212212" />
|
||||
<state width="1493" height="137" key="GridCell.Tab.0.bottom" timestamp="1599641190011">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1599642328449" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.0.bottom" timestamp="1599740809314">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1493" height="124" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599598129320" />
|
||||
<state width="1877" height="221" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599577341126" />
|
||||
<state width="1493" height="277" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599731379317" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.0.bottom/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599740809314" />
|
||||
<state width="1493" height="137" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1599641190011" />
|
||||
<state width="1493" height="137" key="GridCell.Tab.0.center" timestamp="1599641190010">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.0.center" timestamp="1599740809314">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1493" height="124" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599598129320" />
|
||||
<state width="1877" height="221" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599577341126" />
|
||||
<state width="1493" height="277" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599731379317" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.0.center/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599740809314" />
|
||||
<state width="1493" height="137" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1599641190010" />
|
||||
<state width="1493" height="137" key="GridCell.Tab.0.left" timestamp="1599641190010">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.0.left" timestamp="1599740809314">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1493" height="124" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599598129320" />
|
||||
<state width="1877" height="221" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599577341125" />
|
||||
<state width="1493" height="277" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599731379317" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.0.left/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599740809314" />
|
||||
<state width="1493" height="137" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1599641190010" />
|
||||
<state width="1493" height="137" key="GridCell.Tab.0.right" timestamp="1599641190010">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.0.right" timestamp="1599740809314">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1493" height="124" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599598129320" />
|
||||
<state width="1877" height="221" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599577341126" />
|
||||
<state width="1493" height="277" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599731379317" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.0.right/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599740809314" />
|
||||
<state width="1493" height="137" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1599641190010" />
|
||||
<state width="1493" height="180" key="GridCell.Tab.1.bottom" timestamp="1599480862727">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.1.bottom" timestamp="1599740809315">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1493" height="123" key="GridCell.Tab.1.bottom/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599727916741" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.1.bottom/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599740809315" />
|
||||
<state width="1493" height="180" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1599480862727" />
|
||||
<state width="1493" height="180" key="GridCell.Tab.1.center" timestamp="1599480862727">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.1.center" timestamp="1599740809315">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1493" height="123" key="GridCell.Tab.1.center/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599727916741" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.1.center/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599740809315" />
|
||||
<state width="1493" height="180" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1599480862727" />
|
||||
<state width="1493" height="180" key="GridCell.Tab.1.left" timestamp="1599480862727">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.1.left" timestamp="1599740809315">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1493" height="123" key="GridCell.Tab.1.left/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599727916741" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.1.left/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599740809315" />
|
||||
<state width="1493" height="180" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1599480862727" />
|
||||
<state width="1493" height="180" key="GridCell.Tab.1.right" timestamp="1599480862727">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.1.right" timestamp="1599740809315">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1493" height="123" key="GridCell.Tab.1.right/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599727916741" />
|
||||
<state width="1877" height="339" key="GridCell.Tab.1.right/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599740809315" />
|
||||
<state width="1493" height="180" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1599480862727" />
|
||||
<state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1598862685882">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="299" y="67" key="Maven.ArtifactSearchDialog/0.0.1536.824@0.0.1536.824" timestamp="1598862685882" />
|
||||
<state x="361" y="145" key="Vcs.Push.Dialog.v2" timestamp="1599641605158">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
<state x="2371" y="183" key="Vcs.Push.Dialog.v2" timestamp="1599739608235">
|
||||
<screen x="1920" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="361" y="145" key="Vcs.Push.Dialog.v2/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599579111943" />
|
||||
<state x="361" y="145" key="Vcs.Push.Dialog.v2/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599668638300" />
|
||||
<state x="2371" y="183" key="Vcs.Push.Dialog.v2/0.0.1536.824/1920.0.1920.1040@1920.0.1920.1040" timestamp="1599739608235" />
|
||||
<state x="361" y="145" key="Vcs.Push.Dialog.v2/0.0.1536.824@0.0.1536.824" timestamp="1599641605158" />
|
||||
<state x="478" y="145" width="579" height="592" key="find.popup" timestamp="1599562452922">
|
||||
<state x="478" y="145" width="579" height="592" key="find.popup" timestamp="1599656923861">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="478" y="145" width="579" height="592" key="find.popup/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599656923861" />
|
||||
<state x="478" y="145" width="579" height="592" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1599562452922" />
|
||||
<state x="209" y="33" key="new project wizard" timestamp="1598955672188">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="209" y="33" key="new project wizard/0.0.1536.824@0.0.1536.824" timestamp="1598955672188" />
|
||||
<state x="425" y="187" key="run.anything.popup" timestamp="1599590801755">
|
||||
<state x="499" y="170" key="refactoring.ChangeSignatureDialog" timestamp="1599668344218">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="425" y="187" key="run.anything.popup/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599590801755" />
|
||||
<state x="499" y="170" key="refactoring.ChangeSignatureDialog/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599668344218" />
|
||||
<state x="425" y="187" key="run.anything.popup" timestamp="1599665080197">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="425" y="187" key="run.anything.popup/0.0.1536.824/1920.0.1920.1040@0.0.1536.824" timestamp="1599665080197" />
|
||||
<state x="425" y="187" key="run.anything.popup/0.0.1536.824@0.0.1536.824" timestamp="1599552366851" />
|
||||
<state x="431" y="145" width="672" height="678" key="search.everywhere.popup" timestamp="1599210139274">
|
||||
<screen x="0" y="0" width="1536" height="824" />
|
||||
</state>
|
||||
<state x="431" y="145" width="672" height="678" key="search.everywhere.popup/0.0.1536.824@0.0.1536.824" timestamp="1599210139274" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepositoryImpl.java</url>
|
||||
<line>56</line>
|
||||
<option name="timeStamp" value="4" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepositoryImpl.java</url>
|
||||
<line>55</line>
|
||||
<option name="timeStamp" value="5" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepositoryImpl.java</url>
|
||||
<line>52</line>
|
||||
<option name="timeStamp" value="6" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepositoryImpl.java</url>
|
||||
<line>64</line>
|
||||
<option name="timeStamp" value="10" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
</project>
|
||||
@@ -13,10 +13,9 @@ public class KlausApplication {
|
||||
|
||||
}
|
||||
//TODO
|
||||
//TODO history logs; for log indexing - create custom log appender for Redis - in case etrack would be too slow
|
||||
//TODO JedisPool jedisPool = new JedisPool(jedisPoolConfig, redisHost, redisPort, timeout, redisPassword)
|
||||
//TODO JedisPool optimalization https://partners-intl.aliyun.com/help/doc-detail/98726.htm
|
||||
// logging, security, account creation
|
||||
// tracking clients activity, admin panel
|
||||
// use a centralized logging collection tool like logstash for admin panel
|
||||
//TODO split into separate microservices
|
||||
//TODO swagger
|
||||
@@ -2,12 +2,12 @@ package com.release11.klaus.controller;
|
||||
|
||||
|
||||
import com.release11.klaus.model.MockedMessageDto;
|
||||
import com.release11.klaus.service.KlausService;
|
||||
import com.release11.klaus.utilis.BusinessKey;
|
||||
import com.release11.klaus.utilis.TrackingClient;
|
||||
import com.release11.klaus.model.MockedMessage;
|
||||
import com.release11.klaus.service.KlausService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.RequestEntity;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
@Controller("/")
|
||||
@@ -28,6 +29,15 @@ public class KlausController {
|
||||
|
||||
private final KlausService klausService;
|
||||
|
||||
@RequestMapping(value = "klaus/v1/delete/{clientUUID}/{mockedResponseId}")
|
||||
public ResponseEntity<String> deleteMockedResponse(@PathVariable UUID clientUUID,
|
||||
@PathVariable int mockedResponseId){
|
||||
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "deleteMockedResponse",
|
||||
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
|
||||
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseId)));
|
||||
klausService.deleteMockedResponse(clientUUID, mockedResponseId);
|
||||
return new ResponseEntity<>("message has been deleted", HttpStatus.OK);
|
||||
}
|
||||
@RequestMapping(value = "klaus/v1/getAll/{clientUUID}")
|
||||
public ResponseEntity<String> getAllMockedResponses(@PathVariable UUID clientUUID){
|
||||
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "getMockedResponse",
|
||||
@@ -43,18 +53,22 @@ public class KlausController {
|
||||
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "getMockedResponse",
|
||||
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
|
||||
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseId)));
|
||||
|
||||
return klausService.getMockedResponse(clientUUID, mockedResponseId);
|
||||
MockedMessageDto mockedMessageDto = klausService.getMockedResponse(clientUUID, mockedResponseId);
|
||||
HttpHeaders httpHeaders = new HttpHeaders();
|
||||
if (mockedMessageDto.getHttpHeaders() != null) mockedMessageDto.getHttpHeaders().forEach(httpHeaders::set);
|
||||
return new ResponseEntity<>(mockedMessageDto.getMessageBody(), httpHeaders,
|
||||
Objects.requireNonNull(HttpStatus.valueOf(mockedMessageDto.getHttpStatus())));
|
||||
}
|
||||
|
||||
@PostMapping(value = "klaus/v1/set/{clientUUID}/{mockedResponseId}")
|
||||
public ResponseEntity<String> setMockedResponse(@PathVariable UUID clientUUID,
|
||||
@PathVariable int mockedResponseId,
|
||||
@RequestParam(required = false) int httpStatus,
|
||||
@RequestParam(required = false) Integer httpStatus,
|
||||
RequestEntity<String> requestEntity){
|
||||
TrackingClient.setBusinessKeys(Map.of(BusinessKey.INTERFACE_NAME, "setMockedResponse",
|
||||
BusinessKey.CLIENT_UUID, String.valueOf(clientUUID),
|
||||
BusinessKey.MESSAGE_ID, String.valueOf(mockedResponseId)));
|
||||
if (httpStatus == null) httpStatus = 200;
|
||||
|
||||
MockedMessageDto mockedMessageDto = new MockedMessageDto(clientUUID, mockedResponseId,
|
||||
requestEntity.getHeaders().getContentType().toString(), requestEntity.getBody(),
|
||||
|
||||
@@ -27,20 +27,21 @@ import java.util.*;
|
||||
@AllArgsConstructor
|
||||
public class KlausMvcController {
|
||||
private final KlausService klausService;
|
||||
|
||||
private final Set<MockedMessageDto> globalMockedMessageDtoList = new HashSet<>();
|
||||
|
||||
@GetMapping("/login")
|
||||
public String login() {
|
||||
return "login";
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@GetMapping({"/home", "/home/{uuid}"})
|
||||
public String showHome(final MockedMessageDto mockedMessageDto, Model model,
|
||||
public String showHome(final MockedMessageDto mockedMessageDto, final Model model,
|
||||
@RequestParam(required = false) UUID clientUUID,
|
||||
@PathVariable(required = false) UUID uuid) {
|
||||
if (uuid != null) clientUUID = uuid;
|
||||
if (clientUUID != null) mockedMessageDto.setClientUUID(clientUUID);
|
||||
model.addAttribute("mockedMessageDtoList", klausService.getAllMockedResponses(clientUUID));
|
||||
populateModelWithLists(model, mockedMessageDto,true);
|
||||
return "index";
|
||||
}
|
||||
|
||||
@@ -51,7 +52,7 @@ public class KlausMvcController {
|
||||
BusinessKey.CLIENT_UUID, String.valueOf(mockedMessageDto.getClientUUID()),
|
||||
BusinessKey.MESSAGE_ID, String.valueOf(mockedMessageDto.getMockedResponseId())));
|
||||
klausService.setMockedResponse(mockedMessageDto);
|
||||
model.addAttribute("mockedMessageDtoList", klausService.getAllMockedResponses(mockedMessageDto.getClientUUID()));
|
||||
populateModelWithLists(model, mockedMessageDto,true);
|
||||
model.addAttribute("mockSaved", "true");
|
||||
return "index";
|
||||
}
|
||||
@@ -66,20 +67,36 @@ public class KlausMvcController {
|
||||
mockedMessageDto.getMockedResponseId()).toString();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/home/{clientUUID}", params = {"addHeader"})
|
||||
public String addRow(final MockedMessageDto mockedMessageDto, @RequestParam String headerKey,
|
||||
@RequestParam String headerValue) {
|
||||
@RequestMapping(value = "/home/{clientUUID}", params = {"addHeader"} )
|
||||
public String addHeader(final MockedMessageDto mockedMessageDto, @RequestParam String headerKey,
|
||||
@RequestParam String headerValue, final Model model) {
|
||||
populateModelWithLists(model, mockedMessageDto,false);
|
||||
mockedMessageDto.getHttpHeaders().put(headerKey, headerValue);
|
||||
return "index";
|
||||
}
|
||||
|
||||
@RequestMapping(value="/home/{clientUUID}", params={"removeHeader"})
|
||||
public String removeHeader(final MockedMessageDto mockedMessageDto, final HttpServletRequest req) {
|
||||
public String removeHeader(final MockedMessageDto mockedMessageDto, final HttpServletRequest req, final Model model) {
|
||||
populateModelWithLists(model, mockedMessageDto,false);
|
||||
mockedMessageDto.getHttpHeaders().remove(req.getParameter("removeHeader"));
|
||||
System.out.println(mockedMessageDto);
|
||||
return "index";
|
||||
}
|
||||
|
||||
@RequestMapping(value="/home/{clientUUID}", params={"updateMessage"})
|
||||
public String updateMessage(final HttpServletRequest req, final MockedMessageDto mockedMessageDto, final Model model) {
|
||||
model.addAttribute("mockedMessageDto", klausService.getMockedResponse(mockedMessageDto.getClientUUID(),
|
||||
Integer.parseInt(req.getParameter("updateMessage"))));
|
||||
populateModelWithLists(model, mockedMessageDto, false);
|
||||
return "index";
|
||||
}
|
||||
|
||||
@RequestMapping(value="/home/{clientUUID}", params={"removeMessage"})
|
||||
public String removeMessage(final MockedMessageDto mockedMessageDto, final HttpServletRequest req, final Model model) {
|
||||
klausService.deleteMockedResponse(mockedMessageDto.getClientUUID(),
|
||||
Integer.parseInt(req.getParameter("removeMessage")));
|
||||
populateModelWithLists(model, mockedMessageDto, true);
|
||||
return "index";
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@ModelAttribute("localhost")
|
||||
@@ -98,12 +115,21 @@ public class KlausMvcController {
|
||||
"application/xml", "body", new LinkedHashMap<>(), 200);
|
||||
}
|
||||
|
||||
@ModelAttribute("eventsDto")
|
||||
public EventRequestDto eventsDto() {
|
||||
@ModelAttribute("eventRequestDto")
|
||||
public EventRequestDto eventRequestDto() {
|
||||
return EventRequestDto.builder()
|
||||
.mockedResponseId(1)
|
||||
.localDateTimeFrom(LocalDateTime.of(LocalDate.now(), LocalTime.MIN))
|
||||
.localDateTimeTo(LocalDateTime.of(LocalDate.now().plusDays(1), LocalTime.MIDNIGHT))
|
||||
.build();
|
||||
}
|
||||
|
||||
private void populateModelWithLists(Model model, MockedMessageDto mockedMessageDto, boolean updateList){
|
||||
if (updateList){
|
||||
globalMockedMessageDtoList.clear();
|
||||
globalMockedMessageDtoList.addAll(klausService.getAllMockedResponses(mockedMessageDto.getClientUUID()));
|
||||
}
|
||||
model.addAttribute("mockedMessageDtoList", globalMockedMessageDtoList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,6 @@ public class EventRequestDto {
|
||||
private LocalDateTime localDateTimeFrom;
|
||||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
private LocalDateTime localDateTimeTo;
|
||||
private int mockedResponseId;
|
||||
private Integer mockedResponseId;
|
||||
|
||||
}
|
||||
|
||||
@@ -29,25 +29,6 @@ public class MockedMessage implements Serializable {
|
||||
@HttpCode
|
||||
private Integer httpStatus;
|
||||
|
||||
public MockedMessage(MockedMessage mockedMessage) {
|
||||
this.compositePrimaryKey = mockedMessage.getClientUUID().toString() + "_" + mockedMessage.getMockedResponseId();
|
||||
this.clientUUID = mockedMessage.getClientUUID();
|
||||
this.mockedResponseId = mockedMessage.getMockedResponseId();
|
||||
this.mediaType = mockedMessage.getMediaType();
|
||||
this.messageBody = mockedMessage.getMessageBody();
|
||||
this.httpHeaders = mockedMessage.getHttpHeaders();
|
||||
this.httpStatus = mockedMessage.getHttpStatus();
|
||||
}
|
||||
public MockedMessage(UUID clientUUID, int mockedResponseId, String mediaType,
|
||||
String messageBody, Map<String, String> httpHeaders, Integer httpStatus) {
|
||||
this.compositePrimaryKey = clientUUID.toString() + "_" + mockedResponseId;
|
||||
this.clientUUID = clientUUID;
|
||||
this.mockedResponseId = mockedResponseId;
|
||||
this.mediaType = mediaType;
|
||||
this.messageBody = messageBody;
|
||||
this.httpHeaders = httpHeaders;
|
||||
this.httpStatus = httpStatus;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.release11.klaus.model.Event;
|
||||
import com.release11.klaus.utilis.BusinessKey;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.boot.configurationprocessor.json.JSONException;
|
||||
import org.springframework.boot.configurationprocessor.json.JSONObject;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
@@ -14,7 +12,10 @@ import redis.clients.jedis.JedisPool;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Repository
|
||||
@@ -52,6 +53,8 @@ public class EventRepositoryImpl implements EventRepository {
|
||||
List<String> resultList = new ArrayList<>();
|
||||
for (Map.Entry<BusinessKey, String> entry : businessKeys.entrySet()) {
|
||||
String stringPattern = "\"" + entry.getKey() + ":" + entry.getValue() + "\"";
|
||||
String u;
|
||||
u = "das";
|
||||
resultList = events.stream().filter(s -> s.contains(stringPattern)).collect(Collectors.toList());
|
||||
}
|
||||
return resultList;
|
||||
|
||||
@@ -12,4 +12,5 @@ import java.util.UUID;
|
||||
@Transactional
|
||||
public interface MockedResponseRepository extends CrudRepository<MockedMessage, String> {
|
||||
List<MockedMessage> findAllByClientUUID(UUID clientUUID);
|
||||
MockedMessage getByCompositePrimaryKey(String compositePrimaryKey);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ public class EtrackServiceImpl implements EtrackService {
|
||||
public List<Event> getEventsByDateTimeAndBusinessKeys(EventRequestDto eventsDto) {
|
||||
Map<BusinessKey, String> businessKeys = new HashMap<>();
|
||||
businessKeys.put(BusinessKey.CLIENT_UUID, eventsDto.getClientUUID().toString());
|
||||
if (eventsDto.getMockedResponseId() != null){
|
||||
businessKeys.put(BusinessKey.MESSAGE_ID, String.valueOf(eventsDto.getMockedResponseId()));
|
||||
}
|
||||
return eventRepository.findEvents(eventsDto.getLocalDateTimeFrom(), eventsDto.getLocalDateTimeTo(),
|
||||
businessKeys);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ import java.util.UUID;
|
||||
public interface KlausService {
|
||||
void deleteMockedResponse(UUID clientUUID, int mockedResponseId);
|
||||
List<MockedMessageDto> getAllMockedResponses(UUID clientUUID);
|
||||
ResponseEntity<String> getMockedResponse(UUID clientUUID, int mockedResponseId);
|
||||
MockedMessageDto getMockedResponse(UUID clientUUID, int mockedResponseId);
|
||||
ResponseEntity<String> setMockedResponse(MockedMessageDto mockedMessageDto);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.release11.klaus.service;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.release11.klaus.mappers.MockedMessageMapper;
|
||||
import com.release11.klaus.model.MockedMessage;
|
||||
import com.release11.klaus.model.MockedMessageDto;
|
||||
@@ -13,7 +12,7 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -22,13 +21,13 @@ import java.util.stream.Collectors;
|
||||
@AllArgsConstructor
|
||||
public class KlausServiceImpl implements KlausService {
|
||||
|
||||
private final ObjectMapper objectMapper;
|
||||
private final MockedMessageMapper mockedMessageMapper;
|
||||
private final MockedResponseRepository mockedResponseRepository;
|
||||
|
||||
@Override
|
||||
public void deleteMockedResponse(UUID clientUUID, int mockedResponseId) {
|
||||
|
||||
String key = clientUUID.toString() + "_" + mockedResponseId;
|
||||
mockedResponseRepository.deleteById(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,15 +38,15 @@ public class KlausServiceImpl implements KlausService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<String> getMockedResponse(UUID clientUUID, int mockedResponseId) {
|
||||
public MockedMessageDto getMockedResponse(UUID clientUUID, int mockedResponseId) {
|
||||
log.info("KlausServiceImpl, operation getMockedResponse, clientId {}, mockedResponseId {} ",
|
||||
clientUUID, mockedResponseId);
|
||||
String key = clientUUID.toString() + "_" + mockedResponseId;
|
||||
MockedMessage mockedMessage = mockedResponseRepository.findById(key).get();
|
||||
HttpHeaders httpHeaders = new HttpHeaders();
|
||||
if(mockedMessage.getHttpHeaders() !=null)mockedMessage.getHttpHeaders().forEach(httpHeaders::set);
|
||||
return new ResponseEntity<>(mockedMessage.getMessageBody(), httpHeaders,
|
||||
Objects.requireNonNull(HttpStatus.valueOf(mockedMessage.getHttpStatus())));
|
||||
Optional<MockedMessage> optionalMockedMessage = mockedResponseRepository.findById(key);
|
||||
if (optionalMockedMessage.isPresent()) {
|
||||
return mockedMessageMapper.mockedMessageToMockedMessageDto(optionalMockedMessage.get());
|
||||
}
|
||||
return new MockedMessageDto();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
redis.host = redis-server
|
||||
redis.port = 6379
|
||||
redis.host = localhost
|
||||
redis.port = 6379
|
||||
@@ -3,7 +3,7 @@
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
<!--https://github.com/kmtong/logback-redis-appender-->
|
||||
<appender name="LOGSTASH" class="com.release11.klaus.utilis.RedisAppender">
|
||||
<host>redis-image</host>
|
||||
<host>redis-server</host>
|
||||
<port>6379</port>
|
||||
<key>logstash</key>
|
||||
<layout class="ch.qos.logback.classic.PatternLayout">
|
||||
|
||||
@@ -45,9 +45,7 @@ button:focus {
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
button[name="allMessagesClicked"] {
|
||||
color: #00b3b3;
|
||||
}
|
||||
|
||||
|
||||
#pagination-wrapper button {
|
||||
background: none;
|
||||
@@ -56,6 +54,23 @@ button[name="allMessagesClicked"] {
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
|
||||
button[name="removeMessage"]{
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
|
||||
button[name="updateMessage"]{
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
|
||||
button[name="allMessagesClicked"] {
|
||||
color: #00b3b3;
|
||||
}
|
||||
|
||||
button[name="removeHeader"] {
|
||||
position: absolute;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var state = {
|
||||
'querySet': ["dupa1", "sra", "na", "leb"],
|
||||
'querySet': [{"clientUUID":"436c4774-038f-4540-9c18-2691ca9b53d4","mockedResponseId":1908998,"mediaType":"application/xml","messageBody":"body","httpHeaders":null,"httpStatus":200}],
|
||||
|
||||
'page': 1,
|
||||
'rows': 10,
|
||||
@@ -10,6 +10,7 @@ state.querySet = mockedMessageDtoList;
|
||||
buildTable();
|
||||
|
||||
function pagination(querySet, page, rows) {
|
||||
|
||||
var trimStart = (page - 1) * rows
|
||||
var trimEnd = trimStart + rows
|
||||
var trimmedData = querySet.slice(trimStart, trimEnd)
|
||||
@@ -75,7 +76,6 @@ function buildTable() {
|
||||
|
||||
var data = pagination(state.querySet, state.page, state.rows)
|
||||
var myList = data.querySet
|
||||
|
||||
for(var i = 1; i<=myList.length; i++){
|
||||
var j = i + (state.page-1) * 10;
|
||||
if(i%2 === 0){
|
||||
@@ -84,6 +84,16 @@ function buildTable() {
|
||||
<td>${myList[i-1].mockedResponseId}</td>
|
||||
<td>${myList[i-1].mediaType}</td>
|
||||
<td>${myList[i-1].httpStatus}</td>
|
||||
<td>
|
||||
<button type="submit" name="updateMessage" value="${myList[i-1].mockedResponseId}">
|
||||
<img src="/img/update-button.png" style="width: 20px;"/>
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" name="removeMessage" value="${myList[i-1].mockedResponseId}">
|
||||
<img src="/img/icons8-cancel-64.png" style="width: 20px;"/>
|
||||
</button>
|
||||
</td>
|
||||
`
|
||||
}else{
|
||||
var row = `<tr bgcolor="#e6ffff">
|
||||
@@ -91,6 +101,16 @@ function buildTable() {
|
||||
<td>${myList[i-1].mockedResponseId}</td>
|
||||
<td>${myList[i-1].mediaType}</td>
|
||||
<td>${myList[i-1].httpStatus}</td>
|
||||
<td>
|
||||
<button type="submit" name="updateMessage" value="${myList[i-1].mockedResponseId}">
|
||||
<img src="/img/update-button.png" style="width: 20px;"/>
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" name="removeMessage" value="${myList[i-1].mockedResponseId}">
|
||||
<img src="/img/icons8-cancel-64.png" style="width: 20px;"/>
|
||||
</button>
|
||||
</td>
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
</head>
|
||||
<body>
|
||||
<hr>
|
||||
<div><br>In order to set mockup response please fill the form below:
|
||||
</div>
|
||||
|
||||
<section class="page-section" id="main-section" >
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="column" >
|
||||
<br>You can also simply fill and submit the below form:
|
||||
<br>In order to set mockup response please fill the form below:
|
||||
<form action="#" th:action="@{/home/__${mockedMessageDto.clientUUID}__}"
|
||||
th:object="${mockedMessageDto}" method="post">
|
||||
<table>
|
||||
@@ -93,6 +90,7 @@
|
||||
</div>
|
||||
<div class="column">
|
||||
<br>
|
||||
<form th:action="@{/home/__${mockedMessageDto.clientUUID}__}" method="post" id="dupa" >
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -102,15 +100,14 @@
|
||||
<th class="tr-pageable">Http Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
|
||||
</tbody>
|
||||
<tbody id="table-body">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="container ">
|
||||
<div id="pagination-wrapper"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,6 +121,8 @@
|
||||
<br>In order to set or get responses through curl or http tools you can use urls below.
|
||||
<br>When you set your response simply set headers and media type of your request that you expect to get in the
|
||||
response from the next step.
|
||||
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/delete/<a
|
||||
th:text="${mockedMessageDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}
|
||||
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/set/ <a
|
||||
th:text="${mockedMessageDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}?httpStatus={httpStatus}
|
||||
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/get/<a
|
||||
@@ -135,12 +134,14 @@
|
||||
|
||||
<div>
|
||||
<br>To see your activity history use the form below
|
||||
<form action="#" th:action="@{/eventsForm}" th:object="${eventsDto}" method="post">
|
||||
<form action="#" th:action="@{/eventsForm}" th:object="${eventRequestDto}" method="post">
|
||||
<input type="text" th:name="clientUUID" th:value="${mockedMessageDto.clientUUID}" hidden/>
|
||||
<br><label>Mocked response id:</label><br>
|
||||
<input type="text" th:name="mockedResponseId" th:id="mockedResponseId" th:placeholder="all"/>
|
||||
<td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">mockedResponseId error</td>
|
||||
<br><label>Date from:</label><br>
|
||||
<input type="datetime-local" th:field="*{localDateTimeFrom}"/>
|
||||
<td th:if="${#fields.hasErrors('localDateTimeFrom')}" th:errors="*{localDateTimeFrom}">localDateTimeFrom Error
|
||||
</td>
|
||||
<td th:if="${#fields.hasErrors('localDateTimeFrom')}" th:errors="*{localDateTimeFrom}">localDateTimeFrom Error</td>
|
||||
<br><label>Date to:</label><br>
|
||||
<input type="datetime-local" th:field="*{localDateTimeTo}"/>
|
||||
<td th:if="${#fields.hasErrors('localDateTimeTo')}" th:errors="*{localDateTimeTo}">localDateTimeTo Error</td>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.release11.klaus;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@SpringBootTest
|
||||
class KlausApplicationTests {
|
||||
|
||||
@SneakyThrows
|
||||
@Test
|
||||
void contextLoads() {
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -45,9 +45,7 @@ button:focus {
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
button[name="allMessagesClicked"] {
|
||||
color: #00b3b3;
|
||||
}
|
||||
|
||||
|
||||
#pagination-wrapper button {
|
||||
background: none;
|
||||
@@ -56,6 +54,23 @@ button[name="allMessagesClicked"] {
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
|
||||
button[name="removeMessage"]{
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
|
||||
button[name="updateMessage"]{
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
|
||||
button[name="allMessagesClicked"] {
|
||||
color: #00b3b3;
|
||||
}
|
||||
|
||||
button[name="removeHeader"] {
|
||||
position: absolute;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var state = {
|
||||
'querySet': ["dupa1", "sra", "na", "leb"],
|
||||
'querySet': [{"clientUUID":"436c4774-038f-4540-9c18-2691ca9b53d4","mockedResponseId":1908998,"mediaType":"application/xml","messageBody":"body","httpHeaders":null,"httpStatus":200}],
|
||||
|
||||
'page': 1,
|
||||
'rows': 10,
|
||||
@@ -10,6 +10,7 @@ state.querySet = mockedMessageDtoList;
|
||||
buildTable();
|
||||
|
||||
function pagination(querySet, page, rows) {
|
||||
|
||||
var trimStart = (page - 1) * rows
|
||||
var trimEnd = trimStart + rows
|
||||
var trimmedData = querySet.slice(trimStart, trimEnd)
|
||||
@@ -75,7 +76,6 @@ function buildTable() {
|
||||
|
||||
var data = pagination(state.querySet, state.page, state.rows)
|
||||
var myList = data.querySet
|
||||
|
||||
for(var i = 1; i<=myList.length; i++){
|
||||
var j = i + (state.page-1) * 10;
|
||||
if(i%2 === 0){
|
||||
@@ -84,6 +84,16 @@ function buildTable() {
|
||||
<td>${myList[i-1].mockedResponseId}</td>
|
||||
<td>${myList[i-1].mediaType}</td>
|
||||
<td>${myList[i-1].httpStatus}</td>
|
||||
<td>
|
||||
<button type="submit" name="updateMessage" value="${myList[i-1].mockedResponseId}">
|
||||
<img src="/img/update-button.png" style="width: 20px;"/>
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" name="removeMessage" value="${myList[i-1].mockedResponseId}">
|
||||
<img src="/img/icons8-cancel-64.png" style="width: 20px;"/>
|
||||
</button>
|
||||
</td>
|
||||
`
|
||||
}else{
|
||||
var row = `<tr bgcolor="#e6ffff">
|
||||
@@ -91,6 +101,16 @@ function buildTable() {
|
||||
<td>${myList[i-1].mockedResponseId}</td>
|
||||
<td>${myList[i-1].mediaType}</td>
|
||||
<td>${myList[i-1].httpStatus}</td>
|
||||
<td>
|
||||
<button type="submit" name="updateMessage" value="${myList[i-1].mockedResponseId}">
|
||||
<img src="/img/update-button.png" style="width: 20px;"/>
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" name="removeMessage" value="${myList[i-1].mockedResponseId}">
|
||||
<img src="/img/icons8-cancel-64.png" style="width: 20px;"/>
|
||||
</button>
|
||||
</td>
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
</head>
|
||||
<body>
|
||||
<hr>
|
||||
<div><br>In order to set mockup response please fill the form below:
|
||||
</div>
|
||||
|
||||
<section class="page-section" id="main-section" >
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="column" >
|
||||
<br>You can also simply fill and submit the below form:
|
||||
<br>In order to set mockup response please fill the form below:
|
||||
<form action="#" th:action="@{/home/__${mockedMessageDto.clientUUID}__}"
|
||||
th:object="${mockedMessageDto}" method="post">
|
||||
<table>
|
||||
@@ -93,6 +90,7 @@
|
||||
</div>
|
||||
<div class="column">
|
||||
<br>
|
||||
<form th:action="@{/home/__${mockedMessageDto.clientUUID}__}" method="post" id="dupa" >
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -102,15 +100,14 @@
|
||||
<th class="tr-pageable">Http Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
|
||||
</tbody>
|
||||
<tbody id="table-body">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="container ">
|
||||
<div id="pagination-wrapper"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,6 +121,8 @@
|
||||
<br>In order to set or get responses through curl or http tools you can use urls below.
|
||||
<br>When you set your response simply set headers and media type of your request that you expect to get in the
|
||||
response from the next step.
|
||||
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/delete/<a
|
||||
th:text="${mockedMessageDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}
|
||||
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/set/ <a
|
||||
th:text="${mockedMessageDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}?httpStatus={httpStatus}
|
||||
<br>http://<a th:text="@{__${localhost}__}">localhost</a>:8097/klaus/v1/get/<a
|
||||
@@ -135,12 +134,14 @@
|
||||
|
||||
<div>
|
||||
<br>To see your activity history use the form below
|
||||
<form action="#" th:action="@{/eventsForm}" th:object="${eventsDto}" method="post">
|
||||
<form action="#" th:action="@{/eventsForm}" th:object="${eventRequestDto}" method="post">
|
||||
<input type="text" th:name="clientUUID" th:value="${mockedMessageDto.clientUUID}" hidden/>
|
||||
<br><label>Mocked response id:</label><br>
|
||||
<input type="text" th:name="mockedResponseId" th:id="mockedResponseId" th:placeholder="all"/>
|
||||
<td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">mockedResponseId error</td>
|
||||
<br><label>Date from:</label><br>
|
||||
<input type="datetime-local" th:field="*{localDateTimeFrom}"/>
|
||||
<td th:if="${#fields.hasErrors('localDateTimeFrom')}" th:errors="*{localDateTimeFrom}">localDateTimeFrom Error
|
||||
</td>
|
||||
<td th:if="${#fields.hasErrors('localDateTimeFrom')}" th:errors="*{localDateTimeFrom}">localDateTimeFrom Error</td>
|
||||
<br><label>Date to:</label><br>
|
||||
<input type="datetime-local" th:field="*{localDateTimeTo}"/>
|
||||
<td th:if="${#fields.hasErrors('localDateTimeTo')}" th:errors="*{localDateTimeTo}">localDateTimeTo Error</td>
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2020-09-09T10:30:58+0200",
|
||||
date = "2020-09-09T17:18:22+0200",
|
||||
comments = "version: 1.3.1.Final, compiler: javac, environment: Java 14.0.1 (Oracle Corporation)"
|
||||
)
|
||||
@Component
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user