From f5e7722c476c5aa9e7d0291666d6c73eb126c7fa Mon Sep 17 00:00:00 2001
From: Frederick Muriuki Muriithi
Date: Mon, 13 Apr 2026 12:27:57 -0500
Subject: Fetch markers from JSON endpoint.
---
uploader/templates/genotypes/list-genotypes.html | 52 +++++++++++++++++-------
1 file changed, 38 insertions(+), 14 deletions(-)
diff --git a/uploader/templates/genotypes/list-genotypes.html b/uploader/templates/genotypes/list-genotypes.html
index 226cc46..8c6910b 100644
--- a/uploader/templates/genotypes/list-genotypes.html
+++ b/uploader/templates/genotypes/list-genotypes.html
@@ -83,18 +83,18 @@
-
Genetic Markers
+
Genotype Data
-
-
+
+ | # |
Index |
Marker Name |
Chr |
@@ -113,6 +113,7 @@
|
|
|
+ |
{%endfor%}
@@ -183,18 +184,41 @@
$(function() {
var dtGeneticMarkers = buildDataTable(
"#tbl-genetic-markers",
- (
- $("#tbl-genetic-markers").length === 1 ?
- JSON.parse($("#tbl-genetic-markers").attr("data-genetic-markers")) :
- []),
+ [],
[
+ {
+ data: function(marker) {
+ return ``;
+ }
+ },
{data: 'index'},
- {data: 'Name'},
- {data: 'Chr'},
- {data: 'Mb'},
- {data: 'Source'},
- {data: 'Source2'}
- ]);
+ {data: "Name", searchable: true},
+ {data: "Chr", searchable: true},
+ {data: "Mb", searchable: true},
+ {data: "Source", searchable: true},
+ {data: "Source2", searchable: true}
+ ],
+ {
+ ajax: {
+ url: "{{url_for('species.populations.genotypes.list_markers', species_id=species.SpeciesId, population_id=population.Id, dataset_id=dataset.Id)}}",
+ dataSrc: "markers"
+ },
+ paging: true,
+ scroller: true,
+ scrollY: "50vh",
+ scrollCollapse: true,
+ layout: {
+ top: "info",
+ topStart: null,
+ topEnd: null,
+ bottom: null,
+ bottomStart: null,
+ bottomEnd: null
+ }
+ });
});
--
cgit 1.4.1