Commit 6ca561a5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

list of genomes is automatically refreshed during genome upload

parent ba1dacf4
......@@ -7,6 +7,8 @@ minerva (15.0.0~alpha.1) stable; urgency=medium
* Small improvement: uploaded map is automatically cached (#983)
* Small improvement: molart updated to version 1.5.0: Ability to show
unobserved structure regions in the sequence view.
* Small improvement: list of genomes is automatically refreshed during genome
upload (#820)
* Bug fix: structural states of proteins are imported properly from SBGNML PD
(#995)
* Bug fix: clear button icon, refresh comments button and show overview
......
......@@ -3586,9 +3586,9 @@
}
},
"molart": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/molart/-/molart-1.4.0.tgz",
"integrity": "sha512-+HPcwFZTxa3BwBcyimgsg5pCSphy6hdidYUeQ8VcMOd8UhfdmdhZAsSQkF/E31jjlwnIuYTDqLAbKE8GsX5clA==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/molart/-/molart-1.5.0.tgz",
"integrity": "sha512-3hxf1++izKhqVdc+X5NyGjOS9wu1PQd7+JpSeUJBIRKOO4fqmhUyYflQ2asymYwQv7GGxenFh2PQ24hmbOAXwQ==",
"dev": true
},
"mold-source-map": {
......
......@@ -35,6 +35,8 @@ function GenomeAdminPanel(params) {
GenomeAdminPanel.prototype = Object.create(AbstractAdminPanel.prototype);
GenomeAdminPanel.prototype.constructor = GenomeAdminPanel;
GenomeAdminPanel.AUTO_REFRESH_TIME = 5000;
/**
*
* @private
......@@ -202,6 +204,7 @@ GenomeAdminPanel.prototype.setReferenceGenomes = function (referenceGenomes) {
var self = this;
return self.getServerConnector().getLoggedUser().then(function (user) {
var requireUpdate = false;
var dataTable = $("[name='genomeTable']", self.getElement()).DataTable();
var data = [];
......@@ -211,10 +214,24 @@ GenomeAdminPanel.prototype.setReferenceGenomes = function (referenceGenomes) {
var genome = referenceGenomes[i];
var rowData = self.genomeToTableRow(genome, user);
data.push(rowData);
if (genome.getDownloadProgressStatus() !== "READY" &&
genome.getDownloadProgressStatus() !== "ERROR" &&
genome.getDownloadProgressStatus() !== "N/A") {
requireUpdate = true;
}
}
//it should be simplified, but I couldn't make it work
dataTable.clear().rows.add(data).page(page).draw(false).page(page).draw(false);
})
if (requireUpdate) {
setTimeout(function () {
logger.debug("Genomes auto refresh");
return self.onRefreshClicked();
}, GenomeAdminPanel.AUTO_REFRESH_TIME);
}
});
};
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment