요청 관리 초기 사용시 서버 확인 메시지 표시 추가

This commit is contained in:
현성필
2023-10-30 16:52:12 +09:00
parent 1c1a052f3f
commit 76383e8e5f
+10 -1
View File
@@ -315,6 +315,10 @@ class APITester {
init(servers) {
if (servers) {
this.servers = servers;
if (this.servers.length === 0){
$('.toast-body').text('서버관리에서 서버를 등록해주세요.');
$('.toast').toast('show');
}
}
this.bindEvents();
this.loadCollections();
@@ -402,7 +406,8 @@ class APITester {
showNewApiRequestModal(event) {
if (this.collections.length == 0) {
alert('새로운 컬렉션을 추가해 주세요.');
$('.toast-body').text('새로운 컬렉션을 추가해 주세요.');
$('.toast').toast('show');
return;
}
$('#new_api_request_modal').modal('show');
@@ -941,6 +946,9 @@ class APITester {
addAPIRequest(event) {
const collectionId = $('#modal_collection').val();
const collection = this.collections.filter(function (collection) {
return collection.id === collectionId;
})[0];
let me = this;
let newApi = {
id: '',
@@ -961,6 +969,7 @@ class APITester {
ody: ''
}
};
newApi.collectionName = collection.name;
this.currentAjaxRequest = $.ajax({
url: `/mgmt/collections/${collectionId}/apis/save.do`,