{{ _('OCPI') }}

{% if message %} {% endif %}
{{ _('Sending OCPI CDRs is disabled by default and must be explicitly enabled.') }}
{{ _('Please verify the target URL before enabling OCPI forwarding.') }}
{{ _('The token is only used when OCPI forwarding is explicitly enabled.') }}

{{ _('OCPI Backends') }}

{{ _('Multiple targets can be maintained in parallel. Active backends are used per station according to the assignment list.') }}

{% for backend in ocpi_backends %}

{{ _('Identity') }}

{{ _('Primary endpoint for OCPI interactions.') }}
{{ _('Optional explicit versions endpoint used during discovery.') }}

{{ _('Modules') }}

{% for module in available_modules %} {% set checkbox_id = 'backend-' ~ backend.backend_id ~ '-' ~ module %}
{% endfor %}
{{ _('Choose the OCPI modules this backend should serve.') }}
{% set stats = backend.feed_stats %} {% set last_status = stats.last_status if stats.last_status is defined else None %} {% set last_created = stats.last_created_at if stats.last_created_at is defined else None %}

{{ _('Feed status') }}

{{ _('Total:') }} {{ stats.total or 0 }}
{{ _('Success:') }} {{ stats.success or 0 }} / {{ _('Failures:') }} {{ stats.failure or 0 }}
{{ _('Pending retries:') }} {{ stats.pending or 0 }}
{{ _('Last response:') }} {{ last_status if last_status is not none else _('n/a') }}{% if last_created %} ({{ last_created }}){% endif %}
{% set command_stats = backend.command_stats or {} %} {% set commands_row = command_stats.get('commands') or {} %} {% set profiles_row = command_stats.get('chargingprofiles') or {} %}

{{ _('Commands / Profiles') }}

{{ _('Commands:') }} {{ commands_row.total or 0 }} ({{ _('OK') }} {{ commands_row.success or 0 }}, {{ _('Errors') }} {{ commands_row.failure or 0 }})
{{ _('Last:') }} {{ commands_row.last_status or _('n/a') }}{% if commands_row.last_created_at %} ({{ commands_row.last_created_at }}){% endif %}
{{ _('Profiles:') }} {{ profiles_row.total or 0 }} ({{ _('OK') }} {{ profiles_row.success or 0 }}, {{ _('Errors') }} {{ profiles_row.failure or 0 }})
{{ _('Last:') }} {{ profiles_row.last_status or _('n/a') }}{% if profiles_row.last_created_at %} ({{ profiles_row.last_created_at }}){% endif %}

{{ _('Tokens') }}

{{ _('Used for the initial versions/credentials call.') }}
{{ _('Peer token:') }} {{ backend.peer_token or _('pending') }}

{{ _('Active / Actions') }}

{% endfor %}

{{ _('Identity') }}

{{ _('Primary endpoint for OCPI interactions.') }}
{{ _('Optional explicit versions endpoint used during discovery.') }}

{{ _('Modules') }}

{% for module in available_modules %} {% set checkbox_id = 'backend-new-' ~ module %}
{% endfor %}
{{ _('Choose the OCPI modules this backend should serve.') }}

{{ _('Feed status') }}

{{ _('Totals:') }} 0
{{ _('Pending retries:') }} 0
{{ _('Last response: n/a') }}

{{ _('Commands / Profiles') }}

{{ _('Commands:') }} 0
{{ _('Profiles:') }} 0
{{ _('Last response: n/a') }}

{{ _('Tokens') }}

{{ _('Used for the initial versions/credentials call.') }}
{{ _('Peer token: pending') }}

{{ _('Active / Actions') }}