{% load i18n %} {# While an import is queued or running, the server page panel replaces itself every few seconds with a fresh copy. #}

{{ title }}

{% if status.next_state == "queued" %}
{% blocktrans with id=status.next_job.pk %}Import queued (job #{{ id }}). Nothing has been imported yet.{% endblocktrans %} {% if status.next_destination == "branch" %}{% trans "It will write into an import branch, not into main." %}{% elif status.next_destination == "current" %}{% blocktrans with branch=status.next_branch %}It will write into branch {{ branch }}, not into main.{% endblocktrans %}{% elif status.next_destination == "main" %}{% trans "It will write directly into main." %}{% endif %} {% trans "Job" %}
{% elif status.next_state == "running" %}
{% blocktrans with id=status.next_job.pk %}Import running (job #{{ id }}).{% endblocktrans %} {% if status.next_destination == "branch" %}{% trans "It writes into an import branch, not into main." %}{% elif status.next_destination == "current" %}{% blocktrans with branch=status.next_branch %}It writes into branch {{ branch }}, not into main.{% endblocktrans %}{% elif status.next_destination == "main" %}{% trans "It writes directly into main." %}{% endif %} {% trans "Job" %}
{% elif status.next_state == "failed" %} {% endif %} {% if status.run %} {% if status.next_state %}

{% trans "Previous import" %}

{% endif %} {% if status.state == "running" %}
{% trans "Import running. Nothing is final until it has finished." %} {% if status.chosen_branch %}{% blocktrans with branch=status.run.branch_name %}It writes into branch {{ branch }}, not into main.{% endblocktrans %}{% elif status.uses_branching %}{% trans "It writes into an import branch, not into main." %}{% elif status.direct %}{% trans "It writes directly into main." %}{% endif %}
{% elif status.state == "failed" %} {% elif status.direct %}
{% if not status.changes %} {# Main matched Windows when the import ran; that says nothing about main today. #} {% trans "No differences found: main matched Windows when this import ran." %} {% else %} {% blocktrans count n=status.changes %}Imported {{ n }} difference directly into main.{% plural %}Imported {{ n }} differences directly into main.{% endblocktrans %} {% trans "No branch or change request was used." %} {% endif %}
{% elif status.branch %}
{% if status.chosen_branch %} {% if not status.changes %} {% trans "No differences found: the branch below matched Windows when this import ran." %} {% else %} {% blocktrans count n=status.changes %}Imported {{ n }} difference into the branch you chose.{% plural %}Imported {{ n }} differences into the branch you chose.{% endblocktrans %} {% endif %} {% elif not status.changes %} {% if status.branch.main_unchanged %} {% trans "No new differences since the last import: the branch below already holds them." %} {% else %} {% trans "No new differences since the import before it: the branch below already held them." %} {% endif %} {% elif status.branch_created %} {% blocktrans count n=status.changes %}Imported {{ n }} difference into a new branch.{% plural %}Imported {{ n }} differences into a new branch.{% endblocktrans %} {% elif status.branch_created is None %} {# Recorded before runs said whether they opened their branch. #} {% blocktrans count n=status.changes %}Imported {{ n }} difference into the import branch below.{% plural %}Imported {{ n }} differences into the import branch below.{% endblocktrans %} {% elif status.branch.main_unchanged %} {% blocktrans count n=status.changes %}Added {{ n }} difference to the open import branch.{% plural %}Added {{ n }} differences to the open import branch.{% endblocktrans %} {% else %} {# The branch was open when the run added to it; what became of it since follows (issue #44). #} {% blocktrans count n=status.changes %}Added {{ n }} difference to an import branch that was already open.{% plural %}Added {{ n }} differences to an import branch that was already open.{% endblocktrans %} {% endif %} {% if status.branch.main_unchanged %} {% trans "Main has not been changed." %} {% trans "Review the branch, then merge it to bring the changes into main." %} {% else %} {% include "netbox_windows_dhcp_plugin/inc/import_branch_outcome.html" with info=status.branch %} {% endif %}
{% elif status.uses_branching %}
{% trans "No differences found: nothing was imported and no branch was created." %}
{% elif status.state == "completed" %} {# Without branching. Differences a reviewer already dismissed are not proposed again, so "no proposal" #} {# does not mean "no differences" (issue #43): only a run that found none says so. #}
{% if not status.changes %} {% trans "No differences found." %} {% elif status.review is None %} {# A run from before #43 with no proposal linked: it cannot tell whether anything went to review. #} {% blocktrans count n=status.changes %}{{ n }} difference found; no import proposal is linked to this run.{% plural %}{{ n }} differences found; no import proposal is linked to this run.{% endblocktrans %} {% elif not status.review %} {% trans "No new differences waiting for review." %} {% blocktrans count n=status.dismissed %}{{ n }} difference found earlier was dismissed and stays ignored while Windows shows the same values.{% plural %}{{ n }} differences found earlier were dismissed and stay ignored while Windows shows the same values.{% endblocktrans %} {% elif status.proposal %} {% blocktrans count n=status.review %}{{ n }} difference waits for review in an import proposal.{% plural %}{{ n }} differences wait for review in an import proposal.{% endblocktrans %} {% elif status.proposal_hidden %} {% blocktrans count n=status.review %}{{ n }} difference waits for review in an import proposal you may not view.{% plural %}{{ n }} differences wait for review in an import proposal you may not view.{% endblocktrans %} {% else %} {# A later import took the open proposal over (it moves to the newest run), or the proposal was deleted. #} {% blocktrans count n=status.review %}{{ n }} difference was sent for review. That import proposal now belongs to a later import or no longer exists.{% plural %}{{ n }} differences were sent for review. That import proposal now belongs to a later import or no longer exists.{% endblocktrans %} {% endif %} {% if status.review and status.dismissed %} {% blocktrans count n=status.dismissed %}{{ n }} difference dismissed earlier stays ignored while Windows shows the same values.{% plural %}{{ n }} differences dismissed earlier stay ignored while Windows shows the same values.{% endblocktrans %} {% endif %}
{% endif %} {% if status.direct %} {% elif status.branch %} {% include "netbox_windows_dhcp_plugin/inc/import_branch_rows.html" with info=status.branch label=_("Branch") %} {% elif status.proposal %} {% elif status.open_proposal %} {% endif %} {% if refresh_url %} {% endif %}
{% trans "Destination" %} {% trans "Main" %}
{% trans "Import proposal" %} {{ status.proposal }}
{% trans "Open import proposal" %} {{ status.open_proposal }}
{% trans "Sync run" %} {{ status.run }} {% trans "All imports" %}
{% trans "Finished" %} {% if status.run.completed %}{{ status.run.completed|isodatetime }}{% else %}{{ None|placeholder }}{% endif %}
{% endif %} {% if status.earlier_branch %}

{% trans "An earlier import's branch is still open. Main has not been changed by it." %}

{% include "netbox_windows_dhcp_plugin/inc/import_branch_rows.html" with info=status.earlier_branch label=_("Open branch") %}
{% endif %}