{% extends "base.html" %} {% import "_base.html" as _base %} {% import "_wtform.html" as wtform %} {% import "_section.html" as _section %} {% block breadcrumbs %} {{ _base.breadcrumbs(section, [ (gettext('%(rulename)s', rulename=rule['name']), url_for('rule', path=section['path'], rulename=rule['name'], revision=section['revision'])) ]) }} {% endblock %} {% set current_revision = current_section['revision'] -%} {% set is_editable = section['revision'] == current_revision -%} {% set config_is_editable = (is_editor or is_owner) and section['revision'] == current_revision %} {% if is_editable %} {% block extrahead %} {{ _section.rule_form_script() }} {{ _section.yaml_editor_boilerplate() }} {% endblock %} {% endif %} {% block content %} {% if is_editable and is_owner %} {{ wtform.modal_form(id='editruleform', title=gettext('Edit rule'), submit_text=gettext('Save'), form=edit_rule_form, attrs=_section.ruleform_attrs(section)) }}
{% trans -%} You are viewing a rule from an outdated revision of the section! {%- endtrans %}
{% with securl=url_for('section', path=section['path'], revision=current_revision), secname=section['name'], rulename=rule['name'], ruleurl=url_for('rule', path=section['path'], rulename=rule['name'], revision=current_revision) %}{%- if not rule_exists_in_current_revision -%} {% trans -%} Rule "{{ rulename }}" was deleted and doesn't exist in the current revision of section "{{ secname }}" r{{ current_revision }}. {%- endtrans %} {%- else -%} {% trans -%} See rule "{{ rulename }}" in section's current revision r{{ current_revision }}. {%- endtrans %} {%- endif %}
{% endwith -%}{% if parent_rule %} {% trans url=url_for('rule', path=section['path'], rulename=parent_rule['name'], revision=section['revision']), rulename=rule['name'], parent_rule_name=parent_rule['name'] -%} Rule "{{ rulename }}" is a subrule of rule {{ parent_rule_name }}. {%- endtrans %} {% endif %} {% trans url=url_for('history', path=section['path'], rule=rule['name']) -%} See rule changes history {%- endtrans %}
{{ _section.editors(rule['editors']) }}
{{ rule['selector'] }}
{% trans %}rule applies to all hosts{% endtrans %}
{% endif %}{{ _section.sandbox_rule_config_source(rule['config_source'], section['path'], section['revision']) }} {{ _base.volatile_labels(resource_volatile) }}
{% endif %}