{% macro progress_bar(percentage) -%}
{{percentage|round(0)}}%
{% endmacro %} {# A boolean where true is "good" and gets colored green; false is colored red. Note: below, "yes" and "no" are surrounded by special non-breaking space characters to pad out the boxes a little bit. For some reason   is not parsed. #} {% macro true_good_boolean(value) -%} {% if value %}  yes  {% else %}  no  {% endif %} {% endmacro %} {% macro file_listing(files) -%}
{% for f in files %} {% if f.obsid %} {% else %} {% endif %} {% endfor %}
Name Created Observation Type Source Size
{{f.name}}   details {{f.create_time}}{{f.obsid}}null{{f.type}} {{f.source}} {{f.size|filesizeformat}}
{% endmacro %} {% macro obs_listing(obs) -%}
{% for o in obs %} {% endfor %}
Obsid Start JD Start LST (hr) Duration (days) Total size
{{o.obsid}} {{o.start_time_jd}} {{o.start_lst_hr}} {{o.duration}} {{o.total_size|filesizeformat}}
{% endmacro %} {% macro session_listing_basic(sessions) -%}
{% for s in sessions %} {% endfor %}
Session ID Date (UTC) Start JD Stop JD Duration (days) Num. Obs.
{{s.id}} {{s.start_time_calendar_date}} {{s.start_time_jd}} {{s.stop_time_jd}} {{s.duration}} {{s.num_obs}}
{% endmacro %} {% macro session_listing_detailed(sessions) -%}
{% for s in sessions %} {% endfor %}
Session ID Date (UTC) Start JD Stop JD Duration (days) Num. Obs. Num. Files (with instances) Total size
{{s.id}} {{s.start_time_calendar_date}} {{s.start_time_jd}} {{s.stop_time_jd}} {{s.duration}} {{s.num_obs}} {{s.num_files}} ({{s.num_files_with_instances}}) {{s.total_size|filesizeformat}}
{% endmacro %} {% macro store_listing(stores) -%}
{% for s in stores %} {% endfor %}
Name SSH Host Path Prefix HTTP Prefix Capacity Usage Available?
{{s.name}} {{s.ssh_host}} {{s.path_prefix}} {% if s.http_prefix %} {{s.http_prefix}} {% else %} — {% endif %} {% if s.available %} {{s.capacity|filesizeformat}} {% else %} ? {% endif %} {% if s.available %} {{progress_bar(s.usage_percentage)}} {% else %} ? {% endif %} {{true_good_boolean(s.available)}}
{% endmacro %} {% macro staging_form_ui(username_placeholder, dest_path) -%}
{% endmacro %}