-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
129 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,77 @@ | ||
<!DOCTYPE html> | ||
<html lang="fr"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Gestion NAS et Commandes</title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Gestion NAS et Commandes</title> | ||
</head> | ||
<body> | ||
<h1>Gestion du NAS et des analyses</h1> | ||
<h1>Gestion du NAS et des analyses</h1> | ||
|
||
<form id="network-path-form"> | ||
<label for="network-path">Chemin du partage NAS :</label> | ||
<input type="text" id="network-path" name="path"> | ||
<button type="submit">Monter le partage NAS</button> | ||
</form> | ||
<!-- Network path form section --> | ||
<form id="network-path-form"> | ||
<label for="network-path">Chemin du partage NAS :</label> | ||
<input type="text" id="network-path" name="path"> | ||
<button type="submit">Monter le partage NAS</button> | ||
</form> | ||
|
||
<button id="mpc-update-button">Mise à jour MPC</button> | ||
<button id="blissify-init-button">Blissify Init</button> | ||
<button id="blissify-update-button">Blissify Update</button> | ||
<!-- Buttons for different operations --> | ||
<button id="mpc-update-button">Mise à jour MPC</button> | ||
<button id="blissify-init-button">Blissify Init</button> | ||
<button id="blissify-update-button">Blissify Update</button> | ||
|
||
<pre id="console-output"></pre> | ||
<!-- Container for output messages --> | ||
<pre id="console-output"></pre> | ||
|
||
<script> | ||
function displayOutput(data) { | ||
// Affiche l'output dans le conteneur dédié | ||
document.getElementById('console-output').innerText += data; | ||
} | ||
<script> | ||
// Function to display output messages in the dedicated container | ||
function displayOutput(data) { | ||
document.getElementById('console-output').innerText += data; | ||
} | ||
|
||
document.getElementById('network-path-form').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
const networkPath = document.getElementById('network-path').value; | ||
// Event listeners for operations | ||
document.getElementById('network-path-form').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
const networkPath = document.getElementById('network-path').value; | ||
|
||
// Monter le partage NAS | ||
fetch(`/mount-nas?path=${encodeURIComponent(networkPath)}`) | ||
.then(response => response.text()) | ||
.then(displayOutput) | ||
.catch(error => { | ||
displayOutput(`Erreur lors du montage : ${error}`); | ||
}); | ||
// Mount the NAS share | ||
fetch(`/mount-nas?path=${encodeURIComponent(networkPath)}`) | ||
.then(response => response.text()) | ||
.then(displayOutput) | ||
.catch(error => { | ||
displayOutput(`Erreur lors du montage : ${error}`); | ||
}); | ||
}); | ||
|
||
document.getElementById('mpc-update-button').addEventListener('click', function() { | ||
// Mise à jour MPC après montage | ||
fetch('/mpc-update') | ||
.then(response => response.text()) | ||
.then(displayOutput) | ||
.catch(error => { | ||
displayOutput(`Erreur lors de la mise à jour MPC : ${error}`); | ||
}); | ||
// MPC update after mounting | ||
document.getElementById('mpc-update-button').addEventListener('click', function() { | ||
fetch('/mpc-update') | ||
.then(response => response.text()) | ||
.then(displayOutput) | ||
.catch(error => { | ||
displayOutput(`Erreur lors de la mise à jour MPC : ${error}`); | ||
}); | ||
}); | ||
|
||
document.getElementById('blissify-init-button').addEventListener('click', function() { | ||
// Lancer blissify init | ||
fetch('/start-analysis') | ||
.then(response => response.text()) | ||
.then(displayOutput) | ||
.catch(error => { | ||
displayOutput(`Erreur lors de l'exécution de blissify init : ${error}`); | ||
}); | ||
// Trigger blissify init | ||
document.getElementById('blissify-init-button').addEventListener('click', function() { | ||
fetch('/start-analysis') | ||
.then(response => response.text()) | ||
.then(displayOutput) | ||
.catch(error => { | ||
displayOutput(`Erreur lors de l'exécution de blissify init : ${error}`); | ||
}); | ||
}); | ||
|
||
document.getElementById('blissify-update-button').addEventListener('click', function() { | ||
// Lancer blissify update | ||
fetch('/blissify-update') | ||
.then(response => response.text()) | ||
.then(displayOutput) | ||
.catch(error => { | ||
displayOutput(`Erreur lors de l'exécution de blissify update : ${error}`); | ||
}); | ||
// Trigger blissify update | ||
document.getElementById('blissify-update-button').addEventListener('click', function() { | ||
fetch('/blissify-update') | ||
.then(response => response.text()) | ||
.then(displayOutput) | ||
.catch(error => { | ||
displayOutput(`Erreur lors de l'exécution de blissify update : ${error}`); | ||
}); | ||
</script> | ||
}); | ||
</script> | ||
</body> | ||
</html> |