Commit ee54d4ee authored by Marc Duez's avatar Marc Duez

model.js : getSoftVersion()

parent 5c293338
......@@ -126,7 +126,7 @@ Report.prototype = {
var content = [
{label: "Filename:" , value : m.dataFileName },
{label: "Report date:" , value : report_timestamp},
{label: "Soft version:" , value : "vidjil version"},
{label: "Soft version:" , value : m.getSoftVersion()},
{label: "data date:" , value : m.timestamp[0].split(" ")[0] },
{label: "last analysis date:" , value : analysis_timestamp}
]
......
......@@ -718,6 +718,21 @@ Model.prototype = {
return value;
},
//return the soft version if available
//return "multiple" if different soft have been used for different samples
getSoftVersion: function() {
if (this.samples.producer == "undefined"){
return "unknow"
}else{
var soft_version = this.samples.producer[this.samples.order[0]]
for (var i=1; i<this.samples.order.length; i++){
if (soft_version != this.samples.producer[this.samples.order[i]])
return "multiple version used"
}
return soft_version
}
},
toggle_system: function(system){
if (this.system_available.indexOf(system) != -1) {
var pos = this.system_selected.indexOf(system)
......
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