changing index.html and adding Etrack
This commit is contained in:
		
							
								
								
									
										1
									
								
								.idea/dictionaries/lomba.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								.idea/dictionaries/lomba.xml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,7 @@ | |||||||
| <component name="ProjectDictionaryState"> | <component name="ProjectDictionaryState"> | ||||||
|   <dictionary name="lomba"> |   <dictionary name="lomba"> | ||||||
|     <words> |     <words> | ||||||
|  |       <w>logstashes</w> | ||||||
|       <w>workdir</w> |       <w>workdir</w> | ||||||
|     </words> |     </words> | ||||||
|   </dictionary> |   </dictionary> | ||||||
|   | |||||||
							
								
								
									
										338
									
								
								.idea/workspace.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										338
									
								
								.idea/workspace.xml
									
									
									
										generated
									
									
									
								
							| @@ -19,8 +19,30 @@ | |||||||
|     <select /> |     <select /> | ||||||
|   </component> |   </component> | ||||||
|   <component name="ChangeListManager"> |   <component name="ChangeListManager"> | ||||||
|     <list default="true" id="625207a7-ac1d-4617-9c3e-c12bef4db83d" name="Default Changelist" comment=""> |     <list default="true" id="458cde88-df3d-44bc-9d57-a33823e2f1a6" name="Default Changelist" comment=""> | ||||||
|       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> |       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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/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/KlausMvcController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/KlausMvcController.java" afterDir="false" /> | ||||||
|  |       <change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/model/EventsDto.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/model/EventRequestDto.java" afterDir="false" /> | ||||||
|  |       <change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/model/LogStructure.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/EventRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/repository/EventRepository.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/EtrackService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/service/EtrackService.java" afterDir="false" /> | ||||||
|  |       <change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/service/EtrackServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/service/EtrackServiceImpl.java" afterDir="false" /> | ||||||
|  |       <change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/utilis/TrackingClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/utilis/TrackingClient.java" 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/test/java/com/release11/klaus/controller/KlausMvcControllerTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/release11/klaus/controller/KlausMvcControllerTest.java" afterDir="false" /> | ||||||
|  |       <change beforePath="$PROJECT_DIR$/src/test/java/com/release11/klaus/repository/MockedResponseRedisRepositoryTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/release11/klaus/repository/MockedResponseRedisRepositoryTest.java" afterDir="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/classes/com/release11/klaus/model/LogStructure.class" beforeDir="false" /> | ||||||
|  |       <change beforePath="$PROJECT_DIR$/target/classes/com/release11/klaus/service/EtrackService.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/service/EtrackService.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/com/release11/klaus/utilis/TrackingClient.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/release11/klaus/utilis/TrackingClient.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/test-classes/com/release11/klaus/controller/KlausMvcControllerTest.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/com/release11/klaus/controller/KlausMvcControllerTest.class" afterDir="false" /> | ||||||
|  |       <change beforePath="$PROJECT_DIR$/target/test-classes/com/release11/klaus/repository/MockedResponseRedisRepositoryTest.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/com/release11/klaus/repository/MockedResponseRedisRepositoryTest.class" afterDir="false" /> | ||||||
|     </list> |     </list> | ||||||
|     <option name="SHOW_DIALOG" value="false" /> |     <option name="SHOW_DIALOG" value="false" /> | ||||||
|     <option name="HIGHLIGHT_CONFLICTS" value="true" /> |     <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||||||
| @@ -33,10 +55,8 @@ | |||||||
|   <component name="FileTemplateManagerImpl"> |   <component name="FileTemplateManagerImpl"> | ||||||
|     <option name="RECENT_TEMPLATES"> |     <option name="RECENT_TEMPLATES"> | ||||||
|       <list> |       <list> | ||||||
|         <option value="JavaFXApplication" /> |  | ||||||
|         <option value="Interface" /> |         <option value="Interface" /> | ||||||
|         <option value="Class" /> |         <option value="Class" /> | ||||||
|         <option value="HTML File" /> |  | ||||||
|       </list> |       </list> | ||||||
|     </option> |     </option> | ||||||
|   </component> |   </component> | ||||||
| @@ -46,19 +66,26 @@ | |||||||
|   <component name="ProjectCodeStyleSettingsMigration"> |   <component name="ProjectCodeStyleSettingsMigration"> | ||||||
|     <option name="version" value="1" /> |     <option name="version" value="1" /> | ||||||
|   </component> |   </component> | ||||||
|   <component name="ProjectId" id="1fPPKqPEA1Iv0kUOcRcJpNsqWLX" /> |   <component name="ProjectId" id="1gr9z2Qy2nJ7GZxG1xBZ0X6W3o2" /> | ||||||
|   <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> |   <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> | ||||||
|   <component name="ProjectViewState"> |   <component name="ProjectViewState"> | ||||||
|     <option name="hideEmptyMiddlePackages" value="true" /> |  | ||||||
|     <option name="showLibraryContents" value="true" /> |     <option name="showLibraryContents" value="true" /> | ||||||
|   </component> |   </component> | ||||||
|   <component name="PropertiesComponent"> |   <component name="PropertiesComponent"> | ||||||
|     <property name="DefaultHtmlFileTemplate" value="HTML File" /> |  | ||||||
|     <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> |     <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> | ||||||
|     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> |     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> | ||||||
|     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> |     <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> | ||||||
|     <property name="last_opened_file_path" value="$PROJECT_DIR$" /> |     <property name="last_opened_file_path" value="$PROJECT_DIR$" /> | ||||||
|   </component> |   </component> | ||||||
|  |   <component name="RecentsManager"> | ||||||
|  |     <key name="CopyFile.RECENT_KEYS"> | ||||||
|  |       <recent name="D:\git\Szakalakamaka\Klaus\src\main\resources\static\css" /> | ||||||
|  |     </key> | ||||||
|  |     <key name="CreateClassDialog.RecentsKey"> | ||||||
|  |       <recent name="com.release11.klaus.repository" /> | ||||||
|  |       <recent name="com.release11.klaus.service" /> | ||||||
|  |     </key> | ||||||
|  |   </component> | ||||||
|   <component name="RunManager" selected="Application.KlausApplication"> |   <component name="RunManager" selected="Application.KlausApplication"> | ||||||
|     <configuration name="KlausApplication" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> |     <configuration name="KlausApplication" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> | ||||||
|       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.KlausApplication" /> |       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.KlausApplication" /> | ||||||
| @@ -73,32 +100,16 @@ | |||||||
|         <option name="Make" enabled="true" /> |         <option name="Make" enabled="true" /> | ||||||
|       </method> |       </method> | ||||||
|     </configuration> |     </configuration> | ||||||
|     <configuration name="KlausServiceImplTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> |     <configuration name="KlausControllerTest.getMockedResponse" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> | ||||||
|       <module name="Klaus" /> |       <module name="Klaus" /> | ||||||
|       <extension name="coverage"> |       <extension name="coverage"> | ||||||
|         <pattern> |         <pattern> | ||||||
|           <option name="PATTERN" value="com.release11.klaus.service.*" /> |           <option name="PATTERN" value="com.release11.klaus.controller.*" /> | ||||||
|           <option name="ENABLED" value="true" /> |           <option name="ENABLED" value="true" /> | ||||||
|         </pattern> |         </pattern> | ||||||
|       </extension> |       </extension> | ||||||
|       <option name="PACKAGE_NAME" value="com.release11.klaus.service" /> |       <option name="PACKAGE_NAME" value="com.release11.klaus.controller" /> | ||||||
|       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.service.KlausServiceImplTest" /> |       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.controller.KlausControllerTest" /> | ||||||
|       <option name="TEST_OBJECT" value="class" /> |  | ||||||
|       <method v="2"> |  | ||||||
|         <option name="Make" enabled="true" /> |  | ||||||
|         <option name="BSP.BeforeRunTask" enabled="true" /> |  | ||||||
|       </method> |  | ||||||
|     </configuration> |  | ||||||
|     <configuration name="KlausServiceImplTest.getMockedResponse" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> |  | ||||||
|       <module name="Klaus" /> |  | ||||||
|       <extension name="coverage"> |  | ||||||
|         <pattern> |  | ||||||
|           <option name="PATTERN" value="com.release11.klaus.service.*" /> |  | ||||||
|           <option name="ENABLED" value="true" /> |  | ||||||
|         </pattern> |  | ||||||
|       </extension> |  | ||||||
|       <option name="PACKAGE_NAME" value="com.release11.klaus.service" /> |  | ||||||
|       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.service.KlausServiceImplTest" /> |  | ||||||
|       <option name="METHOD_NAME" value="getMockedResponse" /> |       <option name="METHOD_NAME" value="getMockedResponse" /> | ||||||
|       <option name="TEST_OBJECT" value="method" /> |       <option name="TEST_OBJECT" value="method" /> | ||||||
|       <method v="2"> |       <method v="2"> | ||||||
| @@ -106,33 +117,51 @@ | |||||||
|         <option name="BSP.BeforeRunTask" enabled="true" /> |         <option name="BSP.BeforeRunTask" enabled="true" /> | ||||||
|       </method> |       </method> | ||||||
|     </configuration> |     </configuration> | ||||||
|     <configuration name="RedisConfigTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> |     <configuration name="KlausMvcControllerTest.showHome" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> | ||||||
|       <module name="Klaus" /> |       <module name="Klaus" /> | ||||||
|       <extension name="coverage"> |       <extension name="coverage"> | ||||||
|         <pattern> |         <pattern> | ||||||
|           <option name="PATTERN" value="com.release11.klaus.config.*" /> |           <option name="PATTERN" value="com.release11.klaus.controller.*" /> | ||||||
|           <option name="ENABLED" value="true" /> |           <option name="ENABLED" value="true" /> | ||||||
|         </pattern> |         </pattern> | ||||||
|       </extension> |       </extension> | ||||||
|       <option name="PACKAGE_NAME" value="com.release11.klaus.config" /> |       <option name="PACKAGE_NAME" value="com.release11.klaus.controller" /> | ||||||
|       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.config.RedisConfigTest" /> |       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.controller.KlausMvcControllerTest" /> | ||||||
|       <option name="TEST_OBJECT" value="class" /> |       <option name="METHOD_NAME" value="showHome" /> | ||||||
|  |       <option name="TEST_OBJECT" value="method" /> | ||||||
|       <method v="2"> |       <method v="2"> | ||||||
|         <option name="Make" enabled="true" /> |         <option name="Make" enabled="true" /> | ||||||
|         <option name="BSP.BeforeRunTask" enabled="true" /> |         <option name="BSP.BeforeRunTask" enabled="true" /> | ||||||
|       </method> |       </method> | ||||||
|     </configuration> |     </configuration> | ||||||
|     <configuration name="RedisConfigTest.jedisPool" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> |     <configuration name="MockedResponseRedisRepositoryTest.getMockedResponse" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> | ||||||
|       <module name="Klaus" /> |       <module name="Klaus" /> | ||||||
|       <extension name="coverage"> |       <extension name="coverage"> | ||||||
|         <pattern> |         <pattern> | ||||||
|           <option name="PATTERN" value="com.release11.klaus.config.*" /> |           <option name="PATTERN" value="com.release11.klaus.repository.*" /> | ||||||
|           <option name="ENABLED" value="true" /> |           <option name="ENABLED" value="true" /> | ||||||
|         </pattern> |         </pattern> | ||||||
|       </extension> |       </extension> | ||||||
|       <option name="PACKAGE_NAME" value="com.release11.klaus.config" /> |       <option name="PACKAGE_NAME" value="com.release11.klaus.repository" /> | ||||||
|       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.config.RedisConfigTest" /> |       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.repository.MockedResponseRedisRepositoryTest" /> | ||||||
|       <option name="METHOD_NAME" value="jedisPool" /> |       <option name="METHOD_NAME" value="getMockedResponse" /> | ||||||
|  |       <option name="TEST_OBJECT" value="method" /> | ||||||
|  |       <method v="2"> | ||||||
|  |         <option name="Make" enabled="true" /> | ||||||
|  |         <option name="BSP.BeforeRunTask" enabled="true" /> | ||||||
|  |       </method> | ||||||
|  |     </configuration> | ||||||
|  |     <configuration name="MockedResponseRedisRepositoryTest.setMockedResponse" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> | ||||||
|  |       <module name="Klaus" /> | ||||||
|  |       <extension name="coverage"> | ||||||
|  |         <pattern> | ||||||
|  |           <option name="PATTERN" value="com.release11.klaus.repository.*" /> | ||||||
|  |           <option name="ENABLED" value="true" /> | ||||||
|  |         </pattern> | ||||||
|  |       </extension> | ||||||
|  |       <option name="PACKAGE_NAME" value="com.release11.klaus.repository" /> | ||||||
|  |       <option name="MAIN_CLASS_NAME" value="com.release11.klaus.repository.MockedResponseRedisRepositoryTest" /> | ||||||
|  |       <option name="METHOD_NAME" value="setMockedResponse" /> | ||||||
|       <option name="TEST_OBJECT" value="method" /> |       <option name="TEST_OBJECT" value="method" /> | ||||||
|       <method v="2"> |       <method v="2"> | ||||||
|         <option name="Make" enabled="true" /> |         <option name="Make" enabled="true" /> | ||||||
| @@ -149,10 +178,10 @@ | |||||||
|     <recent_temporary> |     <recent_temporary> | ||||||
|       <list> |       <list> | ||||||
|         <item itemvalue="Application.KlausApplication" /> |         <item itemvalue="Application.KlausApplication" /> | ||||||
|         <item itemvalue="JUnit.KlausServiceImplTest" /> |         <item itemvalue="JUnit.MockedResponseRedisRepositoryTest.setMockedResponse" /> | ||||||
|         <item itemvalue="JUnit.KlausServiceImplTest.getMockedResponse" /> |         <item itemvalue="JUnit.MockedResponseRedisRepositoryTest.getMockedResponse" /> | ||||||
|         <item itemvalue="JUnit.RedisConfigTest.jedisPool" /> |         <item itemvalue="JUnit.KlausMvcControllerTest.showHome" /> | ||||||
|         <item itemvalue="JUnit.RedisConfigTest" /> |         <item itemvalue="JUnit.KlausControllerTest.getMockedResponse" /> | ||||||
|       </list> |       </list> | ||||||
|     </recent_temporary> |     </recent_temporary> | ||||||
|   </component> |   </component> | ||||||
| @@ -161,139 +190,83 @@ | |||||||
|   </component> |   </component> | ||||||
|   <component name="TaskManager"> |   <component name="TaskManager"> | ||||||
|     <task active="true" id="Default" summary="Default task"> |     <task active="true" id="Default" summary="Default task"> | ||||||
|       <changelist id="625207a7-ac1d-4617-9c3e-c12bef4db83d" name="Default Changelist" comment="" /> |       <changelist id="458cde88-df3d-44bc-9d57-a33823e2f1a6" name="Default Changelist" comment="" /> | ||||||
|       <created>1596116693338</created> |       <created>1598862102028</created> | ||||||
|       <option name="number" value="Default" /> |       <option name="number" value="Default" /> | ||||||
|       <option name="presentableId" value="Default" /> |       <option name="presentableId" value="Default" /> | ||||||
|       <updated>1596116693338</updated> |       <updated>1598862102028</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00001" summary="adding unit tests"> |     <task id="LOCAL-00001" summary="renaming package name"> | ||||||
|       <created>1596121884533</created> |       <created>1598862173280</created> | ||||||
|       <option name="number" value="00001" /> |       <option name="number" value="00001" /> | ||||||
|       <option name="presentableId" value="LOCAL-00001" /> |       <option name="presentableId" value="LOCAL-00001" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1596121884533</updated> |       <updated>1598862173280</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00002" summary="fix for import"> |     <task id="LOCAL-00002" summary="redis spring repo
data indexes for redis repo"> | ||||||
|       <created>1596122179636</created> |       <created>1598875744348</created> | ||||||
|       <option name="number" value="00002" /> |       <option name="number" value="00002" /> | ||||||
|       <option name="presentableId" value="LOCAL-00002" /> |       <option name="presentableId" value="LOCAL-00002" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1596122179637</updated> |       <updated>1598875744348</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00003" summary="adding html form for mockedResponse request"> |     <task id="LOCAL-00003" summary="adding processes for history search
adding custom redis appender"> | ||||||
|       <created>1597847082773</created> |       <created>1598962802209</created> | ||||||
|       <option name="number" value="00003" /> |       <option name="number" value="00003" /> | ||||||
|       <option name="presentableId" value="LOCAL-00003" /> |       <option name="presentableId" value="LOCAL-00003" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1597847082773</updated> |       <updated>1598962802209</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00004" summary="New proxy controller. JavaScript adds own headers and I can't find how to access fields from RequestEntity on html level. Proxy controller will work as client for REST controller and view returner."> |     <task id="LOCAL-00004" summary="Adding logic for events"> | ||||||
|       <created>1597913807407</created> |       <created>1599036875005</created> | ||||||
|       <option name="number" value="00004" /> |       <option name="number" value="00004" /> | ||||||
|       <option name="presentableId" value="LOCAL-00004" /> |       <option name="presentableId" value="LOCAL-00004" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1597913807407</updated> |       <updated>1599036875005</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00005" summary="Request setMockedResponse through html form has been added."> |     <task id="LOCAL-00005" summary="html form for events"> | ||||||
|       <created>1597934773116</created> |       <created>1599058217332</created> | ||||||
|       <option name="number" value="00005" /> |       <option name="number" value="00005" /> | ||||||
|       <option name="presentableId" value="LOCAL-00005" /> |       <option name="presentableId" value="LOCAL-00005" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1597934773116</updated> |       <updated>1599058217332</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00006" summary="-adding get button to index.html
-changing hardcoded url to custom url in KlausMvcController"> |     <task id="LOCAL-00006" summary="get events by days"> | ||||||
|       <created>1598002135223</created> |       <created>1599059677555</created> | ||||||
|       <option name="number" value="00006" /> |       <option name="number" value="00006" /> | ||||||
|       <option name="presentableId" value="LOCAL-00006" /> |       <option name="presentableId" value="LOCAL-00006" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1598002135223</updated> |       <updated>1599059677555</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00007" summary="- changing request setMockedResponse to avoid new headers,
- implementing request getMockedResponse,"> |     <task id="LOCAL-00007" summary="fix for passing default clientUUID in the html form"> | ||||||
|       <created>1598010419642</created> |       <created>1599062582833</created> | ||||||
|       <option name="number" value="00007" /> |       <option name="number" value="00007" /> | ||||||
|       <option name="presentableId" value="LOCAL-00007" /> |       <option name="presentableId" value="LOCAL-00007" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1598010419642</updated> |       <updated>1599062582833</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00008" summary="- changing request getMockedResponse to avoid new headers,"> |     <task id="LOCAL-00008" summary="read events based on dates and clientUUID"> | ||||||
|       <created>1598011869431</created> |       <created>1599121146544</created> | ||||||
|       <option name="number" value="00008" /> |       <option name="number" value="00008" /> | ||||||
|       <option name="presentableId" value="LOCAL-00008" /> |       <option name="presentableId" value="LOCAL-00008" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1598011869431</updated> |       <updated>1599121146544</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00009" summary="- cleaning"> |     <task id="LOCAL-00009" summary="updating html pages"> | ||||||
|       <created>1598014491250</created> |       <created>1599126033571</created> | ||||||
|       <option name="number" value="00009" /> |       <option name="number" value="00009" /> | ||||||
|       <option name="presentableId" value="LOCAL-00009" /> |       <option name="presentableId" value="LOCAL-00009" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1598014491250</updated> |       <updated>1599126033571</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00010" summary="- adding a possibility to set httpStatusCode for mockedResponse entity,"> |     <task id="LOCAL-00010" summary="MvcExceptionHandler"> | ||||||
|       <created>1598024620759</created> |       <created>1599208032926</created> | ||||||
|       <option name="number" value="00010" /> |       <option name="number" value="00010" /> | ||||||
|       <option name="presentableId" value="LOCAL-00010" /> |       <option name="presentableId" value="LOCAL-00010" /> | ||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1598024620759</updated> |       <updated>1599208032926</updated> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00011" summary="- adding hidden clientUUID
- adding repo interface"> |     <option name="localTasksCounter" value="11" /> | ||||||
|       <created>1598277358878</created> |  | ||||||
|       <option name="number" value="00011" /> |  | ||||||
|       <option name="presentableId" value="LOCAL-00011" /> |  | ||||||
|       <option name="project" value="LOCAL" /> |  | ||||||
|       <updated>1598277358878</updated> |  | ||||||
|     </task> |  | ||||||
|     <task id="LOCAL-00012" summary="adding deployment"> |  | ||||||
|       <created>1598347064977</created> |  | ||||||
|       <option name="number" value="00012" /> |  | ||||||
|       <option name="presentableId" value="LOCAL-00012" /> |  | ||||||
|       <option name="project" value="LOCAL" /> |  | ||||||
|       <updated>1598347064977</updated> |  | ||||||
|     </task> |  | ||||||
|     <task id="LOCAL-00013" summary="adding deployment"> |  | ||||||
|       <created>1598347946121</created> |  | ||||||
|       <option name="number" value="00013" /> |  | ||||||
|       <option name="presentableId" value="LOCAL-00013" /> |  | ||||||
|       <option name="project" value="LOCAL" /> |  | ||||||
|       <updated>1598347946121</updated> |  | ||||||
|     </task> |  | ||||||
|     <task id="LOCAL-00014" summary="adding deployment"> |  | ||||||
|       <created>1598348631755</created> |  | ||||||
|       <option name="number" value="00014" /> |  | ||||||
|       <option name="presentableId" value="LOCAL-00014" /> |  | ||||||
|       <option name="project" value="LOCAL" /> |  | ||||||
|       <updated>1598348631755</updated> |  | ||||||
|     </task> |  | ||||||
|     <task id="LOCAL-00015" summary="adding deployment"> |  | ||||||
|       <created>1598353186038</created> |  | ||||||
|       <option name="number" value="00015" /> |  | ||||||
|       <option name="presentableId" value="LOCAL-00015" /> |  | ||||||
|       <option name="project" value="LOCAL" /> |  | ||||||
|       <updated>1598353186039</updated> |  | ||||||
|     </task> |  | ||||||
|     <task id="LOCAL-00016" summary="update to current version
all initial features implemented
tbd:
   etrack
   front"> |  | ||||||
|       <created>1598946630567</created> |  | ||||||
|       <option name="number" value="00016" /> |  | ||||||
|       <option name="presentableId" value="LOCAL-00016" /> |  | ||||||
|       <option name="project" value="LOCAL" /> |  | ||||||
|       <updated>1598946630567</updated> |  | ||||||
|     </task> |  | ||||||
|     <task id="LOCAL-00017" summary="update to current version
all initial features implemented
tbd:
   etrack
   front"> |  | ||||||
|       <created>1598948050686</created> |  | ||||||
|       <option name="number" value="00017" /> |  | ||||||
|       <option name="presentableId" value="LOCAL-00017" /> |  | ||||||
|       <option name="project" value="LOCAL" /> |  | ||||||
|       <updated>1598948050686</updated> |  | ||||||
|     </task> |  | ||||||
|     <task id="LOCAL-00018" summary="executing dockers as host"> |  | ||||||
|       <created>1598953972876</created> |  | ||||||
|       <option name="number" value="00018" /> |  | ||||||
|       <option name="presentableId" value="LOCAL-00018" /> |  | ||||||
|       <option name="project" value="LOCAL" /> |  | ||||||
|       <updated>1598953972876</updated> |  | ||||||
|     </task> |  | ||||||
|     <option name="localTasksCounter" value="19" /> |  | ||||||
|     <servers /> |     <servers /> | ||||||
|   </component> |   </component> | ||||||
|   <component name="Vcs.Log.Tabs.Properties"> |   <component name="Vcs.Log.Tabs.Properties"> | ||||||
| @@ -309,93 +282,90 @@ | |||||||
|     <option name="oldMeFiltersMigrated" value="true" /> |     <option name="oldMeFiltersMigrated" value="true" /> | ||||||
|   </component> |   </component> | ||||||
|   <component name="VcsManagerConfiguration"> |   <component name="VcsManagerConfiguration"> | ||||||
|     <MESSAGE value="adding unit tests" /> |     <MESSAGE value="renaming package name" /> | ||||||
|     <MESSAGE value="fix for import" /> |     <MESSAGE value="redis spring repo
data indexes for redis repo" /> | ||||||
|     <MESSAGE value="adding html form for mockedResponse request" /> |     <MESSAGE value="adding processes for history search
adding custom redis appender" /> | ||||||
|     <MESSAGE value="New proxy controller. JavaScript adds own headers and I can't find how to access fields from RequestEntity on html level. Proxy controller will work as client for REST controller and view returner." /> |     <MESSAGE value="Adding logic for events" /> | ||||||
|     <MESSAGE value="Request setMockedResponse through html form has been added." /> |     <MESSAGE value="html form for events" /> | ||||||
|     <MESSAGE value="-adding get button to index.html
-changing hardcoded url to custom url in KlausMvcController" /> |     <MESSAGE value="get events by days" /> | ||||||
|     <MESSAGE value="- changing request setMockedResponse to avoid new headers,
- implementing request getMockedResponse," /> |     <MESSAGE value="fix for passing default clientUUID in the html form" /> | ||||||
|     <MESSAGE value="- changing request getMockedResponse to avoid new headers," /> |     <MESSAGE value="read events based on dates and clientUUID" /> | ||||||
|     <MESSAGE value="- cleaning" /> |     <MESSAGE value="updating html pages" /> | ||||||
|     <MESSAGE value="- adding a possibility to set httpStatusCode for mockedResponse entity," /> |     <MESSAGE value="MvcExceptionHandler" /> | ||||||
|     <MESSAGE value="- adding hidden clientUUID
- adding repo interface" /> |     <option name="LAST_COMMIT_MESSAGE" value="MvcExceptionHandler" /> | ||||||
|     <MESSAGE value="adding deployment" /> |  | ||||||
|     <MESSAGE value="update to current version
all initial features implemented
tbd:
   etrack
   front" /> |  | ||||||
|     <MESSAGE value="executing dockers as host" /> |  | ||||||
|     <option name="LAST_COMMIT_MESSAGE" value="executing dockers as host" /> |  | ||||||
|   </component> |   </component> | ||||||
|   <component name="WindowStateProjectService"> |   <component name="WindowStateProjectService"> | ||||||
|     <state x="395" y="91" key="#Inspections" timestamp="1598258023842"> |     <state x="574" y="128" key="#com.intellij.ide.util.MemberChooser" timestamp="1599035277816"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state x="395" y="91" key="#Inspections/0.0.1536.824@0.0.1536.824" timestamp="1598258023842" /> |     <state x="574" y="128" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1599035277816" /> | ||||||
|     <state x="574" y="119" key="#com.intellij.ide.util.MemberChooser" timestamp="1598257808309"> |     <state x="551" y="281" width="433" height="267" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes" timestamp="1598949032210"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state x="574" y="119" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1598257808309" /> |     <state x="551" y="281" width="433" height="267" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes/0.0.1536.824@0.0.1536.824" timestamp="1598949032210" /> | ||||||
|     <state x="490" y="0" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog" timestamp="1598257764162"> |     <state x="178" y="0" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog" timestamp="1599209436125"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state x="490" y="0" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/0.0.1536.824@0.0.1536.824" timestamp="1598257764162" /> |     <state x="178" y="0" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/0.0.1536.824@0.0.1536.824" timestamp="1599209436125" /> | ||||||
|     <state x="549" y="167" key="FileChooserDialogImpl" timestamp="1598257918683"> |     <state x="499" y="159" key="#com.intellij.refactoring.typeMigration.ui.FailedConversionsDialog" timestamp="1598966629552"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1598257918683" /> |     <state x="499" y="159" key="#com.intellij.refactoring.typeMigration.ui.FailedConversionsDialog/0.0.1536.824@0.0.1536.824" timestamp="1598966629552" /> | ||||||
|     <state width="1493" height="230" key="GridCell.Tab.0.bottom" timestamp="1598974317570"> |     <state x="549" y="167" key="FileChooserDialogImpl" timestamp="1599137609663"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state width="1493" height="230" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1598974317570" /> |     <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1599137609663" /> | ||||||
|     <state width="1493" height="230" key="GridCell.Tab.0.center" timestamp="1598974317570"> |     <state width="1493" height="180" key="GridCell.Tab.0.bottom" timestamp="1599227805110"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state width="1493" height="230" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1598974317570" /> |     <state width="1493" height="180" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1599227805110" /> | ||||||
|     <state width="1493" height="230" key="GridCell.Tab.0.left" timestamp="1598974317570"> |     <state width="1493" height="180" key="GridCell.Tab.0.center" timestamp="1599227805110"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state width="1493" height="230" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1598974317570" /> |     <state width="1493" height="180" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1599227805110" /> | ||||||
|     <state width="1493" height="230" key="GridCell.Tab.0.right" timestamp="1598974317570"> |     <state width="1493" height="180" key="GridCell.Tab.0.left" timestamp="1599227805110"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state width="1493" height="230" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1598974317570" /> |     <state width="1493" height="180" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1599227805110" /> | ||||||
|     <state width="1493" height="335" key="GridCell.Tab.1.bottom" timestamp="1598024944300"> |     <state width="1493" height="180" key="GridCell.Tab.0.right" timestamp="1599227805110"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state width="1493" height="335" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1598024944300" /> |     <state width="1493" height="180" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1599227805110" /> | ||||||
|     <state width="1493" height="335" key="GridCell.Tab.1.center" timestamp="1598024944300"> |     <state width="1493" height="180" key="GridCell.Tab.1.bottom" timestamp="1599227820376"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state width="1493" height="335" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1598024944300" /> |     <state width="1493" height="180" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1599227820376" /> | ||||||
|     <state width="1493" height="335" key="GridCell.Tab.1.left" timestamp="1598024944300"> |     <state width="1493" height="180" key="GridCell.Tab.1.center" timestamp="1599227820376"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state width="1493" height="335" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1598024944300" /> |     <state width="1493" height="180" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1599227820376" /> | ||||||
|     <state width="1493" height="335" key="GridCell.Tab.1.right" timestamp="1598024944300"> |     <state width="1493" height="180" key="GridCell.Tab.1.left" timestamp="1599227820376"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state width="1493" height="335" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1598024944300" /> |     <state width="1493" height="180" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1599227820376" /> | ||||||
|     <state x="566" y="115" key="RollbackChangesDialog" timestamp="1598001000641"> |     <state width="1493" height="180" key="GridCell.Tab.1.right" timestamp="1599227820376"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state x="566" y="115" key="RollbackChangesDialog/0.0.1536.824@0.0.1536.824" timestamp="1598001000641" /> |     <state width="1493" height="180" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1599227820376" /> | ||||||
|     <state x="361" y="145" key="Vcs.Push.Dialog.v2" timestamp="1598953977709"> |     <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1598862685882"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state x="361" y="145" key="Vcs.Push.Dialog.v2/0.0.1536.824@0.0.1536.824" timestamp="1598953977709" /> |     <state x="299" y="67" key="Maven.ArtifactSearchDialog/0.0.1536.824@0.0.1536.824" timestamp="1598862685882" /> | ||||||
|     <state x="499" y="170" key="refactoring.ChangeSignatureDialog" timestamp="1598020786090"> |     <state x="361" y="145" key="Vcs.Push.Dialog.v2" timestamp="1599208034875"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state x="499" y="170" key="refactoring.ChangeSignatureDialog/0.0.1536.824@0.0.1536.824" timestamp="1598020786090" /> |     <state x="361" y="145" key="Vcs.Push.Dialog.v2/0.0.1536.824@0.0.1536.824" timestamp="1599208034875" /> | ||||||
|     <state x="425" y="187" key="run.anything.popup" timestamp="1598011752020"> |     <state x="209" y="33" key="new project wizard" timestamp="1598955672188"> | ||||||
|       <screen x="0" y="0" width="1536" height="824" /> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </state> |     </state> | ||||||
|     <state x="425" y="187" key="run.anything.popup/0.0.1536.824@0.0.1536.824" timestamp="1598011752020" /> |     <state x="209" y="33" key="new project wizard/0.0.1536.824@0.0.1536.824" timestamp="1598955672188" /> | ||||||
|   </component> |     <state x="425" y="187" key="run.anything.popup" timestamp="1599038237933"> | ||||||
|   <component name="XDebuggerManager"> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     <watches-manager> |     </state> | ||||||
|       <configuration name="Application"> |     <state x="425" y="187" key="run.anything.popup/0.0.1536.824@0.0.1536.824" timestamp="1599038237933" /> | ||||||
|         <watch expression="httpHeaders.entrySet().toArray()[0]" language="JAVA" /> |     <state x="431" y="145" width="672" height="678" key="search.everywhere.popup" timestamp="1599210139274"> | ||||||
|       </configuration> |       <screen x="0" y="0" width="1536" height="824" /> | ||||||
|     </watches-manager> |     </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> | ||||||
| </project> | </project> | ||||||
| @@ -1,6 +1,4 @@ | |||||||
| FROM openjdk:14-alpine as builder | FROM openjdk:14-alpine as builder | ||||||
| RUN whoami |  | ||||||
| RUN ping google.com |  | ||||||
| RUN apk add --no-cache maven | RUN apk add --no-cache maven | ||||||
| WORKDIR /usr/app/klaus | WORKDIR /usr/app/klaus | ||||||
| COPY ./ ./ | COPY ./ ./ | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								pom.xml
									
									
									
									
									
								
							| @@ -17,7 +17,7 @@ | |||||||
| 	<properties> | 	<properties> | ||||||
| 		<java.version>14</java.version> | 		<java.version>14</java.version> | ||||||
| 	</properties> | 	</properties> | ||||||
|  | z | ||||||
| 	<dependencies> | 	<dependencies> | ||||||
| 		<dependency> | 		<dependency> | ||||||
| 			<groupId>org.springframework.boot</groupId> | 			<groupId>org.springframework.boot</groupId> | ||||||
| @@ -86,6 +86,16 @@ | |||||||
| 			<artifactId>logback-redis-appender</artifactId> | 			<artifactId>logback-redis-appender</artifactId> | ||||||
| 			<version>1.1.6</version> | 			<version>1.1.6</version> | ||||||
| 		</dependency> | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>net.logstash.logback</groupId> | ||||||
|  | 			<artifactId>logstash-logback-encoder</artifactId> | ||||||
|  | 			<version>6.4</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>ch.qos.logback</groupId> | ||||||
|  | 			<artifactId>logback-classic</artifactId> | ||||||
|  | 			<version>1.2.3</version> | ||||||
|  | 		</dependency> | ||||||
| 		<dependency> | 		<dependency> | ||||||
| 			<groupId>org.apache.commons</groupId> | 			<groupId>org.apache.commons</groupId> | ||||||
| 			<artifactId>commons-pool2</artifactId> | 			<artifactId>commons-pool2</artifactId> | ||||||
|   | |||||||
| @@ -12,11 +12,11 @@ public class KlausApplication { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| } | } | ||||||
|  | //TODO | ||||||
| //TODO Jenkins | //TODO history logs; for log indexing - create custom log appender for Redis - in case etrack would be too slow | ||||||
| //TODO history logs |  | ||||||
| //TODO JedisPool jedisPool = new JedisPool(jedisPoolConfig, redisHost, redisPort, timeout, redisPassword) | //TODO JedisPool jedisPool = new JedisPool(jedisPoolConfig, redisHost, redisPort, timeout, redisPassword) | ||||||
| //TODO JedisPool optimalization https://partners-intl.aliyun.com/help/doc-detail/98726.htm | //TODO JedisPool optimalization https://partners-intl.aliyun.com/help/doc-detail/98726.htm | ||||||
| // loging and security | // logging, security, account creation | ||||||
| // tracking clients activity | // tracking clients activity, admin panel | ||||||
| // use a centralized logging collection tool like logstash | // use a centralized logging collection tool like logstash for admin panel | ||||||
|  | //TODO split into separate microservices | ||||||
| @@ -10,6 +10,7 @@ import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; | |||||||
| import org.springframework.data.redis.core.RedisTemplate; | import org.springframework.data.redis.core.RedisTemplate; | ||||||
| import org.springframework.data.redis.repository.configuration.EnableRedisRepositories; | import org.springframework.data.redis.repository.configuration.EnableRedisRepositories; | ||||||
| import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; | import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; | ||||||
|  | import redis.clients.jedis.JedisPool; | ||||||
|  |  | ||||||
| import java.util.Objects; | import java.util.Objects; | ||||||
|  |  | ||||||
| @@ -21,6 +22,15 @@ public class RedisConfig { | |||||||
|     @Autowired |     @Autowired | ||||||
|     private Environment environment; |     private Environment environment; | ||||||
|  |  | ||||||
|  |     @Bean | ||||||
|  |     JedisPool jedisPool(){ | ||||||
|  |         //TODO JedisPool jedisPool = new JedisPool(jedisPoolConfig, redisHost, redisPort, timeout, redisPassword) | ||||||
|  |         //TODO JedisPool optimalization https://partners-intl.aliyun.com/help/doc-detail/98726.htm | ||||||
|  |         final JedisPool pool = new JedisPool(environment.getProperty("redis.host"), | ||||||
|  |                 Integer.parseInt(environment.getProperty("redis.port"))); | ||||||
|  |         return pool; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     @Bean |     @Bean | ||||||
|     JedisConnectionFactory jedisConnectionFactory() { |     JedisConnectionFactory jedisConnectionFactory() { | ||||||
|         RedisStandaloneConfiguration redisStandaloneConfiguration = |         RedisStandaloneConfiguration redisStandaloneConfiguration = | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| package com.release11.klaus.controller; | package com.release11.klaus.controller; | ||||||
|  |  | ||||||
|  | import com.release11.klaus.model.EventRequestDto; | ||||||
| import com.release11.klaus.utilis.BusinessKey; | import com.release11.klaus.utilis.BusinessKey; | ||||||
| import com.release11.klaus.utilis.TrackingClient; | import com.release11.klaus.utilis.TrackingClient; | ||||||
| import com.release11.klaus.model.MockedResponseDto; | import com.release11.klaus.model.MockedResponseDto; | ||||||
| @@ -13,6 +14,9 @@ import org.springframework.validation.BindingResult; | |||||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
| import javax.validation.Valid; | import javax.validation.Valid; | ||||||
|  | import java.time.LocalDate; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import java.time.LocalTime; | ||||||
| import java.util.HashMap; | import java.util.HashMap; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
| import java.util.UUID; | import java.util.UUID; | ||||||
| @@ -25,8 +29,7 @@ public class KlausMvcController { | |||||||
|     private final KlausService klausService; |     private final KlausService klausService; | ||||||
|  |  | ||||||
|     @GetMapping("/login") |     @GetMapping("/login") | ||||||
|     public String login(Model model) { |     public String login() { | ||||||
|         model.addAttribute("clientUUID",  UUID.randomUUID()); |  | ||||||
|         return "login"; |         return "login"; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -78,5 +81,17 @@ public class KlausMvcController { | |||||||
|  |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @ModelAttribute("clientUUID") | ||||||
|  |     public UUID clientUUID(){ | ||||||
|  |         return UUID.randomUUID(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @ModelAttribute("eventsDto") | ||||||
|  |     public EventRequestDto eventsDto(){ | ||||||
|  |         return EventRequestDto.builder() | ||||||
|  |                 .localDateTimeFrom(LocalDateTime.of(LocalDate.now(), LocalTime.MIN)) | ||||||
|  |                 .localDateTimeTo(LocalDateTime.of(LocalDate.now().plusDays(1), LocalTime.MIDNIGHT)) | ||||||
|  |                 .build(); | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -3,9 +3,11 @@ package com.release11.klaus.repository; | |||||||
| import com.release11.klaus.model.MockedResponseDto; | import com.release11.klaus.model.MockedResponseDto; | ||||||
| import org.springframework.data.repository.CrudRepository; | import org.springframework.data.repository.CrudRepository; | ||||||
| import org.springframework.stereotype.Repository; | import org.springframework.stereotype.Repository; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  |  | ||||||
| import java.util.UUID; | import java.util.UUID; | ||||||
|  |  | ||||||
| @Repository | @Repository | ||||||
|  | @Transactional | ||||||
| public interface MockedResponseRepository extends CrudRepository<MockedResponseDto, String>{ | public interface MockedResponseRepository extends CrudRepository<MockedResponseDto, String>{ | ||||||
| } | } | ||||||
|   | |||||||
| @@ -4,9 +4,11 @@ import com.release11.klaus.model.MockedResponseDto; | |||||||
| import org.springframework.http.HttpStatus; | import org.springframework.http.HttpStatus; | ||||||
| import org.springframework.http.RequestEntity; | import org.springframework.http.RequestEntity; | ||||||
| import org.springframework.http.ResponseEntity; | import org.springframework.http.ResponseEntity; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
| import java.util.UUID; | import java.util.UUID; | ||||||
|  |  | ||||||
|  | @Service | ||||||
| public interface KlausService { | public interface KlausService { | ||||||
|     ResponseEntity<String> getMockedResponse(UUID clientUUID, int mockedResponseId); |     ResponseEntity<String> getMockedResponse(UUID clientUUID, int mockedResponseId); | ||||||
|     ResponseEntity<String> setMockedResponse(MockedResponseDto mockedResponseDto); |     ResponseEntity<String> setMockedResponse(MockedResponseDto mockedResponseDto); | ||||||
|   | |||||||
| @@ -36,6 +36,7 @@ public class KlausServiceImpl implements KlausService { | |||||||
|     @Override |     @Override | ||||||
|     public ResponseEntity<String> setMockedResponse(MockedResponseDto mockedResponseDto) { |     public ResponseEntity<String> setMockedResponse(MockedResponseDto mockedResponseDto) { | ||||||
|         mockedResponseRepository.save(mockedResponseDto); |         mockedResponseRepository.save(mockedResponseDto); | ||||||
|  |  | ||||||
|         log.info("KlausServiceImpl, operation setMockedResponse, mockedResponseDto {} ", mockedResponseDto.toString()); |         log.info("KlausServiceImpl, operation setMockedResponse, mockedResponseDto {} ", mockedResponseDto.toString()); | ||||||
|         return new ResponseEntity<>("MockedResponse has been setup successfully!", new HttpHeaders(), |         return new ResponseEntity<>("MockedResponse has been setup successfully!", new HttpHeaders(), | ||||||
|                 HttpStatus.ACCEPTED); |                 HttpStatus.ACCEPTED); | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ public final class TrackingClient { | |||||||
|  |  | ||||||
|     public static void setBusinessKeys(Map<BusinessKey, String> businessKeysMap){ |     public static void setBusinessKeys(Map<BusinessKey, String> businessKeysMap){ | ||||||
|         for (Map.Entry<BusinessKey, String> entry : businessKeysMap.entrySet()) { |         for (Map.Entry<BusinessKey, String> entry : businessKeysMap.entrySet()) { | ||||||
|             MDC.put(entry.getKey().getReasonPhrase(), entry.getValue()); |             MDC.put(entry.getKey().toString(), entry.getValue()); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,14 +2,14 @@ | |||||||
| <configuration> | <configuration> | ||||||
|     <include resource="org/springframework/boot/logging/logback/base.xml"/> |     <include resource="org/springframework/boot/logging/logback/base.xml"/> | ||||||
|     <!--https://github.com/kmtong/logback-redis-appender--> |     <!--https://github.com/kmtong/logback-redis-appender--> | ||||||
|     <appender name="LOGSTASH" class="com.cwbase.logback.RedisAppender"> |     <appender name="LOGSTASH" class="com.release11.klaus.utilis.RedisAppender"> | ||||||
|         <host>localhost</host> |         <host>localhost</host> | ||||||
|         <port>6379</port> |         <port>6379</port> | ||||||
|         <key>logstash</key> |         <key>logstash</key> | ||||||
|         <layout class="ch.qos.logback.classic.PatternLayout"> |         <layout class="ch.qos.logback.classic.PatternLayout"> | ||||||
|             <!--https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html--> |             <!--https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html--> | ||||||
|             <Pattern> |             <Pattern> | ||||||
|                 {"date" : "%d{yyyy-MM-dd}", "timestamp":"%d{HH:mm:ss}", "businessKeys": ["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}", "businessKeys":["INTERFACE_NAME:%X{INTERFACE_NAME}", "CLIENT_UUID:%X{CLIENT_UUID}", "MESSAGE_ID:%X{MESSAGE_ID}"],"thread":"%t","level":"%-5level", "message":"%msg"}%n | ||||||
|             </Pattern> |             </Pattern> | ||||||
|         </layout> |         </layout> | ||||||
|     </appender> |     </appender> | ||||||
|   | |||||||
| @@ -1,4 +1,3 @@ | |||||||
|  |  | ||||||
| function httpGet() | function httpGet() | ||||||
| { | { | ||||||
|   var clientUUID = document.getElementById("getClientUUID").value; |   var clientUUID = document.getElementById("getClientUUID").value; | ||||||
|   | |||||||
| @@ -3,32 +3,40 @@ | |||||||
| <head> | <head> | ||||||
|     <meta charset="UTF-8"> |     <meta charset="UTF-8"> | ||||||
|     <title>Title</title> |     <title>Title</title> | ||||||
|     <script src="/js/main.js"></script> |     <script src="/js/main.js"> | ||||||
|  |         document.getElementById('localDateTimeFrom').valueAsDate = new Date(); | ||||||
|  |     </script> | ||||||
|  |     <link href="css/styles.css" rel="stylesheet" /> | ||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
| <hr> | <hr> | ||||||
|  |  | ||||||
| <div><br>In order to set mockup response. Please send the response, that you want to receive, on: | <div><br>In order to set mockup response. Please send the response, that you want to receive, on: | ||||||
|     <br>http://localhost:8097/klaus/v1/set/ <a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}?httpStatus=200 |     <br>http://localhost:8097/klaus/v1/set/ <a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}?httpStatus=200 | ||||||
|     <br>or simply fill and submit the below form:</div> | </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: | ||||||
|  |  | ||||||
| <div class="col-lg-4 form-max"> |  | ||||||
|     sayHi('John'); |  | ||||||
|                 <form action="#" th:action="@{/home}" th:object="${mockedResponseDto}" method="post"> |                 <form action="#" th:action="@{/home}" th:object="${mockedResponseDto}" method="post"> | ||||||
|                     <table> |                     <table> | ||||||
|                         <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> |                         <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> | ||||||
|                         <tr> |                         <tr> | ||||||
|                             <td>Mocked response id:</td> |                             <td>Mocked response id:</td> | ||||||
|                 <td><input type="text" th:field="*{mockedResponseId}" th:value=1/></td> |                             <td><input type="text" th:field="*{mockedResponseId}"/></td> | ||||||
|                             <td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">Id Error</td> |                             <td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">Id Error</td> | ||||||
|                         </tr> |                         </tr> | ||||||
|                         <tr> |                         <tr> | ||||||
|                             <td>Mocked response body:</td> |                             <td>Mocked response body:</td> | ||||||
|                 <td><textarea rows="4" cols="50" th:field="*{messageBody}" th:placeholder='messageBody'></textarea></td> |                             <td><textarea rows="4" cols="50" th:field="*{messageBody}"></textarea></td> | ||||||
|                             <td th:if="${#fields.hasErrors('messageBody')}" th:errors="*{messageBody}">Body Error</td> |                             <td th:if="${#fields.hasErrors('messageBody')}" th:errors="*{messageBody}">Body Error</td> | ||||||
|                         </tr> |                         </tr> | ||||||
|                         <tr> |                         <tr> | ||||||
|                             <td>Mocked response http code status:</td> |                             <td>Mocked response http code status:</td> | ||||||
|                 <td><input type="text" th:field="*{httpStatus}" th:value='200'></td> |                             <td><input type="text" th:field="*{httpStatus}"></td> | ||||||
|                             <td th:if="${#fields.hasErrors('httpStatus')}" th:errors="*{httpStatus}">HttpStatus Error</td> |                             <td th:if="${#fields.hasErrors('httpStatus')}" th:errors="*{httpStatus}">HttpStatus Error</td> | ||||||
|                         </tr> |                         </tr> | ||||||
|                         <tr> |                         <tr> | ||||||
| @@ -54,25 +62,56 @@ | |||||||
|                         </tr> |                         </tr> | ||||||
|                     </table> |                     </table> | ||||||
|                 </form> |                 </form> | ||||||
|  |                 <table> | ||||||
|  |                     <tr> | ||||||
|  |                         <td> | ||||||
|                             <p th:if="${mockSaved}">Mock has been saved</p> |                             <p th:if="${mockSaved}">Mock has been saved</p> | ||||||
|  |                         </td> | ||||||
|  |                         <td> | ||||||
|  |                             <form action="#" th:action="@{/home/getMockedResponse}" th:object="${mockedResponseDto}" method="get"> | ||||||
|  |                                 <input type="text" th:field="*{clientUUID}" hidden/> | ||||||
|  |                                 <input type="text" th:field="*{mockedResponseId}" hidden/> | ||||||
|  |                                 <p th:if="${mockSaved}"><input type="submit" value="Test your mock"/></p> | ||||||
|  |                             </form> | ||||||
|  |                         </td> | ||||||
|  |                     </tr> | ||||||
|  |                 </table> | ||||||
|  |             </div> | ||||||
|  |             <div class="column"> | ||||||
|  |                 Your mocked requests: | ||||||
|  |                 <br> | ||||||
|  | larum ispum srutum tutum | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |     </div> | ||||||
|  | </section> | ||||||
|  |  | ||||||
|  |  | ||||||
|     <hr> |     <hr> | ||||||
|  |     <div> | ||||||
|     <div><br>In order to use the mocked response in your integration tests or simply |         <br>In order to use the mocked response in your integration tests or simply | ||||||
|         get your mocked response please send a request to |         get your mocked response please send a request to | ||||||
|         <br>http://localhost:8097/klaus/v1/get/<a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId} |         <br>http://localhost:8097/klaus/v1/get/<a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId} | ||||||
|  |         <br>You will receive the same body and headers as you sent them in the step 1. | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|     <div><br>You will receive the same body and headers as you sent them in the step 1.</div> |     <hr> | ||||||
|     <div><br>You can also use the form below:</div> |     <div> | ||||||
|     <form action="#" th:action="@{/home/getMockedResponse}" th:object="${mockedResponseDto}" method="get"> |         <br>To see your activity history use the form below | ||||||
|         <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> |         <form action="#" th:action="@{/eventsForm}" th:object="${eventsDto}" method="post"> | ||||||
|         <br><label >Mocked response id:</label><br/> |             <input type="text" th:name="clientUUID" th:value="${mockedResponseDto.clientUUID}" hidden/> | ||||||
|         <input type="text" th:field="*{mockedResponseId}" th:placeholder="12345"/> |             <br><label>Date from:</label><br> | ||||||
|         <input type="submit" value="Get mocked response"/> |             <input type="datetime-local" th:field="*{localDateTimeFrom}"/> | ||||||
|  |             <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> | ||||||
|  |             <div th:if="${#fields.hasAnyErrors()}"> | ||||||
|  |                 <p th:each="err : ${#fields.allErrors()}" th:text="${err}">...</p> | ||||||
|  |             </div> | ||||||
|  |             <input type="submit" value="See my history"/> | ||||||
|         </form> |         </form> | ||||||
|  |     </div> | ||||||
|     <hr> |     <hr> | ||||||
| </div> | </div> | ||||||
| </div> | </div> | ||||||
|   | |||||||
| @@ -4,6 +4,7 @@ | |||||||
|     <meta charset="UTF-8"> |     <meta charset="UTF-8"> | ||||||
|     <title>Login</title> |     <title>Login</title> | ||||||
|     <script src="/js/main.js"></script> |     <script src="/js/main.js"></script> | ||||||
|  |     <link href="css/styles.css" rel="stylesheet" /> | ||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
| <div><br>Please move to the next step with your own client UUID: </div> | <div><br>Please move to the next step with your own client UUID: </div> | ||||||
| @@ -12,7 +13,6 @@ | |||||||
|     <input type="text" name="clientUUID" value="436c4774-038f-4540-9c18-2691ca9b53d4" /> |     <input type="text" name="clientUUID" value="436c4774-038f-4540-9c18-2691ca9b53d4" /> | ||||||
|     <input type="submit" value="Proceed"/> |     <input type="submit" value="Proceed"/> | ||||||
| </form> | </form> | ||||||
|  |  | ||||||
| <div><br>You can also register new UUID. *some logic to register UUID*: | <div><br>You can also register new UUID. *some logic to register UUID*: | ||||||
| <br><a th:text="${clientUUID}">clientUUID should be here</a> | <br><a th:text="${clientUUID}">clientUUID should be here</a> | ||||||
| </div> | </div> | ||||||
|   | |||||||
| @@ -1,11 +1,23 @@ | |||||||
| package com.release11.klaus.controller; | package com.release11.klaus.controller; | ||||||
|  |  | ||||||
|  | import org.apache.tomcat.jni.Local; | ||||||
| import org.junit.jupiter.api.Test; | import org.junit.jupiter.api.Test; | ||||||
|  |  | ||||||
|  | import java.time.LocalDate; | ||||||
|  | import java.time.Month; | ||||||
|  | import java.time.Period; | ||||||
|  |  | ||||||
| class KlausControllerTest { | class KlausControllerTest { | ||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
|     void getMockedResponse() { |     void getMockedResponse() { | ||||||
|  |         LocalDate localDate = LocalDate.now(); | ||||||
|  |         LocalDate localDate1 = LocalDate.now(); | ||||||
|  |  | ||||||
|  |         System.out.println(localDate.compareTo(localDate1)); | ||||||
|  |         System.out.println(localDate1); | ||||||
|  |         Period period = Period.between(localDate, localDate1); | ||||||
|  |         System.out.println(period); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
|   | |||||||
| @@ -1,8 +1,11 @@ | |||||||
| package com.release11.klaus.controller; | package com.release11.klaus.controller; | ||||||
|  |  | ||||||
|  | import com.release11.klaus.model.Event; | ||||||
|  | import com.release11.klaus.model.EventRequestDto; | ||||||
| import org.junit.jupiter.api.Test; | import org.junit.jupiter.api.Test; | ||||||
| import org.springframework.http.HttpStatus; | import org.springframework.http.HttpStatus; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
| import java.util.Arrays; | import java.util.Arrays; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||||
| @@ -15,5 +18,8 @@ class KlausMvcControllerTest { | |||||||
|     @Test |     @Test | ||||||
|     void showHome() { |     void showHome() { | ||||||
|  |  | ||||||
|  |         EventRequestDto eventRequestDto = EventRequestDto.builder(). | ||||||
|  |                 localDateTimeTo(LocalDateTime.now()).build(); | ||||||
|  |         System.out.println(eventRequestDto); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,21 +1,57 @@ | |||||||
| package com.release11.klaus.repository; | package com.release11.klaus.repository; | ||||||
|  |  | ||||||
|  | import com.fasterxml.jackson.core.JsonProcessingException; | ||||||
|  | import com.fasterxml.jackson.databind.ObjectMapper; | ||||||
|  | import com.release11.klaus.model.Event; | ||||||
|  | import com.release11.klaus.utilis.BusinessKey; | ||||||
| import org.junit.jupiter.api.Test; | import org.junit.jupiter.api.Test; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.springframework.boot.test.context.SpringBootTest; | import org.springframework.boot.test.context.SpringBootTest; | ||||||
|  |  | ||||||
|  | import java.time.LocalDate; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import java.time.LocalTime; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
| @SpringBootTest | @SpringBootTest | ||||||
| class MockedResponseRedisRepositoryTest { | class MockedResponseRedisRepositoryTest { | ||||||
|  |     @Autowired | ||||||
|  |     ObjectMapper objectMapper; | ||||||
|  |  | ||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
|     void getMockedResponse() { |     void getMockedResponse() throws JsonProcessingException { | ||||||
|  |         Map<BusinessKey, String> businessKeys = new HashMap<>(); | ||||||
|  |         String[] businessKeys1 = {"fdsa", "Dsa", "dsa"}; | ||||||
|  |         businessKeys.put(BusinessKey.CLIENT_UUID, "xxx"); | ||||||
|  |         businessKeys.put(BusinessKey.INTERFACE_NAME, "interfaceName"); | ||||||
|  |         businessKeys.put(BusinessKey.MESSAGE_ID, "2323"); | ||||||
|  |         Event event = Event.builder() | ||||||
|  |                 .dateTimeStamp(LocalDateTime.now()) | ||||||
|  |                 .businessKeys(businessKeys1) | ||||||
|  |                 .message("hello") | ||||||
|  |                 .level("INFO") | ||||||
|  |                 .thread("main") | ||||||
|  |                 .build(); | ||||||
|  |         String eventString = objectMapper.writeValueAsString(event); | ||||||
|  |         System.out.println(eventString); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         String ddd = "{\"dateTimeStamp\" : \"2020-09-04T15:31:48\", \"businessKeys\":[\"INTERFACE_NAME:setMockedResponse\", \"CLIENT_UUID:436c4774-038f-4540-9c18-2691ca9b53d4\", \"MESSAGE_ID:1\"],\"thread\":\"http-nio-8097-exec-6\",\"level\":\"INFO \", \"message\":\"MockedResponseDto(compositePrimaryKey=null, clientUUID=436c4774-038f-4540-9c18-2691ca9b53d4, mockedResponseId=1, mediaType=application/xml, messageBody=body, httpHeaders=null, httpStatus=200)\" dsads}das"; | ||||||
|  |         objectMapper.readValue(eventString, Event.class); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
|     void setMockedResponse() { |     void setMockedResponse() { | ||||||
| //        System.out.println("Before Test, clearing Redis"); |  | ||||||
| //        JedisPool pool = new JedisPool("localhost"); |         List<String> stringList = new ArrayList<>(); | ||||||
| //        redis = pool.getResource(); |         stringList.add("ddddd"); | ||||||
| //        redis.ltrim(key, 1, 0); |         stringList.add("www"); | ||||||
|  |  | ||||||
|  |         stringList.stream().filter(s -> s.length() > 3).forEach(System.out::println); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| server.port = 8098 | server.port = 8097 | ||||||
| spring.output.ansi.enabled = always | spring.output.ansi.enabled = always | ||||||
|  |  | ||||||
| #logging.file.name=/var/log/klaus/ | #logging.file.name=/var/log/klaus/ | ||||||
|   | |||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -2,14 +2,14 @@ | |||||||
| <configuration> | <configuration> | ||||||
|     <include resource="org/springframework/boot/logging/logback/base.xml"/> |     <include resource="org/springframework/boot/logging/logback/base.xml"/> | ||||||
|     <!--https://github.com/kmtong/logback-redis-appender--> |     <!--https://github.com/kmtong/logback-redis-appender--> | ||||||
|     <appender name="LOGSTASH" class="com.cwbase.logback.RedisAppender"> |     <appender name="LOGSTASH" class="com.release11.klaus.utilis.RedisAppender"> | ||||||
|         <host>localhost</host> |         <host>localhost</host> | ||||||
|         <port>6379</port> |         <port>6379</port> | ||||||
|         <key>logstash</key> |         <key>logstash</key> | ||||||
|         <layout class="ch.qos.logback.classic.PatternLayout"> |         <layout class="ch.qos.logback.classic.PatternLayout"> | ||||||
|             <!--https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html--> |             <!--https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html--> | ||||||
|             <Pattern> |             <Pattern> | ||||||
|                 {"date" : "%d{yyyy-MM-dd}", "timestamp":"%d{HH:mm:ss}", "businessKeys": ["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}", "businessKeys":["INTERFACE_NAME:%X{INTERFACE_NAME}", "CLIENT_UUID:%X{CLIENT_UUID}", "MESSAGE_ID:%X{MESSAGE_ID}"],"thread":"%t","level":"%-5level", "message":"%msg"}%n | ||||||
|             </Pattern> |             </Pattern> | ||||||
|         </layout> |         </layout> | ||||||
|     </appender> |     </appender> | ||||||
|   | |||||||
| @@ -1,4 +1,3 @@ | |||||||
|  |  | ||||||
| function httpGet() | function httpGet() | ||||||
| { | { | ||||||
|   var clientUUID = document.getElementById("getClientUUID").value; |   var clientUUID = document.getElementById("getClientUUID").value; | ||||||
|   | |||||||
| @@ -3,32 +3,40 @@ | |||||||
| <head> | <head> | ||||||
|     <meta charset="UTF-8"> |     <meta charset="UTF-8"> | ||||||
|     <title>Title</title> |     <title>Title</title> | ||||||
|     <script src="/js/main.js"></script> |     <script src="/js/main.js"> | ||||||
|  |         document.getElementById('localDateTimeFrom').valueAsDate = new Date(); | ||||||
|  |     </script> | ||||||
|  |     <link href="css/styles.css" rel="stylesheet" /> | ||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
| <hr> | <hr> | ||||||
|  |  | ||||||
| <div><br>In order to set mockup response. Please send the response, that you want to receive, on: | <div><br>In order to set mockup response. Please send the response, that you want to receive, on: | ||||||
|     <br>http://localhost:8097/klaus/v1/set/ <a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}?httpStatus=200 |     <br>http://localhost:8097/klaus/v1/set/ <a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId}?httpStatus=200 | ||||||
|     <br>or simply fill and submit the below form:</div> | </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: | ||||||
|  |  | ||||||
| <div class="col-lg-4 form-max"> |  | ||||||
|     sayHi('John'); |  | ||||||
|                 <form action="#" th:action="@{/home}" th:object="${mockedResponseDto}" method="post"> |                 <form action="#" th:action="@{/home}" th:object="${mockedResponseDto}" method="post"> | ||||||
|                     <table> |                     <table> | ||||||
|                         <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> |                         <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> | ||||||
|                         <tr> |                         <tr> | ||||||
|                             <td>Mocked response id:</td> |                             <td>Mocked response id:</td> | ||||||
|                 <td><input type="text" th:field="*{mockedResponseId}" th:value=1/></td> |                             <td><input type="text" th:field="*{mockedResponseId}"/></td> | ||||||
|                             <td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">Id Error</td> |                             <td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">Id Error</td> | ||||||
|                         </tr> |                         </tr> | ||||||
|                         <tr> |                         <tr> | ||||||
|                             <td>Mocked response body:</td> |                             <td>Mocked response body:</td> | ||||||
|                 <td><textarea rows="4" cols="50" th:field="*{messageBody}" th:placeholder='messageBody'></textarea></td> |                             <td><textarea rows="4" cols="50" th:field="*{messageBody}"></textarea></td> | ||||||
|                             <td th:if="${#fields.hasErrors('messageBody')}" th:errors="*{messageBody}">Body Error</td> |                             <td th:if="${#fields.hasErrors('messageBody')}" th:errors="*{messageBody}">Body Error</td> | ||||||
|                         </tr> |                         </tr> | ||||||
|                         <tr> |                         <tr> | ||||||
|                             <td>Mocked response http code status:</td> |                             <td>Mocked response http code status:</td> | ||||||
|                 <td><input type="text" th:field="*{httpStatus}" th:value='200'></td> |                             <td><input type="text" th:field="*{httpStatus}"></td> | ||||||
|                             <td th:if="${#fields.hasErrors('httpStatus')}" th:errors="*{httpStatus}">HttpStatus Error</td> |                             <td th:if="${#fields.hasErrors('httpStatus')}" th:errors="*{httpStatus}">HttpStatus Error</td> | ||||||
|                         </tr> |                         </tr> | ||||||
|                         <tr> |                         <tr> | ||||||
| @@ -54,25 +62,56 @@ | |||||||
|                         </tr> |                         </tr> | ||||||
|                     </table> |                     </table> | ||||||
|                 </form> |                 </form> | ||||||
|  |                 <table> | ||||||
|  |                     <tr> | ||||||
|  |                         <td> | ||||||
|                             <p th:if="${mockSaved}">Mock has been saved</p> |                             <p th:if="${mockSaved}">Mock has been saved</p> | ||||||
|  |                         </td> | ||||||
|  |                         <td> | ||||||
|  |                             <form action="#" th:action="@{/home/getMockedResponse}" th:object="${mockedResponseDto}" method="get"> | ||||||
|  |                                 <input type="text" th:field="*{clientUUID}" hidden/> | ||||||
|  |                                 <input type="text" th:field="*{mockedResponseId}" hidden/> | ||||||
|  |                                 <p th:if="${mockSaved}"><input type="submit" value="Test your mock"/></p> | ||||||
|  |                             </form> | ||||||
|  |                         </td> | ||||||
|  |                     </tr> | ||||||
|  |                 </table> | ||||||
|  |             </div> | ||||||
|  |             <div class="column"> | ||||||
|  |                 Your mocked requests: | ||||||
|  |                 <br> | ||||||
|  | larum ispum srutum tutum | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |     </div> | ||||||
|  | </section> | ||||||
|  |  | ||||||
|  |  | ||||||
|     <hr> |     <hr> | ||||||
|  |     <div> | ||||||
|     <div><br>In order to use the mocked response in your integration tests or simply |         <br>In order to use the mocked response in your integration tests or simply | ||||||
|         get your mocked response please send a request to |         get your mocked response please send a request to | ||||||
|         <br>http://localhost:8097/klaus/v1/get/<a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId} |         <br>http://localhost:8097/klaus/v1/get/<a th:text="${mockedResponseDto.clientUUID}">clientUUID should be here</a>/{mockedResponseId} | ||||||
|  |         <br>You will receive the same body and headers as you sent them in the step 1. | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|     <div><br>You will receive the same body and headers as you sent them in the step 1.</div> |     <hr> | ||||||
|     <div><br>You can also use the form below:</div> |     <div> | ||||||
|     <form action="#" th:action="@{/home/getMockedResponse}" th:object="${mockedResponseDto}" method="get"> |         <br>To see your activity history use the form below | ||||||
|         <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> |         <form action="#" th:action="@{/eventsForm}" th:object="${eventsDto}" method="post"> | ||||||
|         <br><label >Mocked response id:</label><br/> |             <input type="text" th:name="clientUUID" th:value="${mockedResponseDto.clientUUID}" hidden/> | ||||||
|         <input type="text" th:field="*{mockedResponseId}" th:placeholder="12345"/> |             <br><label>Date from:</label><br> | ||||||
|         <input type="submit" value="Get mocked response"/> |             <input type="datetime-local" th:field="*{localDateTimeFrom}"/> | ||||||
|  |             <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> | ||||||
|  |             <div th:if="${#fields.hasAnyErrors()}"> | ||||||
|  |                 <p th:each="err : ${#fields.allErrors()}" th:text="${err}">...</p> | ||||||
|  |             </div> | ||||||
|  |             <input type="submit" value="See my history"/> | ||||||
|         </form> |         </form> | ||||||
|  |     </div> | ||||||
|     <hr> |     <hr> | ||||||
| </div> | </div> | ||||||
| </div> | </div> | ||||||
|   | |||||||
| @@ -4,6 +4,7 @@ | |||||||
|     <meta charset="UTF-8"> |     <meta charset="UTF-8"> | ||||||
|     <title>Login</title> |     <title>Login</title> | ||||||
|     <script src="/js/main.js"></script> |     <script src="/js/main.js"></script> | ||||||
|  |     <link href="css/styles.css" rel="stylesheet" /> | ||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
| <div><br>Please move to the next step with your own client UUID: </div> | <div><br>Please move to the next step with your own client UUID: </div> | ||||||
| @@ -12,7 +13,6 @@ | |||||||
|     <input type="text" name="clientUUID" value="436c4774-038f-4540-9c18-2691ca9b53d4" /> |     <input type="text" name="clientUUID" value="436c4774-038f-4540-9c18-2691ca9b53d4" /> | ||||||
|     <input type="submit" value="Proceed"/> |     <input type="submit" value="Proceed"/> | ||||||
| </form> | </form> | ||||||
|  |  | ||||||
| <div><br>You can also register new UUID. *some logic to register UUID*: | <div><br>You can also register new UUID. *some logic to register UUID*: | ||||||
| <br><a th:text="${clientUUID}">clientUUID should be here</a> | <br><a th:text="${clientUUID}">clientUUID should be here</a> | ||||||
| </div> | </div> | ||||||
|   | |||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user
	 Szakalakamaka
					Szakalakamaka