From 1e6b7a323cb2e008bda042c5ccedb13eac30fcf1 Mon Sep 17 00:00:00 2001 From: Seokho Son Date: Mon, 28 Oct 2024 17:37:16 +0900 Subject: [PATCH 1/2] Verify cloud connection --- index.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/index.js b/index.js index b0cc97c..93532af 100644 --- a/index.js +++ b/index.js @@ -1184,6 +1184,64 @@ function getConnection() { } console.log(error); errorAlert("Cannot load cloud info\n\n - check dashboard config \n - check the server is ready"); + + Swal.fire({ + title: 'Cannot load Cloud inforation', + html: ` + +

- Check the server is ready

+

- Update 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; From 1dc3d88f899050f0c97297a3b4f2994b55d1cbf8 Mon Sep 17 00:00:00 2001 From: Seokho Son Date: Mon, 28 Oct 2024 17:40:02 +0900 Subject: [PATCH 2/2] Verify cloud connect message update --- index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 93532af..5bab560 100644 --- a/index.js +++ b/index.js @@ -1183,10 +1183,9 @@ 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 load Cloud inforation', + title: 'Cannot Get the Cloud information', html: ` -

- Check the server is ready

-

- Update API endpoint if needed

+

- Please check the server is ready

+

- Update the API endpoint if needed