Merge pull request #4680 from nwmac/istio-embedding-fix

Fix reload issue when embedding istio configuration
This commit is contained in:
Westly Wright 2021-06-24 08:30:18 -07:00 committed by GitHub
commit 9ab534f3ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -46,9 +46,15 @@ export default Component.extend(ModalBase, {
}
PromiseAll(promises).then(() => {
setTimeout(() => {
window.location.href = window.location.href; // eslint-disable-line no-self-assign
}, 1000);
const isEmbedded = window.top !== window;
if (isEmbedded) {
window.top.postMessage({ action: 'reload' });
} else {
setTimeout(() => {
window.location.href = window.location.href; // eslint-disable-line no-self-assign
}, 1000);
}
}).catch((err) => {
get(this, 'growl').fromError(get(err, 'body.message'));
}).finally(() => {