Skip to content
Snippets Groups Projects
Commit a2f27523 authored by cramakri's avatar cramakri
Browse files

LMS-2638 Finished

SVN: 23693
parent b7f0b7a9
No related branches found
No related tags found
No related merge requests found
...@@ -341,16 +341,21 @@ function updateInspectors(duration) ...@@ -341,16 +341,21 @@ function updateInspectors(duration)
.append("caption").text(function(d) { return d; }); .append("caption").text(function(d) { return d; });
// We just want to see non-directories here // We just want to see non-directories here
var downloadTableRow = var downloadTableRow = downloadTable.selectAll("tr").data(filesForSequencingSample, function(d) { return d.pathInDataSet });
downloadTable.selectAll("tr") downloadTableRow
.data(function(d) { return (d.files) ? d.files.filter(function(file) { return !file.isDirectory }) : [] })
.enter() .enter()
.append("tr") .append("tr")
.append("td") .append("td")
.style("text-align", "left") .style("text-align", "left")
.on("click", downloadTableFile) .on("click", downloadTableFile)
.text(function(d) { return d.pathInListing }); .text(function(d) { return d.pathInListing });
downloadTableRow
.exit()
.transition()
.duration(duration)
.style("opacity", "0")
.remove();
inspector.exit().transition() inspector.exit().transition()
.duration(duration) .duration(duration)
.style("opacity", "0") .style("opacity", "0")
...@@ -378,12 +383,13 @@ function retrieveFilesForSequencingSample(sequencing) ...@@ -378,12 +383,13 @@ function retrieveFilesForSequencingSample(sequencing)
// No point getting files for a sample that hasn't been sequenced // No point getting files for a sample that hasn't been sequenced
if (!hasSampleBeenSequenced(sequencing)) return; if (!hasSampleBeenSequenced(sequencing)) return;
sequencing.loadingFiles = true;
dsu.retrieveDataSetsForSequencingSample(sequencing, function(data) { dsu.retrieveDataSetsForSequencingSample(sequencing, function(data) {
if (!data.result) return; if (!data.result) return;
sequencing.datasets = data.result.map(function(bisds) { return {bis : bisds} }); sequencing.datasets = data.result.map(function(bisds) { return {bis : bisds} });
sequencing.files = []; sequencing.files = [];
sequencing.loadingFiles = true;
// Get all the files and update the inspectors once all the data is avilable // Get all the files and update the inspectors once all the data is avilable
var deferrer = var deferrer =
...@@ -443,6 +449,12 @@ function downloadTableFile(d) ...@@ -443,6 +449,12 @@ function downloadTableFile(d)
dsu.server.getDownloadUrlForFileForDataSet(d.dataset.bis.code, d.pathInDataSet, action); dsu.server.getDownloadUrlForFileForDataSet(d.dataset.bis.code, d.pathInDataSet, action);
} }
function filesForSequencingSample(d)
{
if (d.loadingFiles) return [{ pathInListing : "Loading..." }];
return (d.files) ? d.files.filter(function(file) { return !file.isDirectory }) : [];
}
function enterApp() function enterApp()
{ {
$("#login-form-div").hide(); $("#login-form-div").hide();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment