T153 Removed advanced function. Corrected JavaScript with missing semicolons that might have caused errors
This commit is contained in:
6
.idea/workspace.xml
generated
6
.idea/workspace.xml
generated
@@ -20,12 +20,8 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<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$/src/main/java/com/release11/klaus/controller/MainController.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/static/js/paggination.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/static/js/paggination.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/templates/login.html" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/templates/temp.html" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/templates/tools.html" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/resources/templates/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/index.html" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
@@ -27,12 +27,12 @@ document.querySelector('#btn-list-1').addEventListener('click', function() {
|
||||
} else {
|
||||
x.style.display = "none";
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
for (let i = 3; i >= 0; i--) {
|
||||
document.querySelector('#btn-sort-' + i).addEventListener('click', function() {
|
||||
addButtonListeners(i)
|
||||
addButtonListeners(i);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -60,20 +60,20 @@ function pagination(querySet, page, rows) {
|
||||
function pageButtons(pages) {
|
||||
var wrapper = document.getElementById('pagination-wrapper');
|
||||
wrapper.innerHTML = ``;
|
||||
var maxLeft = (state.page - Math.floor(state.window / 2))
|
||||
var maxRight = (state.page + Math.ceil(state.window / 2))
|
||||
var maxLeft = (state.page - Math.floor(state.window / 2));
|
||||
var maxRight = (state.page + Math.ceil(state.window / 2));
|
||||
if (maxLeft < 1) {
|
||||
maxLeft = 1
|
||||
maxRight = state.window
|
||||
maxLeft = 1;
|
||||
maxRight = state.window;
|
||||
}
|
||||
|
||||
if (maxRight > pages) {
|
||||
maxLeft = pages - (state.window - 1)
|
||||
maxLeft = pages - (state.window - 1);
|
||||
|
||||
if (maxLeft < 1) {
|
||||
maxLeft = 1
|
||||
maxLeft = 1;
|
||||
}
|
||||
maxRight = pages
|
||||
maxRight = pages;
|
||||
}
|
||||
|
||||
for (var page = maxLeft; page <= maxRight; page++) {
|
||||
@@ -93,12 +93,12 @@ function pageButtons(pages) {
|
||||
}
|
||||
|
||||
$('.page').on('click', function() {
|
||||
$('#table-body').empty()
|
||||
$('#table-body').empty();
|
||||
|
||||
state.page = Number($(this).val())
|
||||
state.page = Number($(this).val());
|
||||
|
||||
buildPage()
|
||||
})
|
||||
buildPage();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
@@ -143,7 +143,7 @@ function showTable() {
|
||||
</td>
|
||||
`
|
||||
}
|
||||
table.append(row)
|
||||
table.append(row);
|
||||
}
|
||||
for (var i = myList.length + 1; i <= state.rows; i++) {
|
||||
var j = i + (state.page - 1) * 10;
|
||||
@@ -164,7 +164,7 @@ function showTable() {
|
||||
}
|
||||
table.append(row)
|
||||
}
|
||||
pageButtons(data.pages)
|
||||
pageButtons(data.pages);
|
||||
}
|
||||
|
||||
function sortTable() {
|
||||
@@ -202,8 +202,8 @@ console.log("sortTable");
|
||||
}
|
||||
|
||||
function prepareTable() {
|
||||
data = pagination(state.querySet, state.page, state.rows)
|
||||
myList = data.querySet
|
||||
data = pagination(state.querySet, state.page, state.rows);
|
||||
myList = data.querySet;
|
||||
}
|
||||
|
||||
function buildTable() {
|
||||
|
||||
@@ -192,22 +192,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="advanced-wrapper" style="display: none;">
|
||||
<br>If you are keen to use the mocking service with bigger amount of messages or automate the process by
|
||||
inserting
|
||||
high amount of random messages please consider using swagger or send batch requests on the urls below:
|
||||
|
||||
<br><a
|
||||
href="http://[[${localhost}]]:8097/swagger-ui.html">http://[[${localhost}]]:8097/swagger-ui.html</a>
|
||||
<br>
|
||||
<br>http://[[${localhost}]]:8097/klaus/v1/delete/[[${mockedMessageDto.clientUUID}]]/{mockedResponseId}
|
||||
<br>http://[[${localhost}]]:8097/klaus/v1/set/[[${mockedMessageDto.clientUUID}]]/{mockedResponseId}?httpStatus={httpStatus}
|
||||
<br>http://[[${localhost}]]:8097/klaus/v1/get/[[${mockedMessageDto.clientUUID}]]/{mockedResponseId}
|
||||
<br>http://[[${localhost}]]:8097/klaus/v1/getAll/[[${mockedMessageDto.clientUUID}]]
|
||||
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user