diff --git a/index.js b/index.js
index b0cc97c..5bab560 100644
--- a/index.js
+++ b/index.js
@@ -1183,7 +1183,64 @@ function getConnection() {
document.getElementById("port").style.color = "#FF0000";
}
console.log(error);
- errorAlert("Cannot load cloud info\n\n - check dashboard config \n - check the server is ready");
+
+ Swal.fire({
+ title: 'Cannot Get the Cloud information',
+ html: `
+
+
- Please check the server is ready
+ - Update the API endpoint if needed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `,
+ showCancelButton: true,
+ confirmButtonText: 'confirm',
+ preConfirm: () => {
+ const hostname = document.getElementById('hostname-input').value;
+ const port = document.getElementById('port-input').value;
+ const username = document.getElementById('username-input').value;
+ const password = document.getElementById('password-input').value;
+ return { hostname, port, username, password };
+ }
+ }).then((result) => {
+ if (result.isConfirmed) {
+ const { hostname, port, username, password } = result.value;
+ hostnameElement.value = hostname;
+ portElement.value = port;
+ usernameElement.value = username;
+ passwordElement.value = password;
+ getConnection();
+ }
+ });
+
});
}
window.getConnection = getConnection;