{% from "components.html" import dot, pill with context %} {% macro tick(row) -%} {% if diff.live and not row.rejected %} {% else %} {% endif %} {%- endmacro %} {% macro switch(path, options, current, on) -%} {% for key, label in options %} {% if on %} {% else %} {{ label }} {% endif %} {% endfor %} {%- endmacro %} {% macro entry(row) -%} {{ pill(row.change, row.tone) }} {{ row.path }} {% if row.source %} ← {{ row.source }} {% endif %} {% if row.outcome %} {{ pill(row.outcome, row.outcome_tone) }} {% elif row.conflict is not none %} {{ pill('conflict', 'red') }} {% else %} {% if row.sensitive %}{{ pill('sensitive', 'amber') }}{% endif %} {{ row.detail }} {% endif %} {%- endmacro %}

{{ diff.banner.title }}

{{ diff.banner.text }}

{% if diff.live %} {% endif %}
{% for key, label in diff.filters %} {% set href = diff.link(change=key) %} {{ label }} {{ diff.counts[key] }} {% endfor %} {% if diff.live %} {% elif diff.state == "sent" %} Select all Clear {% endif %}
{% set plain = diff.state == "merged" %}
CHANGE PATH
{% for row in diff.rows %} {% if plain %}
{% if row.rejected %} {{ entry(row) }} {% else %} {% set href = diff.link(entry=row.index) %} {{ entry(row) }} {% endif %}
{% else %}
{{ tick(row) }} {% if row.rejected %} {{ entry(row) }} {% else %} {% set href = diff.link(entry=row.index) %} {{ entry(row) }} {% endif %} {% if row.conflict is not none %} {{ switch(row.path, on_conflict, row.resolution, row.selected) }} {% endif %}
{% endif %} {% else %}

No entries.

{% endfor %}
{% if diff.picked %} {% set path = diff.picked.path %}

SELECTED ENTRY

{{ path }}

Change
{{ pill(diff.picked.change, diff.picked.tone) }}
{% for fact in diff.picked.facts %}
{{ fact.label }}
{{ fact.value }}
{% endfor %}
On merge
{{ switch(path, on_merge, diff.selection.resolutions.get(path, "apply"), diff.live and path in diff.selection.paths) }}

{{ entry_note }}

{% endif %} {% if diff.conflict %} {% set conflict = diff.conflict %}

CONFLICT · {{ conflict.position }} OF {{ conflict.total }}

{{ conflict.path }}

Reason
{{ conflict.reason }}
{% for fact in conflict.facts %}
{{ fact.label }}
{{ fact.value }}
{% endfor %}
Resolution
{{ switch(conflict.path, on_conflict, conflict.resolution, conflict.path in diff.selection.paths) }}
    {% for note in conflict_notes %}
  • {{ note }}
  • {% endfor %}
{% endif %} {% if diff.sensitive and not plain %}

{% if diff.sensitive_left %} SENSITIVE · {{ diff.sensitive_left }} LEFT OUT {% else %} SENSITIVE · {{ diff.sensitive | length }} {% endif %}

    {% for row in diff.sensitive %}
  • {{ tick(row) }}{{ row.path }}
  • {% endfor %}

{{ sensitive_note }}

{% endif %} {% if diff.rejected and not plain %}

REJECTED · {{ diff.rejected | length }}

{% for row in diff.rejected %}
{{ row.path }}
{{ row.detail }}
{% endfor %}

{{ rejected_note }}

{% endif %} {% if diff.report %}

REPORT

{% for fact in diff.report %}
{{ fact.label }}
{{ fact.value }}
{% endfor %}

{{ report_note }}

{% endif %} {% if diff.where %}

WHERE THINGS WENT

Backup
merge/backup/
Export
merge/export/
Runner
{% if diff.where.runner_id %} {{ diff.where.runner }} {% else %} {{ diff.where.runner }} {% endif %} · {{ diff.where.archive }}

{{ where_note }}

{% endif %}
{% if diff.content %} {% set item = diff.content %}

CONTENT

{{ item.path }} {{ item.change }}
HOST {{ item.host or "not on the host" }}
AGENT {{ item.agent or "not on the agent side" }}

Reading…

{% endif %} {% set bar = diff.bar %}

{{ bar.title }}

{{ bar.text }}

{% if diff.error %}{% endif %}
{% if bar.action in ("merge", "again") %} {% set query = diff.selection.query() %}
Merge nothing {% set label = "Send decision again" if bar.action == "again" else "Merge " ~ bar.count ~ (" path" if bar.count == 1 else " paths") %} {% if bar.ready %} {{ label }} {% else %} {% endif %}
{% elif bar.action == "applying" %} {{ dot("blue", small=true) }} Applying on {{ run.runner }} {% endif %}