Commit e9637324 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '820-automatic-refresh-during-adding-new-genome' into 'master'

Resolve "Automatic refresh during adding new genome"

Closes #820

See merge request minerva/core!1014
parents be8b9d5c 6ca561a5
......@@ -5,6 +5,10 @@ minerva (15.0.0~alpha.1) stable; urgency=medium
* Small improvement: simple molecules in sbgn compliant view are drawn as
ellipses not circles (#796)
* 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": {
......
......@@ -31,7 +31,7 @@
"mkdirp": "^0.5.1",
"mocha": "^3.5.3",
"mock-local-storage": "^1.1.8",
"molart": "1.4.0",
"molart": "1.5.0",
"node-fetch": "^2.6.0",
"stream-to-blob": "^1.0.1",
"uglifyjs": "^2.4.10"
......
......@@ -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