{% extends "base.html" %} {% import "_jobs.html" as parts with context %} {% import "_bank.html" as bank with context %} {% block title %}{{ t('keys.title') }} — {{ connection.connection_id }} — painfree{% endblock %} {% block head %} {# No JavaScript anywhere in this console. A job the worker is still running is waited for with a plain refresh, which works with scripting turned off. #} {% if outstanding %}{% endif %} {% endblock %} {% block body %}

{{ t('keys.heading') }} — {{ connection.connection_id }}

{{ connection.key_state.value }} {{ t('key_state.' ~ connection.key_state.value) }}. {{ t('keys.lede') }}

{% if outstanding %}
{{ t('keys.waiting') }}: {{ outstanding.action.value }}, {{ t('keys.requested_by', who=outstanding.requested_by_id, when=outstanding.created_at | moment) }} {{ t('keys.refreshes') }}
{% elif watched %}
{{ watched.action.value }} {{ watched.state.value }}. {% if watched.return_code %} {{ t('keys.bank_answered') }} {{ watched.return_code }} {{ bank.quiet(watched.report_text) }}{% endif %} {% if watched.last_error %}
{{ watched.last_error }}{% endif %} {% if watched.result %}
{{ watched.result | pretty_json }}
{% endif %}
{% endif %} {% if staged %}
{{ t('keys.staged') }} {{ t('keys.staged_why') }}

{{ t('keys.open_comparison') }}

{% endif %}
  1. 1   {{ t('keys.step1') }}
    {{ t('keys.step1_body') }}
    {% if subscriber_keys %} {{ parts.key_table(subscriber_keys) }} {% elif may('connections:write') and available.create_keys and not outstanding %}
    {% endif %}
  2. 2   {{ t('keys.step2') }}
    {{ t('keys.step2_body') }}
    {% if connection.ini_sent %}

    {{ t('keys.sent_order_id') }} {{ connection.ini_order_id or '—' }}.

    {% elif may('connections:write') and available.send_ini and subscriber_keys and not outstanding %}
    {% endif %}
  3. 3   {{ t('keys.step3') }}
    {{ t('keys.step3_body') }}
    {% if connection.hia_sent %}

    {{ t('keys.sent_order_id') }} {{ connection.hia_order_id or '—' }}.

    {% elif may('connections:write') and available.send_hia and not outstanding %}
    {% endif %}
  4. 4   {{ t('keys.step4') }}
    {{ t('keys.step4_body') }}
    {% if subscriber_keys %}

    {{ t('keys.open_letter') }}

    {% endif %}
  5. 5   {{ t('keys.step5') }}
    {{ t('keys.step5_body') }}
    {% if may('connections:write') and available.fetch_hpb and not outstanding %}
    {% endif %}
  6. 6   {{ t('keys.step6') }}
    {{ t('keys.step6_body') }}
    {% if staged %}

    {{ t('keys.open_comparison') }}

    {% elif connection.bank_fingerprints %}

    {{ t('keys.confirmed') }}

    {% for role, value in connection.bank_fingerprints.items() %} {% endfor %}
    {{ role }}{{ value | fingerprint }}
    {% endif %}
{% if may('connections:write') and subscriber_keys %}

{{ t('keys.renewal') }}

{{ t('keys.renewal_body') }}

{% endif %}

{{ t('keys.operations') }}

{{ parts.job_table(jobs) }}
{% endblock %}