diff --git a/website/students/index.php b/website/students/index.php index 7aebefc..79eafc5 100644 --- a/website/students/index.php +++ b/website/students/index.php @@ -93,26 +93,11 @@ function confirmStopVM(name) { }); } - function confirmStopVMbis(name) { + function confirmAccessVM(VMname, port, username) { Swal.fire({ - title: 'Confirmation', - text: "Souhaitez-vous vraiment tester la VM : " + name + " ?", - icon: 'warning', - showCancelButton: true, - confirmButtonText: 'Oui', - cancelButtonText: 'Non, annuler' - }).then((result) => { - if (result.isConfirmed) { - fetch(`ajax_functions.php?action=stopVM&name=${encodeURIComponent(name)}`) - .then(() => { - showLoadingSwal('Veuillez patienter', 'La VM est en cours d\'arrêt...'); - return pollVMStatus(name, 'stopped'); - }) - .then(() => { - Swal.close(); - showSuccessSwal('VM arrêtée !'); - }); - } + title: 'Voici la commande à exécuter pour vous connecter à la VM :', + text: "ssh -p " + port + " " + username + "@" + VMname + ".eden.telecom-sudparis.eu", + icon: 'info', }); } @@ -271,7 +256,7 @@ function confirmCreateVM(vmName) { echo "
Statut : $status
"; - echo ""; + echo ""; echo ""; echo ""; echo "";