Skip to content
Snippets Groups Projects
Commit f7e2a9ab authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-2886: added antenna_set column

parent efe228d1
No related branches found
No related tags found
No related merge requests found
......@@ -769,14 +769,14 @@ def public_schedule(request):
# else, return html table
base_url = request._current_scheme_host
table_rows = '''<tr><th>Project</th><th>ID</th><th>Status</th><th>Start [UTC]</th><th>End [UTC]</th><th>Duration [min]</th><th>Center [LST]</th><th>Target(s)</th></tr>\n'''
table_rows = '''<tr><th>Project</th><th>ID</th><th>Status</th><th>Start [UTC]</th><th>End [UTC]</th><th>Duration [min]</th><th>Center [LST]</th><th>Antenna</th><th>Target(s)</th></tr>\n'''
row_date = date.min
for su in scheduled_or_running_units:
if su.on_sky_start_time.date() > row_date:
row_date = su.on_sky_start_time.date()
table_rows += '''<tr><td style="font-weight: bold; background-color: #999999;" colspan=8>%s</td></tr>\n''' % (row_date.strftime('%Y-%m-%d'))
table_rows += '''<tr><td style="font-weight: bold; background-color: #999999;" colspan=9>%s</td></tr>\n''' % (row_date.strftime('%Y-%m-%d'))
table_rows += '''<tr><td><a href="%s/project/view/%s">%s</a></td><td><a href="%s/schedulingunit/view/blueprint/%s">%s</a></td><td>%s</td><td>%s</td><td>%s</td><td>%d</td><td>%s</td><td>%s</td></tr>\n''' % (
table_rows += '''<tr><td><a href="%s/project/view/%s">%s</a></td><td><a href="%s/schedulingunit/view/blueprint/%s">%s</a></td><td>%s</td><td>%s</td><td>%s</td><td>%d</td><td>%s</td><td>%s</td><td>%s</td></tr>\n''' % (
base_url, su.project, su.project,
base_url, su.id, su.id,
su.status.value,
......@@ -784,6 +784,7 @@ def public_schedule(request):
su.on_sky_stop_time.strftime('%H:%M') if su.on_sky_stop_time else '',
round(su.on_sky_duration.total_seconds()/60.0),
su.main_observation_scheduled_central_lst.strftime('%H:%M') if su.main_observation_scheduled_central_lst else '',
', '.join(sorted(list([q for q in set([x['specifications_doc__station_configuration__antenna_set'] for x in su.observation_tasks.values('specifications_doc__station_configuration__antenna_set')]) if q is not None]))),
su.target_pointings_astropy)
html_doc = '''<!DOCTYPE html>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment