Commit 423cf03c authored by Georgios Dagkakis's avatar Georgios Dagkakis

sort the gantts for stations according to entrance times

parent ba032769
......@@ -53,7 +53,17 @@ class CapacityStationGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
color='cyan',
entranceTime=entranceTime
)
# sort the tasks for an order according to the entrance time of the first component
for task_id, task in task_dict.iteritems():
if not task.get('entranceTime',None):
childrenTimes=[]
for t_id, t in task_dict.iteritems():
if t.get('parent',None)==task_id and not (t.get('entranceTime',None)==None):
childrenTimes.append(t['entranceTime'])
if childrenTimes:
task['entranceTime']=min(childrenTimes)
# return the result to the gadget
result[self.configuration_dict['output_id']] = dict(
time_unit=self.getTimeUnitText(),
......
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