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

fix bug in exit statistics

parent 41079718
...@@ -38,8 +38,10 @@ ...@@ -38,8 +38,10 @@
) / attainment_list.length) * 100).toFixed(2); ) / attainment_list.length) * 100).toFixed(2);
} }
function calculate_exit_stat(output_data) { function calculate_exit_stat(data) {
var elementList = output_data.elementList, var output_data = data.result,
input_data = data.input,
elementList = output_data.elementList,
i, i,
j, j,
metric, metric,
...@@ -48,7 +50,7 @@ ...@@ -48,7 +50,7 @@
interval_value, interval_value,
interval_list, interval_list,
attainment_list, attainment_list,
throughputTarget = parseFloat(output_data.general.throughputTarget), throughputTarget = input_data.general.throughputTarget,
result = ""; result = "";
for (i = 0; i < elementList.length; i += 1) { for (i = 0; i < elementList.length; i += 1) {
...@@ -146,7 +148,7 @@ ...@@ -146,7 +148,7 @@
}) })
.push(function (simulation_json) { .push(function (simulation_json) {
var result = calculate_exit_stat( var result = calculate_exit_stat(
JSON.parse(simulation_json)[gadget.props.result].result JSON.parse(simulation_json)[gadget.props.result]
); );
gadget.props.element.innerHTML = result; gadget.props.element.innerHTML = result;
}); });
......
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