diff --git a/apps/nar-v3/src/components/DatasetCard.jsx b/apps/nar-v3/src/components/DatasetCard.jsx
index dde08c1..aa8bf53 100644
--- a/apps/nar-v3/src/components/DatasetCard.jsx
+++ b/apps/nar-v3/src/components/DatasetCard.jsx
@@ -24,8 +24,7 @@ const UNITS_SYMBOLS = {
const styles = {
entity: { borderRadius: 5, width: "600px", padding: 2 },
activity: { width: "800px", padding: 2 },
-}
-
+};
function formatUnits(units) {
return UNITS_SYMBOLS[units.name] || units.name;
@@ -104,8 +103,10 @@ function SubjectCard(props) {
{/* todo: add subject group information */}
- - Species
- TO DO
- - Strain
- TO DO
+ - Species
+ - TO DO
+ - Strain
+ - TO DO
- Age
-
@@ -363,83 +364,99 @@ function DatasetCard(props) {
}
};
+ console.log("Rendering dataset in DatasetCard.jsx");
+ console.log(dataset);
+
return (
{dataset.fullName}
-
+
KG Search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ {dataset.subjects ? (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ) : (
+ ""
+ )}
);
}
diff --git a/apps/nar-v3/src/components/DatasetList.jsx b/apps/nar-v3/src/components/DatasetList.jsx
index 4250d1d..c948b7c 100644
--- a/apps/nar-v3/src/components/DatasetList.jsx
+++ b/apps/nar-v3/src/components/DatasetList.jsx
@@ -1,13 +1,19 @@
+import { Link as RouterLink } from "react-router-dom";
-
+import { uuidFromUri } from "../utility";
function DatasetList(props) {
-
- return
- {props.datasets.map((dataset) => (
- - {dataset.fullName || dataset.isVersionOf.fullName}
- ))}
-
;
+ return (
+
+ {props.datasets.map((dataset) => (
+ -
+
+ {dataset.fullName || dataset.isVersionOf.fullName}
+
+
+ ))}
+
+ );
}
-export default DatasetList;
\ No newline at end of file
+export default DatasetList;
diff --git a/apps/nar-v3/src/components/PatchClampRecordingList.jsx b/apps/nar-v3/src/components/PatchClampRecordingList.jsx
index d1e823c..9864ecc 100644
--- a/apps/nar-v3/src/components/PatchClampRecordingList.jsx
+++ b/apps/nar-v3/src/components/PatchClampRecordingList.jsx
@@ -1,19 +1,22 @@
-
import { Link as RouterLink } from "react-router-dom";
-
function uuidFromUri(uri) {
- const parts = uri.split("/");
- return parts[parts.length - 1];
+ const parts = uri.split("/");
+ return parts[parts.length - 1];
}
function PatchClampRecordingList(props) {
-
- return
- {props.tissueSamples.map((tissueSample) => (
- - {tissueSample.lookupLabel}
- ))}
-
;
+ return (
+
+ {props.tissueSamples.map((tissueSample) => (
+ -
+
+ {tissueSample.lookupLabel}
+
+
+ ))}
+
+ );
}
-export default PatchClampRecordingList;
\ No newline at end of file
+export default PatchClampRecordingList;
diff --git a/apps/nar-v3/src/routes/dataset.jsx b/apps/nar-v3/src/routes/dataset.jsx
index 6a3b12b..3d3848f 100644
--- a/apps/nar-v3/src/routes/dataset.jsx
+++ b/apps/nar-v3/src/routes/dataset.jsx
@@ -1,12 +1,25 @@
import React from "react";
import { Await, defer, useLoaderData } from "react-router-dom";
+import { buildKGQuery, simpleProperty as S, linkProperty as L, reverseLinkProperty as R } from "../queries";
import { datastore } from "../datastore";
-//import Navigation from "../components/Navigation";
+import { uuidFromUri } from "../utility.js";
+import Navigation from "../components/Navigation";
import DatasetCard from "../components/DatasetCard";
import ProgressIndicator from "../components/ProgressIndicator";
-const query = null;
+const query = buildKGQuery("core/DatasetVersion", [
+ S("@id"),
+ S("fullName"),
+ S("description"),
+ S("shortName"),
+ S("versionIdentifier"),
+ R("isVersionOf", "hasVersion", [
+ S("fullName"),
+ S("description"),
+ S("shortName"),
+ ]),
+]);
export async function loader({ params }) {
const datasetPromise = datastore.getKGItem(
@@ -23,14 +36,23 @@ function Dataset(props) {
return (
- {/*
*/}
-
}>
Error loading dataset.}
>
- {(dataset) => }
+ {(dataset) => {
+ console.log("Resolving dataset in dataset.jsx");
+ console.log(dataset);
+ return (
+ <>
+
+
+ >
+ );
+ }}
diff --git a/apps/nar-v3/src/routes/datasets.jsx b/apps/nar-v3/src/routes/datasets.jsx
index ef3cb77..d26c6a3 100644
--- a/apps/nar-v3/src/routes/datasets.jsx
+++ b/apps/nar-v3/src/routes/datasets.jsx
@@ -3,7 +3,7 @@ import { Await, defer, useLoaderData } from "react-router-dom";
import { buildKGQuery, simpleProperty as S, linkProperty as L, reverseLinkProperty as R } from "../queries";
import { datastore } from "../datastore";
-//import Navigation from "../components/Navigation";
+import Navigation from "../components/Navigation";
import DatasetList from "../components/DatasetList";
import ProgressIndicator from "../components/ProgressIndicator";
@@ -34,7 +34,7 @@ function Datasets(props) {
return (