diff --git a/web/pgadmin/misc/bgprocess/static/js/BgProcessManager.js b/web/pgadmin/misc/bgprocess/static/js/BgProcessManager.js
index fabaf6fa5..134d7785d 100644
--- a/web/pgadmin/misc/bgprocess/static/js/BgProcessManager.js
+++ b/web/pgadmin/misc/bgprocess/static/js/BgProcessManager.js
@@ -186,7 +186,7 @@ export default class BgProcessManager {
.then((res)=>{
let _server = res.data?.data?.node;
if(!_server) {
- Notifier.error(gettext('Cloud server information not available'));
+ Notifier.error(gettext('Cloud server deployment is pending'));
return;
}
let _server_path = '/browser/server_group_' + _server.gid + '/' + _server.id,
diff --git a/web/pgadmin/misc/cloud/static/js/CloudWizard.jsx b/web/pgadmin/misc/cloud/static/js/CloudWizard.jsx
index d6b10e534..414d05da8 100644
--- a/web/pgadmin/misc/cloud/static/js/CloudWizard.jsx
+++ b/web/pgadmin/misc/cloud/static/js/CloudWizard.jsx
@@ -62,7 +62,7 @@ const useStyles = makeStyles(() =>
export const CloudWizardEventsContext = React.createContext();
-export default function CloudWizard({ nodeInfo, nodeData, onClose}) {
+export default function CloudWizard({ nodeInfo, nodeData, onClose, cloudPanel}) {
const classes = useStyles();
const eventBus = React.useRef(new EventBus());
@@ -288,7 +288,7 @@ export default function CloudWizard({ nodeInfo, nodeData, onClose}) {
);
setErrMsg([MESSAGE_TYPE.INFO, gettext('EDB BigAnimal authentication process is in progress...') + '
']);
- window.open(verificationURI, 'edb_biganimal_authentication');
+ let child = window.open(verificationURI, 'edb_biganimal_authentication');
let _url = url_for('biganimal.verification_ack') ;
const myInterval = setInterval(() => {
axiosApi.get(_url)
@@ -307,6 +307,10 @@ export default function CloudWizard({ nodeInfo, nodeData, onClose}) {
setErrMsg([MESSAGE_TYPE.INFO, gettext('Authentication completed successfully but you do not have permission to create the cluster.')]);
setVerificationIntiated(false);
clearInterval(myInterval);
+ }else if (child.closed) {
+ setVerificationIntiated(false);
+ setErrMsg([MESSAGE_TYPE.ERROR, gettext('Authentication is aborted.')]);
+ clearInterval(myInterval);
}
})
.catch((error) => {
@@ -314,6 +318,10 @@ export default function CloudWizard({ nodeInfo, nodeData, onClose}) {
});
}, 1000);
+ cloudPanel.on(window.wcDocker.EVENT.CLOSED, function() {
+ clearInterval(myInterval);
+ });
+
};
@@ -450,5 +458,6 @@ export default function CloudWizard({ nodeInfo, nodeData, onClose}) {
CloudWizard.propTypes = {
nodeInfo: PropTypes.object,
nodeData: PropTypes.object,
- onClose: PropTypes.func
+ onClose: PropTypes.func,
+ cloudPanel: PropTypes.object
};
diff --git a/web/pgadmin/misc/cloud/static/js/cloud.js b/web/pgadmin/misc/cloud/static/js/cloud.js
index 9a671b475..f3ea51833 100644
--- a/web/pgadmin/misc/cloud/static/js/cloud.js
+++ b/web/pgadmin/misc/cloud/static/js/cloud.js
@@ -92,7 +92,7 @@ define('pgadmin.misc.cloud', [
ReactDOM.render(
- {
ReactDOM.unmountComponentAtNode(j[0]);
panel.close();