From 09f1d8448b5bf50b8135082bff5398044cf5c3ce Mon Sep 17 00:00:00 2001 From: Hrant Muradyan Date: Thu, 10 Mar 2022 10:22:57 +0400 Subject: [PATCH 1/4] release_note:fix issue #12053 --- .../containers/editor/legacy/console_editor/editor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx index 4ad86e495831e..e45e341ce621a 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx @@ -105,7 +105,7 @@ function EditorUI({ initialTextValue }: EditorProps) { const loadBufferFromRemote = (url: string) => { const coreEditor = editor.getCoreEditor(); - + if (/^https?:\/\//.test(url)) { const loadFrom: Record = { url, @@ -121,7 +121,7 @@ function EditorUI({ initialTextValue }: EditorProps) { // Fire and forget. $.ajax(loadFrom).done(async (data) => { - await editor.update(data, true); + await editor.update(`${initialTextValue }\n ${data}` , true); editor.moveToNextRequestEdge(false); coreEditor.clearSelection(); editor.highlightCurrentRequestsAndUpdateActionBar(); From 09ff29d151e99b93c2c83411cc1b58fef7a93d7a Mon Sep 17 00:00:00 2001 From: Hrant Muradyan Date: Thu, 10 Mar 2022 15:58:17 +0400 Subject: [PATCH 2/4] removed empty spaces --- .../containers/editor/legacy/console_editor/editor.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx index e45e341ce621a..340f28550d1f8 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx @@ -105,7 +105,6 @@ function EditorUI({ initialTextValue }: EditorProps) { const loadBufferFromRemote = (url: string) => { const coreEditor = editor.getCoreEditor(); - if (/^https?:\/\//.test(url)) { const loadFrom: Record = { url, @@ -121,7 +120,7 @@ function EditorUI({ initialTextValue }: EditorProps) { // Fire and forget. $.ajax(loadFrom).done(async (data) => { - await editor.update(`${initialTextValue }\n ${data}` , true); + await editor.update(`${initialTextValue}\n ${data}` , true); editor.moveToNextRequestEdge(false); coreEditor.clearSelection(); editor.highlightCurrentRequestsAndUpdateActionBar(); From ad2a4daf5b2f919f6644c7348d6f3625cc3da014 Mon Sep 17 00:00:00 2001 From: Hrant Muradyan Date: Fri, 25 Mar 2022 12:20:04 +0400 Subject: [PATCH 3/4] [Console] fix pretier errors --- .../containers/editor/legacy/console_editor/editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx index 340f28550d1f8..d31f90ec78bf4 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx @@ -120,7 +120,7 @@ function EditorUI({ initialTextValue }: EditorProps) { // Fire and forget. $.ajax(loadFrom).done(async (data) => { - await editor.update(`${initialTextValue}\n ${data}` , true); + await editor.update(`${initialTextValue}\n ${data}`, true); editor.moveToNextRequestEdge(false); coreEditor.clearSelection(); editor.highlightCurrentRequestsAndUpdateActionBar(); From 8cdea1814f0366babee8c6f854150618a08cadec Mon Sep 17 00:00:00 2001 From: Hrant Muradyan Date: Tue, 29 Mar 2022 08:05:39 +0400 Subject: [PATCH 4/4] [Console] fixing ci --- .../containers/editor/legacy/console_editor/editor.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx index d31f90ec78bf4..b9732aaa183d0 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx @@ -120,6 +120,7 @@ function EditorUI({ initialTextValue }: EditorProps) { // Fire and forget. $.ajax(loadFrom).done(async (data) => { + // when we load data from another Api we also must pass history await editor.update(`${initialTextValue}\n ${data}`, true); editor.moveToNextRequestEdge(false); coreEditor.clearSelection();