From 072a2bbbf3b781c38ceda48025c186004829e598 Mon Sep 17 00:00:00 2001 From: NagendraOpsmx <80510611+NagendraOpsmx@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:42:26 +0530 Subject: [PATCH] encoded event listner msg earlier removed (#19) --- .../application-create-panel/application-create-panel.tsx | 2 +- .../components/applications-list/applications-list.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx b/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx index 63eb3f1ecb90d..6664513812196 100644 --- a/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx +++ b/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx @@ -141,7 +141,7 @@ export const ApplicationCreatePanel = (props: { }> {({projects, clusters, reposInfo}) => { if (pathHasOpsmx) { - window.parent.postMessage(window.btoa(JSON.stringify({msg:'loadEvent'})),'*') + window.parent.postMessage({msg:'loadEvent'},'*') } const repos = reposInfo.map(info => info.repo).sort(); const repoInfo = reposInfo.find(info => info.repo === app.spec.source.repoURL); diff --git a/ui/src/app/applications/components/applications-list/applications-list.tsx b/ui/src/app/applications/components/applications-list/applications-list.tsx index 9882551350e93..11bc31f2c4e91 100644 --- a/ui/src/app/applications/components/applications-list/applications-list.tsx +++ b/ui/src/app/applications/components/applications-list/applications-list.tsx @@ -608,7 +608,7 @@ export const ApplicationsList = (props: RouteComponentProps<{}>) => { isShown={!!appInput} onClose={() => { if(pathHasOpsmx){ - window.parent.postMessage(window.btoa(JSON.stringify({msg:'closeEvent'})),'*') + window.parent.postMessage({msg:'closeEvent'},'*') } ctx.navigation.goto('.', {new: null}, {replace: true})}} header={ @@ -625,7 +625,7 @@ export const ApplicationsList = (props: RouteComponentProps<{}>) => { qe-id='applications-list-button-cancel' onClick={() => { if(pathHasOpsmx){ - window.parent.postMessage(window.btoa(JSON.stringify({msg:'closeEvent'})),'*') + window.parent.postMessage({msg:'closeEvent'},'*') } ctx.navigation.goto('.', {new: null}, {replace: true})}} className='argo-button argo-button--base-o'> @@ -644,7 +644,7 @@ export const ApplicationsList = (props: RouteComponentProps<{}>) => { await services.applications.create(app); //iframe msg alert needed if(pathHasOpsmx){ - window.parent.postMessage(window.btoa(JSON.stringify({msg:'saveEvent',appName:app['metadata']['name']})),'*') + window.parent.postMessage({msg:'saveEvent',appName:app['metadata']['name']},'*') } ctx.navigation.goto('.', {new: null}, {replace: true}); } catch (e) {