{% extends "model_list_bac.html" %} {% block custom_media %} {{ super() }} {% endblock %} {% block list_filter %} {{ filter_control('Filtered by guest OS:', 'ostype', 1) }} {{ filter_control('Filtered by capacity:', 'capacity', 2) }} {% endblock %} {% block extra_table_headers %} Guest OS Capacity Status Operations {% endblock %} {% block table_body %} {% for obj in MANAGER.all(): %} {{ obj.name }} {{ obj.ostype }} {{ obj.capacity }} {% set stat = obj.get_status(MANAGER) %} {{ stat }} {% if stat == 'running': %} {{ btn_group_control([['Suspend', 'btn-info'], ['Shutdown', 'btn-warning'], ['Reboot', 'btn-warning'] ]) }} {{ btn_group_control([['Web Admin', 'btn-primary'], ['Console', 'btn-primary'] ]) }} {% endif %} {% if stat == 'shutoff': %} {{ btn_group_control([['Start', 'btn-info btn-start'] ]) }} {% endif %} {% if stat == 'suspended': %} {{ btn_group_control([['Resume', 'btn-info'] ]) }} {% endif %} {% endfor %} {% endblock %} {% block tail_custom_media %} {{ super() }} {% endblock %}