Commit 236e4e6d authored by Jérome Perrin's avatar Jérome Perrin

Output_viewStationUtilisationGraph: use same code style as others output widgets

parent 8f529b08
......@@ -3,7 +3,7 @@
(function (window, rJS, $, initGadgetMixin) {
"use strict";
function station_utilisation_graph_widget(output_data) {
function station_utilisation_graph_widget(data, result_id) {
var blockage_data = [],
waiting_data = [],
failure_data = [],
......@@ -15,7 +15,7 @@
// XXX output is still elementList ???
$.each(
output_data.elementList.sort(
data.result.result_list[result_id].elementList.sort(
function (a, b) {
return a.id < b.id ? -1 : 1;
}
......@@ -146,8 +146,7 @@
})
.push(function (simulation_json) {
gadget.props.result_list = station_utilisation_graph_widget(
JSON.parse(simulation_json)
.result.result_list[gadget.props.result]
JSON.parse(simulation_json), gadget.props.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