load tester beta
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
<script th:src="@{/js/jquery-validation/localization/messages_ko.min.js}"></script>
|
||||
<script th:src="@{/js/common.js}"></script>
|
||||
<script th:src="@{/js/dataTables/datatables.min.js}"></script>
|
||||
<script th:src="@{/plugins/apitestmanager/app.bundle.js}" defer></script>
|
||||
|
||||
</head>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
<div class="text-center flex-fill" sec:authorize="isAuthenticated()">
|
||||
<a class="nav-link" th:href="@{/mgmt/api_tester.do}">요청 관리</a>
|
||||
</div>
|
||||
<div class="text-center flex-fill" sec:authorize="isAuthenticated()">
|
||||
<a class="nav-link" th:href="@{/mgmt/load_tester.do}">부하 테스트</a>
|
||||
</div>
|
||||
<div class="text-center flex-fill" sec:authorize="hasRole('ROLE_ADMIN')">
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="nav-item dropdown">
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
</th:block>
|
||||
<th:block layout:fragment="contentScript">
|
||||
|
||||
</th:block>
|
||||
<link th:href="@{/css/resizable.css}" rel="stylesheet" />
|
||||
<script>
|
||||
$(function () {
|
||||
const container = document.querySelector('.api-tester-layout');
|
||||
@@ -156,7 +156,7 @@
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<footer th:replace="fragment/footer :: footerFragment"></footer>
|
||||
<!--<footer th:replace="fragment/footer :: footerFragment"></footer>-->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</th:block>
|
||||
</div>
|
||||
|
||||
<footer th:replace="fragment/footer :: footerFragment"></footer>
|
||||
<!--<footer th:replace="fragment/footer :: footerFragment"></footer>-->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control" name="id" id="id" maxlength="20" required>
|
||||
<input type="text" class="form-control" name="id" id="id" maxlength="20" required style="border-bottom-left-radius: 0; border-bottom-right-radius: 0">
|
||||
<label for="id" class="form-label">ID</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
<button type="button" class="btn btn-primary btn-sm stop_scenario me-2">정지</button>
|
||||
<!-- <button type="button" class="btn btn-primary btn-sm export">내보내기</button>-->
|
||||
<!-- <button type="button" class="btn btn-primary btn-sm clear me-2">초기화</button>-->
|
||||
<!-- <button type="button" class="btn btn-primary btn-sm add_start">시작 노드</button>-->
|
||||
</div>
|
||||
<div>시나리오 설명이 여기에 표시</div>
|
||||
<div class="api-scenario-editor-body" style="display: flex; flex-direction: row; flex: 1; border: 1px solid grey; padding: 5px;">
|
||||
|
||||
@@ -4,58 +4,47 @@
|
||||
<body>
|
||||
|
||||
<section layout:fragment="contentFragment">
|
||||
<!-- <script>-->
|
||||
<!-- require.config({paths: {'vs': '/plugins/vs'}});-->
|
||||
<!-- </script>-->
|
||||
<div class="container-fluid mt-2">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||
<div class="card">
|
||||
<div class="card-header" style="min-height: 50px;">
|
||||
<ul class="nav nav-tabs card-header-tabs" role="tablist" id="apiRequestTabTitle">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body" style="min-height: 800px;">
|
||||
<div class="tab-content" id="apiRequestTabContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="popperContent" class="variable_popper" style="display: none;">
|
||||
<div class="variable_popper">
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: none">
|
||||
<ul id="servers">
|
||||
<li th:each="server : ${servers}" th:data-id="${server.id}" th:data-name="${server.name}" th:data-path="${server.basePath}"></li>
|
||||
<div class="container-fluid mt-2" style="height: 100%">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||
<div class="card" style="height: 100%">
|
||||
<div class="card-header" style="min-height: 50px;">
|
||||
<ul class="nav nav-tabs card-header-tabs" role="tablist" id="apiRequestTabTitle">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body" style="min-height: 800px;">
|
||||
<div class="tab-content" id="apiRequestTabContent" style="height: 100%;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<iframe id="preRequest" class="preRequest"></iframe>
|
||||
<iframe id="postRequest" class="postRequest"></iframe>
|
||||
</div>
|
||||
<div id="popperContent" class="variable_popper" style="display: none;">
|
||||
<div class="variable_popper">
|
||||
</div>
|
||||
</div>
|
||||
<iframe id="preRequest" class="preRequest"></iframe>
|
||||
<iframe id="postRequest" class="postRequest"></iframe>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
<th:block layout:fragment="contentScript">
|
||||
<script>
|
||||
$(document).ajaxError(function (event, jqxhr, settings, exception) {
|
||||
if (jqxhr.status === 401) {
|
||||
window.location.href = '[[@{/}]]';
|
||||
}
|
||||
});
|
||||
<script th:src="@{/plugins/apitestmanager/app.bundle.js}" defer></script>
|
||||
<script>
|
||||
$(document).ajaxError(function(event, jqxhr, settings, exception) {
|
||||
if (jqxhr.status === 401) {
|
||||
window.location.href = '[[@{/}]]';
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
let servers = [];
|
||||
$('#servers li').each(function () {
|
||||
servers.push({
|
||||
id: $(this).data('id'),
|
||||
name: $(this).data('name'),
|
||||
basePath: $(this).data('path')
|
||||
});
|
||||
});
|
||||
let options = {};
|
||||
options.contextPath = '[[@{/}]]';
|
||||
const apiTester = new APITestManager(servers, options);
|
||||
});
|
||||
</script>
|
||||
$(document).ready(function() {
|
||||
fetch('[[@{/mgmt/servers/list.do}]]').then(response => response.json()).then(data => {
|
||||
let options = {};
|
||||
options.contextPath = '[[@{/}]]';
|
||||
options.servers = data;
|
||||
const apiTester = new APITestManager(options);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
<!doctype html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/base_layout}">
|
||||
<body>
|
||||
|
||||
<section layout:fragment="contentFragment">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
|
||||
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true" style="position: absolute; top: 0; left: 0;">
|
||||
<div class="toast-header">
|
||||
<strong class="mr-auto">알림</strong>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="toast-body">
|
||||
</div>
|
||||
</div>
|
||||
<div class="api-tester-layout">
|
||||
<div class="modal fade" id="new_load_test_modal" tabindex="-1" aria-labelledby="new_load_test_modal" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">새로운 테스트 추가</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="text" id="new_load_test_name" class="form-control" placeholder="이름을 입력하세요" aria-label="이름을 입력하세요" name="test_name" required/>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary create_load_test">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="confirm_delete_modal" tabindex="-1" aria-labelledby="confirm_delete_load_test_modal" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">테스트 삭제</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>삭제 하시겠습니까?</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary confirm_delete_load_test">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tester">
|
||||
<section class="d-flex flex-row" style="width: 100%">
|
||||
<div class="load-test-sidebar border" style="width: 200px; ">
|
||||
<div style="background: rgba(0,0,0,.03); padding: 2px;">
|
||||
테스트 목록
|
||||
<button type="button" class="btn btn-primary me-2" id="new_load_test"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="pt-links">
|
||||
<ul class="list-unstyled load_test_list" id="load_test_menubar">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-column" style="flex: 1;">
|
||||
<div class="d-flex" style="width: 100%; height: 80px; background: rgba(0, 0, 0, .03); padding: 5px;" id="load-tester-view">
|
||||
</div>
|
||||
<div class="test-log d-flex flex-row" style="flex: 1" id="load-tester-result-view">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
<th:block layout:fragment="contentScript">
|
||||
<link th:href="@{/css/goldenlayout-base.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/goldenlayout-light-theme.css}" rel="stylesheet"/>
|
||||
<link rel="stylesheet" th:href="@{/css/xspreadsheet.css}">
|
||||
<script th:src="@{/plugins/apitestmanager/app.bundle.js}"></script>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$(document).ajaxError(function(event, jqxhr, settings, exception) {
|
||||
if (jqxhr.status === 401) {
|
||||
window.location.href = '[[@{/}]]';
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
let options = {};
|
||||
options.contextPath = '[[@{/}]]';
|
||||
options.type = 'load';
|
||||
new APITestManager(options);
|
||||
|
||||
});
|
||||
</script>
|
||||
</th:block>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user