changing index.html and adding Etrack
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| server.port = 8098 | ||||
| server.port = 8097 | ||||
| spring.output.ansi.enabled = always | ||||
|  | ||||
| #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> | ||||
|     <include resource="org/springframework/boot/logging/logback/base.xml"/> | ||||
|     <!--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> | ||||
|         <port>6379</port> | ||||
|         <key>logstash</key> | ||||
|         <layout class="ch.qos.logback.classic.PatternLayout"> | ||||
|             <!--https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html--> | ||||
|             <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> | ||||
|         </layout> | ||||
|     </appender> | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
|  | ||||
| function httpGet() | ||||
| { | ||||
|   var clientUUID = document.getElementById("getClientUUID").value; | ||||
|   | ||||
| @@ -3,76 +3,115 @@ | ||||
| <head> | ||||
|     <meta charset="UTF-8"> | ||||
|     <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> | ||||
| <body> | ||||
| <hr> | ||||
|     <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>or simply fill and submit the below form:</div> | ||||
|  | ||||
| <div class="col-lg-4 form-max"> | ||||
|     sayHi('John'); | ||||
|     <form action="#" th:action="@{/home}" th:object="${mockedResponseDto}" method="post"> | ||||
|         <table> | ||||
|             <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> | ||||
|             <tr> | ||||
|                 <td>Mocked response id:</td> | ||||
|                 <td><input type="text" th:field="*{mockedResponseId}" th:value=1/></td> | ||||
|                 <td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">Id Error</td> | ||||
|             </tr> | ||||
|             <tr> | ||||
|                 <td>Mocked response body:</td> | ||||
|                 <td><textarea rows="4" cols="50" th:field="*{messageBody}" th:placeholder='messageBody'></textarea></td> | ||||
|                 <td th:if="${#fields.hasErrors('messageBody')}" th:errors="*{messageBody}">Body Error</td> | ||||
|             </tr> | ||||
|             <tr> | ||||
|                 <td>Mocked response http code status:</td> | ||||
|                 <td><input type="text" th:field="*{httpStatus}" th:value='200'></td> | ||||
|                 <td th:if="${#fields.hasErrors('httpStatus')}" th:errors="*{httpStatus}">HttpStatus Error</td> | ||||
|             </tr> | ||||
|             <tr> | ||||
|                 <td>Provide mocked response headers:</td> | ||||
|                 <td><a href="#" id="addHeader" onclick="addFields()">Add a new header</a> | ||||
| <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 | ||||
| </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: | ||||
|  | ||||
|                 <form action="#" th:action="@{/home}" th:object="${mockedResponseDto}" method="post"> | ||||
|                     <table> | ||||
|                         <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> | ||||
|                         <tr> | ||||
|                             <td><div id="headers"></div></td> | ||||
|                             <td>Mocked response id:</td> | ||||
|                             <td><input type="text" th:field="*{mockedResponseId}"/></td> | ||||
|                             <td th:if="${#fields.hasErrors('mockedResponseId')}" th:errors="*{mockedResponseId}">Id Error</td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|                             <td>Mocked response body:</td> | ||||
|                             <td><textarea rows="4" cols="50" th:field="*{messageBody}"></textarea></td> | ||||
|                             <td th:if="${#fields.hasErrors('messageBody')}" th:errors="*{messageBody}">Body Error</td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|                             <td>Mocked response http code status:</td> | ||||
|                             <td><input type="text" th:field="*{httpStatus}"></td> | ||||
|                             <td th:if="${#fields.hasErrors('httpStatus')}" th:errors="*{httpStatus}">HttpStatus Error</td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|                             <td>Provide mocked response headers:</td> | ||||
|                             <td><a href="#" id="addHeader" onclick="addFields()">Add a new header</a> | ||||
|                                 <table> | ||||
|                                     <tr> | ||||
|                                         <td><div id="headers"></div></td> | ||||
|                                     </tr> | ||||
|                                 </table> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|                             <td>Media type:</td> | ||||
|                             <td><select th:field="*{mediaType}"> | ||||
|                                 <option value="application/xml">application/xml</option> | ||||
|                                 <option value="application/json">application/json</option> | ||||
|                                 <option value="text/xml">text/xml</option> | ||||
|                             </select></td> | ||||
|                         </tr> | ||||
|                         <tr> | ||||
|                             <td><input type="submit" value="Save mocked response"/></td> | ||||
|                         </tr> | ||||
|                     </table> | ||||
|                 </td> | ||||
|             </tr> | ||||
|             <tr> | ||||
|                 <td>Media type:</td> | ||||
|                 <td><select th:field="*{mediaType}"> | ||||
|                     <option value="application/xml">application/xml</option> | ||||
|                     <option value="application/json">application/json</option> | ||||
|                     <option value="text/xml">text/xml</option> | ||||
|                 </select></td> | ||||
|             </tr> | ||||
|             <tr> | ||||
|                 <td><input type="submit" value="Save mocked response"/></td> | ||||
|             </tr> | ||||
|         </table> | ||||
|     </form> | ||||
|  | ||||
|     <p th:if="${mockSaved}">Mock has been saved</p> | ||||
|                 </form> | ||||
|                 <table> | ||||
|                     <tr> | ||||
|                         <td> | ||||
|                             <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> | ||||
|  | ||||
|     <div><br>In order to use the mocked response in your integration tests or simply | ||||
|     <div> | ||||
|         <br>In order to use the mocked response in your integration tests or simply | ||||
|         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>You will receive the same body and headers as you sent them in the step 1. | ||||
|     </div> | ||||
|  | ||||
|     <div><br>You will receive the same body and headers as you sent them in the step 1.</div> | ||||
|     <div><br>You can also use the form below:</div> | ||||
|     <form action="#" th:action="@{/home/getMockedResponse}" th:object="${mockedResponseDto}" method="get"> | ||||
|         <input type="text" th:field="*{clientUUID}" th:placeholder="*{clientUUID}" hidden/> | ||||
|         <br><label >Mocked response id:</label><br/> | ||||
|         <input type="text" th:field="*{mockedResponseId}" th:placeholder="12345"/> | ||||
|         <input type="submit" value="Get mocked response"/> | ||||
|     </form> | ||||
|     <hr> | ||||
|     <div> | ||||
|         <br>To see your activity history use the form below | ||||
|         <form action="#" th:action="@{/eventsForm}" th:object="${eventsDto}" method="post"> | ||||
|             <input type="text" th:name="clientUUID" th:value="${mockedResponseDto.clientUUID}" hidden/> | ||||
|             <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> | ||||
|             <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> | ||||
|     </div> | ||||
|     <hr> | ||||
| </div> | ||||
| </div> | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
|     <meta charset="UTF-8"> | ||||
|     <title>Login</title> | ||||
|     <script src="/js/main.js"></script> | ||||
|     <link href="css/styles.css" rel="stylesheet" /> | ||||
| </head> | ||||
| <body> | ||||
| <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="submit" value="Proceed"/> | ||||
| </form> | ||||
|  | ||||
| <div><br>You can also register new UUID. *some logic to register UUID*: | ||||
| <br><a th:text="${clientUUID}">clientUUID should be here</a> | ||||
| </div> | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user
	 Szakalakamaka
					Szakalakamaka