Commit 3604f385 authored by Jérome Perrin's avatar Jérome Perrin

Output_viewStationUtilisationGraph: use same code style as others output widgets

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