From 93c8eedb84ac2609ac6005940e46c1509b1544b5 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 9cdd610d3e618..3397c2c3c671c 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 @@ -143,7 +143,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 ecf6f787284df..fa34e12e7d5c6 100644 --- a/ui/src/app/applications/components/applications-list/applications-list.tsx +++ b/ui/src/app/applications/components/applications-list/applications-list.tsx @@ -611,7 +611,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={ @@ -628,7 +628,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'> @@ -647,7 +647,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) {