2021-08-30 18:06:59 +02:00
|
|
|
import { freeDatas2HTML } from "./freeDatas2HTML";
|
2021-08-10 15:56:53 +02:00
|
|
|
|
|
|
|
const initialise = async () =>
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2021-08-30 18:06:59 +02:00
|
|
|
let converter=new freeDatas2HTML();
|
2021-08-10 15:56:53 +02:00
|
|
|
converter.datasViewElt={ id:"datas" };
|
2021-09-01 16:28:56 +02:00
|
|
|
converter.datasSelectors=[{ datasFieldNb:3, id:"filtre1"}, { datasFieldNb:4, id:"filtre2"},{ datasFieldNb:5, id:"filtre3", separator:"," }];
|
2021-09-02 18:15:15 +02:00
|
|
|
converter.datasSortingColumns=[{ datasFieldNb:0 }, { datasFieldNb:1 },{ datasFieldNb:2 }];
|
2021-08-10 15:56:53 +02:00
|
|
|
converter.datasSourceUrl="http://localhost:8080/datas/elements-chimiques.csv";
|
|
|
|
await converter.run();
|
|
|
|
}
|
|
|
|
catch(e)
|
|
|
|
{
|
|
|
|
console.error(e);
|
2021-08-13 20:00:03 +02:00
|
|
|
if(document.getElementById("datas")!==null)
|
|
|
|
document.getElementById("datas")!.innerHTML="<strong>Désolé, mais un problème technique empêche l'affichage des données.</strong>";
|
2021-08-10 15:56:53 +02:00
|
|
|
}
|
|
|
|
}
|
2021-08-11 15:24:00 +02:00
|
|
|
initialise();
|