Commit d1181d2b authored by Jérome Perrin's avatar Jérome Perrin

Output daily attainment

parent de81ae4f
......@@ -495,7 +495,22 @@
if (el._class == 'Dream.Exit'){
var text = exit_stat.html() + "<br/><b>" + (el.name || el.id) + "</b><br/>";
$.each(el.results, function(metric, value){
text = text + "<em>" + metric + "</em>: " + value + "<br/>";
if (metric == 'intervalThroughputList') {
var general = that.getData().general,
throughputTarget = parseFloat(general.throughputTarget),
desiredPercentageOfSuccess = parseFloat(general.desiredPercentageOfSuccess);
text += "<em>Daily Attainment</em>: "
$.each(value, function(i, intervalValue) {
var icon = "fa-frown-o";
if ((intervalValue/throughputTarget) > desiredPercentageOfSuccess) {
icon = "fa-smile-o"
}
text += intervalValue + '<i class="fa ' + icon + '"/> ';
})
text += "<br/>";
} else {
text += "<em>" + metric + "</em>: " + value + "<br/>";
}
})
exit_stat.html(text);
}
......
......@@ -44,6 +44,18 @@ class Simulation(DefaultSimulation):
conf["Dream-Configuration"]["gui"]["exit_stat"] = 1
conf["Dream-Configuration"]["gui"]["debug_json"] = 1
conf["Dream-Configuration"]["gui"]["shift_spreadsheet"] = 1
# some more global properties
conf["Dream-Configuration"]["property_list"].append( {
"id": "throughputTarget",
"type": "string",
"_class": "Dream.Property",
"_default": "10" })
conf["Dream-Configuration"]["property_list"].append( {
"id": "desiredPercentageOfSuccess",
"type": "string",
"_class": "Dream.Property",
"_default": "0.85" })
# remove tools that does not make sense here
conf.pop('Dream-Machine')
conf.pop('Dream-Repairman')
......
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