Skip to content

Commit

Permalink
encoded event listner msg earlier removed (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
NagendraOpsmx committed Apr 2, 2024
1 parent c481bb6 commit 072a2bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand All @@ -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'>
Expand All @@ -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) {
Expand Down

0 comments on commit 072a2bb

Please sign in to comment.