{% macro pagination_row(page, what, btn_text=None, btn_href=None) %}
{{ what }} from {{ (page.page - 1) * page.per_page + 1}} to {{ min(page.page * page.per_page, page.total) }} from total {{ page.total }}
{% if btn_text %} {{ btn_text }} {% endif %}
{% endmacro %} {% macro package_table(packages, page, order, collection=None, untracked_toggle=True) %} {% macro _pagination() %} {% if page and untracked_toggle and request.args.get('untracked') == '1' %} {{ pagination_row(page, 'Tracked and untracked packages', btn_text='Hide untracked', btn_href=page_args(untracked=None)) }} {% elif page and untracked_toggle %} {{ pagination_row(page, 'Tracked packages', btn_text='Show untracked', btn_href=page_args(untracked=1)) }} {% elif page %} {{ pagination_row(page, 'Packages') }} {% endif %} {% endmacro %} {% macro _ordered_column(name, title, description, css_class=None) %} {% if name in order[:1] %} {{ title }} {% elif '-' + name in order[:1] %} {{ title }} {% else %} {{ title }} {% endif %} {% endmacro %} {{ _pagination() }} {{ _ordered_column('name', 'Name', 'name of the package') }} {% if not collection %} {% for coll in g.current_collections %} {{ _ordered_column('state-' + coll.name, coll.display_name, 'package state in ' + coll.display_name, css_class="collection-column") }} {% endfor %} {% else %} {{ _ordered_column('state', 'State', 'package state in ' + collection.display_name) }} {% endif %} {{ _ordered_column('running', 'Running', 'whether the package has a runnig build') }} {% if collection %} {{ _ordered_column('task_id', 'Task ID', 'ID of Koji task of last package build') }} {{ _ordered_column('started', 'Last build started', 'time of start of last package build') }} {{ _ordered_column('current_priority', 'Priority', 'value of package current priority') }} {% endif %} {% for package in packages %} {% set last_build = package.last_build %} {% set args = page_args(clear=True, collection=collection.name if collection else None) %} {% if collection %} {% else %} {# unified view #} {% for pkg in package.packages %} {% endfor %} {% endif %} {% if collection %} {% if last_build %} {% else %} {% endif %} {% endif %} {% endfor %}
Package groups
{{ package.name }}
{{ package.state_string }}
{% if package.state_string %} {{ package.state_icon }} {% endif %}
{% if pkg.tracked %} {{ pkg.state_icon }} {% endif %} {{ package.running_icon }} {{ last_build.task_id }} {{ last_build.started | date }} {% if package.current_priority is not none %} {{ package.current_priority | int }} {% endif %} {% for group in package.visible_groups %} {{ group }} {% endfor %}
{{ _pagination() }} {% endmacro %} {% macro task_tree(build, show_time=False, show_details_btn=False, show_cancel_btn=False, show_logs=False) %}
{{ build.state_string }}
{{ build.state_icon }}
{{ build.task_id }}
{% if show_time %} {{ build.started|date }} {% endif %} {% if show_details_btn %}
{% endif %} {% if show_cancel_btn %}
{% endif %}
{% for subtask in build.build_arch_tasks %}
{{ subtask.arch }}
{{ "├└"[loop.last] }}{{ subtask.task_id }} {% if show_logs %} ( build.log | root.log ) {% else %} {{ subtask.state_string }} {% endif %}
{% endfor %} {% endmacro %} {% macro depchange_row(change) %}
{{ change.dep_name }}
{% set prev_evr, curr_evr = change.pretty_evrs %}
{{ prev_evr }}
{% if not change.prev_evr %} {% elif not change.curr_evr %} {% elif change.prev_evr < change.curr_evr %} {% else %} {% endif %}
{{ curr_evr }}
{% if change.distance == 1 %} 1 {% elif change.distance %} {{ change.distance }} {% elif change.curr_evr %} B {% endif %}
{% endmacro %} {% macro collapsed_list(items, show_count=10) %} {% set key = next_key() %} {% for item in items[:show_count] %} {{ caller(item) }} {% endfor %}
{% for item in items[show_count:] %} {{ caller(item) }} {% endfor %}
{% if show_count >= 0 and items|length > show_count %}
{% endif %} {% endmacro %} {% macro depchange_table(dependency_changes) %} {% if dependency_changes %} {% call(change) collapsed_list(dependency_changes) %} {{ depchange_row(change) }} {% endcall %} {% else %} No dependency changes {% endif %} {% endmacro %} {% macro collection_chooser(allow_all=True) %}
{% endmacro %} {% macro user_rebuilds_description() %}
User rebuilds make it possible to test package updates before they land in the distribution. The input is a copr project that contains packages which the distribution should be tested against. Koschei examines repo from given copr, resolves dependencies of the whole distribution with the repo added and selects few packages which are most likely to be affected to be rebuilt. After the resolution is done, you can make changes to the rebuild queue (add/remove packages). The rebuilds start automatically and are done in koschei managed coprs (i.e. not the one you supplied).
{% endmacro %}