요청 관리 초기 사용시 서버 확인 메시지 표시 추가
This commit is contained in:
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user