From d3e6eca84dd09382dc52040837ba47f68f8d1ed5 Mon Sep 17 00:00:00 2001 From: "icksishu@gmail.com" Date: Thu, 11 Dec 2025 17:03:42 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=90=EC=9D=B4=EC=A0=84=ED=8A=B8=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20Export=20=EA=B8=B0=EB=8A=A5=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../front/src/components/AgentConfigView.vue | 58 +++++++++++++++---- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/src/main/front/src/components/AgentConfigView.vue b/src/main/front/src/components/AgentConfigView.vue index 6e0a4f2..d0a30b1 100644 --- a/src/main/front/src/components/AgentConfigView.vue +++ b/src/main/front/src/components/AgentConfigView.vue @@ -117,7 +117,42 @@ function configReload() { } // agentConfig의 내용을 json 파일로 다운로드 -function configExport() {} +function configExport() { + const configCopy = JSON.parse(JSON.stringify(agentConfig)) + if (Array.isArray(configCopy.knownAgentList)) { + configCopy.knownAgentList.forEach((item) => { + delete item.selected + delete item.added + }) + } + if (Array.isArray(configCopy.dataSourceConfig)) { + configCopy.dataSourceConfig.forEach((item) => { + delete item.selected + delete item.added + }) + } + if (configCopy.dropBoxConfig && Array.isArray(configCopy.dropBoxConfig.dropBoxList)) { + configCopy.dropBoxConfig.dropBoxList.forEach((item) => { + delete item.selected + delete item.added + }) + } + if (configCopy.postmanConfig && Array.isArray(configCopy.postmanConfig.postmanList)) { + configCopy.postmanConfig.postmanList.forEach((item) => { + delete item.selected + delete item.added + }) + } + const configString = JSON.stringify(configCopy, null, 2) + const blob = new Blob([configString], { type: 'application/json' }) + const url = URL.createObjectURL(blob) + const a = document.createElement('a') + a.href = url + a.download = 'settings.json' + document.body.append(a) + a.click() + URL.revokeObjectURL(url) +} // agentConfig의 내용을 서버에 전송하여 저장 function configSave() {} @@ -272,6 +307,9 @@ defineExpose({