From 76383e8e5f93843bc47609783464663e80baab95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=98=84=EC=84=B1=ED=95=84?= Date: Mon, 30 Oct 2023 16:52:12 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9A=94=EC=B2=AD=20=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=20=EC=82=AC=EC=9A=A9=EC=8B=9C=20=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=ED=99=95=EC=9D=B8=20=EB=A9=94=EC=8B=9C=EC=A7=80=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/js/APITester.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/js/APITester.js b/src/main/resources/static/js/APITester.js index fbdeafa..dbe2b5b 100644 --- a/src/main/resources/static/js/APITester.js +++ b/src/main/resources/static/js/APITester.js @@ -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`,