That's fine though as your code gets more complex, it is better to have it separate. VueJS and other newer frameworks also support "components" that you might want to investigate.
The code you've provided is NOT uibuilder code and could not work.
You have removed all of the required libraries. Please go back to the default template and read the comments in the code.
Your HTML file should look something like:
<!doctype html><html lang="en"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>Node-RED UI Builder</title>
<meta name="description" content="Node-RED UI Builder - VueJS + bootstrap-vue version">
<link rel="icon" href="./images/node-blue.ico">
<!-- See https://goo.gl/OOhYW5 -->
<link rel="manifest" href="./manifest.json">
<meta name="theme-color" content="#3f51b5">
<!-- Used if adding to homescreen for Chrome on Android. Fallback for manifest.json -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="Node-RED UI Builder">
<!-- Used if adding to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Node-RED UI Builder">
<!-- Homescreen icons for Apple mobile use if required
<link rel="apple-touch-icon" href="./images/manifest/icon-48x48.png">
<link rel="apple-touch-icon" sizes="72x72" href="./images/manifest/icon-72x72.png">
<link rel="apple-touch-icon" sizes="96x96" href="./images/manifest/icon-96x96.png">
<link rel="apple-touch-icon" sizes="144x144" href="./images/manifest/icon-144x144.png">
<link rel="apple-touch-icon" sizes="192x192" href="./images/manifest/icon-192x192.png">
-->
<link type="text/css" rel="stylesheet" href="../uibuilder/vendor/bootstrap/dist/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="../uibuilder/vendor/bootstrap-vue/dist/bootstrap-vue.css" />
<link rel="stylesheet" href="./index.css" media="all">
</head><body>
<div class="navbar"><span>Real-Time Chart with Plotly.js</span></div>
<div class="wrapper">
<div id="chart"></div>
<h2>Two Equal Columns</h2>
<div class="row">
<div class="column" style="background-color:#aaa;">
<div id="myProgress">
<div class= "arr" id="myBar"></div>
<div class="avv"> <h2 id="texte"></h2></div>
</div>
</div>
<div class="column" style="background-color:#bbb;">
<img id="photo" src="http://localhost:1880/handgripSurTable.JPG">
</div>
</div>
<br>
<button onclick="move()">Click Me</button>
<script src="../uibuilder/vendor/socket.io/socket.io.js"></script>
<script src="../uibuilder/vendor/vue/dist/vue.js"></script> <!-- dev version with component compiler -->
<script src="../uibuilder/vendor/bootstrap-vue/dist/bootstrap-vue.js"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script src="./uibuilderfe.min.js"></script> <!-- //prod version -->
<!-- You are effectively replacing this...
<script src="./index.js"></script> -->
<script>
function move() {
var i = 0;
var nbEtape = 21;
var decompte1 = 3;
var decompte2 = 8;
var decompte3 = 13;
var decompte4 = 18;
var elem = document.getElementById("myBar");
var photo = document.getElementById("photo");
var texte = document.getElementById("texte");
var width = 100;
var message = [
"Laisser l'appareil sur la table",
"Prenez l'appareil dans la main droite et positionnez votre bras le long de votre corps comme sur la photo",
"Attention, préparez-vous à forcer",
"",
"Forcez",
"Reposez l'appareil sur la table, vous avez 30 secondes de récupération",
"Reprenez l'appareil dans la main droite, et placez votre bras le long du corps comme précédemment (comme sur la photo)",
"Attention, préparez-vous à forcez",
"",
"Forcez",
"Reposez l'appareil sur la table, vous allez maintenant passer au test pour votre main gauche",
"Prenez l'appareil dans la main gauche et positionnez votre bras le long de votre corps comme sur la photo",
"Attention, préparez-vous à forcer",
"",
"Forcez",
"Reposez l'appareil sur la table, vous avez 30 secondes de récupération",
"Reprenez l'appareil dans la main gauche, et placez votre bras le long du corps comme précédemment (comme sur la photo)",
"Attention, préparez-vous à forcez",
"",
"Forcez",
"Le test est terminé, vous pouvez reposer l'appareil sur la table et passez à l'atelier suivant"
];
var image = [
"http://localhost:1880/handgripSurTable.JPG",
"http://localhost:1880/handgripMainDroite.JPG",
"http://localhost:1880/handgripMainDroite.JPG",
"http://localhost:1880/handgripMainDroite.JPG",
"http://localhost:1880/handgripMainDroite.JPG",
"http://localhost:1880/handgripSurTable.JPG",
"http://localhost:1880/handgripMainDroite.JPG",
"http://localhost:1880/handgripMainDroite.JPG",
"http://localhost:1880/handgripMainDroite.JPG",
"http://localhost:1880/handgripMainDroite.JPG",
"http://localhost:1880/handgripSurTable.JPG",
"http://localhost:1880/handgripMainGauche.JPG",
"http://localhost:1880/handgripMainGauche.JPG",
"http://localhost:1880/handgripMainGauche.JPG",
"http://localhost:1880/handgripMainGauche.JPG",
"http://localhost:1880/handgripSurTable.JPG",
"http://localhost:1880/handgripMainGauche.JPG",
"http://localhost:1880/handgripMainGauche.JPG",
"http://localhost:1880/handgripMainGauche.JPG",
"http://localhost:1880/handgripMainGauche.JPG",
"http://localhost:1880/handgripSurTable.JPG",
]
var interval = [20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20];
var messageMainDroite = "";
var id = setInterval(frame, interval[i] );
function frame() {
width = width - 1;
elem.style.width = width + "%";
if (i == decompte1 || i == decompte2 || i == decompte3 || i == decompte4) {
if (width > 66) {
texte.textContent = '3';
}
if (width < 66 && width > 33) {
texte.textContent = '2';
}
if (width < 33 && width > 0) {
texte.textContent = '1';
}
} else {
texte.textContent = message[i];
photo.setAttribute("src",image[i]);
}
if (width == 0 && i < nbEtape) {
width = 100;
i++;
clearInterval(id);
id = setInterval(frame, interval[i]);
}
if (i == nbEtape) {
clearInterval(id);
}
}
} // fin de move()
function getData() {
return Math.random();
}
Plotly.plot('chart',[{
y:[getData()],
type:'line'
}]);
var cnt = 0;
setInterval(function(){
Plotly.extendTraces('chart',{ y:[[getData()]]}, [0]);
cnt++;
if(cnt > 500) {
Plotly.relayout('chart',{
xaxis: {
range: [cnt-500,cnt]
}
});
}
},15);
</script>
</body></html>