Skip to content

Commit

Permalink
Optimisation - suppression de fonctions inutiles #47
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoCarton committed Mar 12, 2024
1 parent 225abff commit 3357811
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions mission.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
boutonEnvoyer.addEventListener('click', async function(event) {
event.preventDefault()
console.log("started")
await recupererEtAfficherTableau(await executeSPARQLRequest("http://prod-dekalog.inria.fr/sparql", recupererDonnees()))
const dataset = await executeSPARQLRequest("http://prod-dekalog.inria.fr/sparql", recupererDonnees())
console.log(dataset)
await recupererEtAfficherTableau(dataset)
//displayRDFGraph(await executeSPARQLRequest("http://prod-dekalog.inria.fr/sparql", recupererDonnees()))
buildNodes(await executeSPARQLRequest("http://prod-dekalog.inria.fr/sparql", recupererDonnees()))
const result_data = dataset.results.bindings
buildNodes(result_data)
console.log("finished")
})
})
Expand Down
9 changes: 6 additions & 3 deletions mission.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,11 @@ function nodeAlreadyExist(node, nodesList) {
return false
}

function buildNodes(dataset) {
function buildNodes(data) {

const nodes = []
const donnees = dataset.results.bindings

for (const row of donnees) {
for (const row of data) {
let node1 = {
id : row["s"]["value"],
label : row["s"]["value"]
Expand All @@ -186,6 +185,10 @@ function buildNodes(dataset) {

}

function buildDataset(data) {
console.log("bouh")
}

async function nodelink_creator(data, colors = [], strength = -400, width = 400, height = 400) {

const donnees = data
Expand Down

0 comments on commit 3357811

Please sign in to comment.