Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Prepare dropdown with all dfs
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminaaron committed May 18, 2024
1 parent 511e8db commit 603e9fe
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<h3>User profile</h3>
<div id="userProfileDiv"></div>
<br/>
<select style="display: none" id="dfDropdown"></select>
<br/>
<small><a href="#" onclick="clearUserProfile()">Reset</a></small> <small><a href="#" onclick="downloadUserProfileTurtle()">Export</a></small>
<h3>Missing data points</h3>
<div>Set a focus:</div>
Expand Down Expand Up @@ -79,6 +81,20 @@ <h3>Report</h3>
df: await MatchingEngine.extractDatafieldsMetadata(turtleMap.datafields),
rp: await MatchingEngine.extractRequirementProfilesMetadata(Object.values(turtleMap.shacl))
}

const selectEl = document.getElementById("dfDropdown")
selectEl.innerHTML = ""
for (let df of Object.values(metadata.df)) {
const optionEl = document.createElement("option")
optionEl.value = df.uri
optionEl.textContent = df.label
selectEl.appendChild(optionEl);
}
selectEl.addEventListener("change", function(event) {
const selectedValue = event.target.value;
// TODO
});

console.log("metadata", metadata)
}

Expand Down

0 comments on commit 603e9fe

Please sign in to comment.