{% extends "base.html" %} {% import "_base.html" as _base %} {% import "_section.html" as _section %} {% block head %} {{ super() }} {% endblock %} {% block breadcrumbs %} {%- if not rule -%} {{ _base.breadcrumbs(section, [ (gettext('history'), url_for('history', path=section['path'])) ]) }} {%- else -%} {{ _base.breadcrumbs(section, [ (gettext('%(rulename)s', rulename=rule), url_for('rule', path=section['path'], rulename=rule)), (gettext('history'), url_for('history', path=section['path'], rule=rule)) ]) }} {%- endif -%} {% endblock %} {% block content -%}
{% trans %}Showing only changes, affecting rule {{ rule }}.{% endtrans %}
{% trans %}Show all changes{% endtrans %} {%- else -%} {% trans %}Recursive{% endtrans %} {% trans %}(show history of all subsections){% endtrans %} {%- endif %}{% trans %}History is empty{% endtrans %}
{% else %} {{ _base.pager(page, is_last_page, is_first_page, endpoint='history', params=dict(path=section['path'], rule=rule, recursive='1' if recursive_history else None)) }}{% with when='{}'.format(record['when']|timestampformat(format='medium')|escape)|safe, who=_base.username(record['who']), section='{secpath} r{rev}'.format( securl=url_for('section', path=record['path'], revision=record['revision']), secpath=record['path']|escape or 'genisys', sechisturl=url_for('history', path=record['path']), rev=record['revision'])|safe, rule='' %} {%- if record['what'] == 'create_section' -%} {% trans %}{{ when }} {{ who }} created section {{ section }}{% endtrans %} {%- elif record['what'] == 'set_section_owners' -%} {% trans %}{{ when }} {{ who }} changed owners of section {{ section }}{% endtrans %} {%- elif record['what'] == 'set_section_desc' -%} {% trans %}{{ when }} {{ who }} changed description of section {{ section }}{% endtrans %} {%- elif record['what'] == 'delete_empty_section' -%} {% trans %}{{ when }} {{ who }} deleted empty section {{ section }}{% endtrans %} {%- elif record['what'] == 'reorder_rules' -%} {% trans %}{{ when }} {{ who }} changed order of rules in section {{ section }}{% endtrans %} {%- elif record['what'] == 'save_aliases' -%} {% trans %}{{ when }} {{ who }} changed sandbox resource aliases in section {{ section }}{% endtrans %} {%- elif record['what'] == 'revert_rules' -%} {% trans revert_to_rev=record['extra']['revert_to_rev'] -%} {{ when }} {{ who }} reverted rules to revision {{ revert_to_rev }} in section {{ section }} {%- endtrans %} {%- endif %} {%- if record['what'] in ('delete_rule', 'edit_rule', 'edit_rule_config', 'create_rule') -%} {% with rule='{rulename}'.format( url=url_for('rule', path=record['path'], rulename=record['affected_rules'][0], revision=record['revision']), rulename=record['affected_rules'][0]|escape)|safe -%} {%- if record['what'] == 'delete_rule' -%} {% trans %}{{ when }} {{ who }} deleted rule {{ rule }} from section {{ section }} {% endtrans %} {%- elif record['what'] == 'create_rule' -%} {% trans %}{{ when }} {{ who }} created rule {{ rule }} in section {{ section }}{% endtrans %} {%- elif record['what'] == 'edit_rule' -%} {% trans %}{{ when }} {{ who }} edited rule {{ rule }} of section {{ section }} {% endtrans %} {%- elif record['what'] == 'edit_rule_config' -%} {% trans %}{{ when }} {{ who }} changed config of rule {{ rule }} in section {{ section }} {% endtrans %} {%- endif -%} {%- endwith -%} {%- endif %} {% endwith -%} {%- if record['result'] == 'success' -%} {%- elif record['result'] == 'model_error' -%} {{ gettext(record['exc_class']) }} {%- else -%} {% trans %}Unhandled error{% endtrans %} {% endif -%}
{% if not rule and record.get('affected_rules') and record['affected_rules']|length == 1 -%}{%- trans url=url_for('history', path=record['path'], rule=record['affected_rules'][0]), affected_rule=record['affected_rules'][0] -%} Show only changes affecting rule {{ affected_rule }} {%- endtrans %}
{%- elif not rule and record.get('affected_rules') -%}{% trans %}Affected rules:{% endtrans %} {% for rulename in record['affected_rules'] %} {{ rulename }} {%- if not loop.last %}, {% endif %} {% endfor %}
{%- endif %}{% trans %}applies to all hosts{% endtrans %}
{%- else -%}{{ record['extra']['selector'] }}{%- endif -%}
{{ record['extra']['config_source'] }}
{% trans %}applies to all hosts{% endtrans %}
{%- else -%}{{ record['extra']['selector'] }}{%- endif -%}
{{ record['extra']['config_source'] }}
{% trans %}applies to all hosts{% endtrans %}
{%- elif b['selector'] is none -%}{{ a['selector'] }}
{%- else -%}
{{ _base.textdiff(a['selector'], b['selector']) }}
{%- endif -%}