166 lines
5.6 KiB
HTML
166 lines
5.6 KiB
HTML
<!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:decorator="layout/default_layout">
|
|
|
|
<th:block layout:fragment="css">
|
|
<link rel="stylesheet"
|
|
th:href="@{/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css}">
|
|
<link rel="stylesheet"
|
|
th:href="@{/plugins/datatables-responsive/css/responsive.bootstrap4.min.css}">
|
|
<link rel="stylesheet"
|
|
th:href="@{/plugins/datatables-buttons/css/buttons.bootstrap4.min.css}">
|
|
</th:block>
|
|
|
|
<div class="content-wrapper" layout:fragment="content">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<div class="container-fluid">
|
|
<div class="row mb-2">
|
|
<div class="col-sm-6">
|
|
<h1>HTTP 요청 관리</h1>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<ol class="breadcrumb float-sm-right">
|
|
<li class="breadcrumb-item"><a href="/">Home</a></li>
|
|
<li class="breadcrumb-item active">부가 기능</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.container-fluid -->
|
|
</section>
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">HTTP API 호출 테스트를 수행할 수 있다.</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<table id="listHttpRequestInfoTable"
|
|
class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>요청그룹</th>
|
|
<th>요청명</th>
|
|
<th>URL</th>
|
|
<th>Method</th>
|
|
<th>수정</th>
|
|
<th>삭제</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<!-- /.card-body -->
|
|
</div>
|
|
<!-- /.card -->
|
|
</div>
|
|
<!-- /.col -->
|
|
</div>
|
|
<!-- /.row -->
|
|
</div>
|
|
<!-- /.container-fluid -->
|
|
</section>
|
|
</div>
|
|
|
|
<th:block layout:fragment="script">
|
|
<script th:src="@{/plugins/datatables/jquery.dataTables.min.js}"></script>
|
|
<script
|
|
th:src="@{/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js}"></script>
|
|
<script
|
|
th:src="@{/plugins/datatables-responsive/js/dataTables.responsive.min.js}"></script>
|
|
<script
|
|
th:src="@{/plugins/datatables-responsive/js/responsive.bootstrap4.min.js}"></script>
|
|
<script
|
|
th:src="@{/plugins/datatables-buttons/js/dataTables.buttons.min.js}"></script>
|
|
<script
|
|
th:src="@{/plugins/datatables-buttons/js/buttons.bootstrap4.min.js}"></script>
|
|
<script th:src="@{/plugins/jszip/jszip.min.js}"></script>
|
|
<script th:src="@{/plugins/pdfmake/pdfmake.min.js}"></script>
|
|
<script th:src="@{/plugins/pdfmake/vfs_fonts.js}"></script>
|
|
<script th:src="@{/plugins/datatables-buttons/js/buttons.html5.min.js}"></script>
|
|
<script th:src="@{/plugins/datatables-buttons/js/buttons.print.min.js}"></script>
|
|
<script
|
|
th:src="@{/plugins/datatables-buttons/js/buttons.colVis.min.js}"></script>
|
|
|
|
<script th:inline="javascript">
|
|
$.fn.dataTable.ext.buttons.new = {
|
|
text: 'New',
|
|
action: function ( e, dt, node, config ) {
|
|
location.href = "/manage/getHttpRequestInfoForm";
|
|
}
|
|
};
|
|
|
|
var listHttpRequestInfoTable = $("#listHttpRequestInfoTable").DataTable({
|
|
"responsive": true, "lengthChange": false, "autoWidth": false,
|
|
"processing": true,
|
|
"serverSide": true,
|
|
"pageLength": 50,
|
|
"searchDelay": 1200,
|
|
"ajax": {
|
|
"url": "/manage/rest/httpRequestInfos",
|
|
"type": "POST",
|
|
"dataType": "json",
|
|
"contentType": "application/json",
|
|
"data": function (d) {
|
|
return JSON.stringify(d);
|
|
}
|
|
},
|
|
"columns": [
|
|
{"data": "requestGroupName"},
|
|
{"data": "requestName"},
|
|
{"data": "url"},
|
|
{"data": "method", "searchable": false, "orderable": false},
|
|
{"data": "id", "searchable": false, "orderable": false},
|
|
{"data": "id", "searchable": false, "orderable": false}
|
|
],
|
|
"columnDefs": [
|
|
{
|
|
"render": function (data, type, row) {
|
|
return '<a href="/manage/getHttpRequestInfoForm/' + row.id + '">' + data + '</a>';
|
|
},
|
|
"targets": 1
|
|
},
|
|
{
|
|
"render": function (data, type, row) {
|
|
return '<a href="/manage/getHttpRequestInfoForm/' + data + '" class="btn btn-primary"><i class="fas fa-edit"></i></a>';
|
|
},
|
|
"targets": -2
|
|
},
|
|
{
|
|
"render": function (data, type, row) {
|
|
var msg = "'정말로 데이터를 삭제 하시겠습니까?'";
|
|
return '<a href="/manage/deleteHttpRequestInfo/' + data + '" onclick="return confirm(' + msg +');" class="btn btn-primary"><i class="fas fa-trash"></i></a>';
|
|
},
|
|
"targets": -1
|
|
}
|
|
],
|
|
"buttons": ["new", "excel", "colvis"],
|
|
"initComplete": function() {
|
|
listHttpRequestInfoTable.buttons().container().appendTo('#listHttpRequestInfoTable_wrapper .col-md-6:eq(0)');
|
|
}
|
|
});
|
|
|
|
/*
|
|
$(".dataTables_filter input").unbind().bind("input", function(e) { // Bind our desired behavior
|
|
// If the length is 3 or more characters, or the user pressed ENTER, search
|
|
if(this.value.length >= 3 || e.keyCode == 13) {
|
|
// Call the API search function
|
|
listHttpRequestInfoTable.search(this.value).draw();
|
|
}
|
|
// Ensure we clear the search if they backspace far enough
|
|
if(this.value == "") {
|
|
listHttpRequestInfoTable.search("").draw();
|
|
}
|
|
return;
|
|
});
|
|
*/
|
|
</script>
|
|
</th:block>
|
|
</html>
|