{% extends "generic/_base.html" %} {% load i18n %} {% comment %} The page every migration pass is started from. Context: - inventory_job: The most recent inventory Job, or None - staging_job: The most recent staging Job, or None - staging_queued: Whether a staging pass is already under way - blocking_findings: The blocking findings the last inventory recorded, each {path, code, message} - warning_count: How many modules the last inventory reported a warning for - branch_import_count: How many modules import something absent, but only inside a branch - undefined_script_count: How many published Scripts their own module does not define - reports_excluded: Whether the last inventory reported built-in report modules it excludes - helper_count: How many modules the last inventory reported would publish nothing - rows: One {key, name, project, revision} per Project either pass named, project None until staged - run: The open MigrationRun, or None before the first staging pass - cutover_job: The most recent cutover Job, or None - cutover_queued: Whether a cutover is already under way - can_cut_over: Whether the crossing has not been recorded yet and can be served past the fence - cutover_interrupted: Whether the state reached cutover with the crossing unrecorded, so the fence may have closed - unservable_projects: The staged Projects that could serve nothing past the fence, each {project_key, reason} - activation_job: The most recent activation Job, or None - activation_queued: Whether an activation is already under way - can_activate: Whether the fence has been crossed, which is activation's only precondition - references_job: The most recent reference pass Job, or None - references_queued: Whether a reference pass is already under way - can_repoint: Whether every migrated Project that still exists serves, so a reference has a row to name - projects_not_serving: The migrated Projects that exist and serve nothing, which a reference pass would refuse over - cleanup_job: The most recent cleanup Job, or None - cleanup_queued: Whether a cleanup is already under way - can_clean_up: Whether every reference step is done and every mapped Project serves, which is what deletion waits for - verification_job: The most recent verification Job, or None - next_action: Which pass to run next, or None when the next move is not a button here {% endcomment %} {% block title %} {% trans "Custom Script migration" %} {% endblock title %} {% block content %}

{% trans "Migrate from the built-in feature" %}

{% trans "The inventory reports what a migration would do and changes nothing. Staging creates the Script Projects it proposes, every one inactive, and leaves the built-in Custom Scripts serving. Every step from the cutover onwards changes what this installation runs, and there is no way back." %}

{% trans "State" %} {% if run %} {{ run.get_state_display }} {% else %} {% trans "Not started" %} {% endif %}
{% trans "Last inventory" %} {% include "netbox_scripts/inc/migration_job.html" with job=inventory_job %}
{% trans "Last staging" %} {% include "netbox_scripts/inc/migration_job.html" with job=staging_job %}
{% trans "Last cutover" %} {% include "netbox_scripts/inc/migration_job.html" with job=cutover_job %}
{% trans "Last activation" %} {% include "netbox_scripts/inc/migration_job.html" with job=activation_job %}
{% trans "Last reference pass" %} {% include "netbox_scripts/inc/migration_job.html" with job=references_job %}
{% trans "Last cleanup" %} {% include "netbox_scripts/inc/migration_job.html" with job=cleanup_job %}
{% trans "Last verification" %} {% include "netbox_scripts/inc/migration_job.html" with job=verification_job %}
{% if blocking_findings %} {% endif %} {% if unservable_projects and perms.netbox_scripts.migrate_scriptproject %} {% endif %} {% if projects_not_serving and perms.netbox_scripts.migrate_scriptproject %} {% endif %} {% if warning_count %}

{% blocktrans count total=warning_count %} One module imports the legacy authoring API, which stops working at NetBox v5.0. Staging is not blocked by it. {% plural %} {{ total }} modules import the legacy authoring API, which stops working at NetBox v5.0. Staging is not blocked by them. {% endblocktrans %} {% trans "The inventory names each one." %}

{% endif %} {% if branch_import_count %}

{% blocktrans count total=branch_import_count %} One module imports something this host cannot provide, but only inside a conditional branch. If that branch runs, the revision fails validation and says so. Staging is not blocked by it. {% plural %} {{ total }} modules import something this host cannot provide, but only inside a conditional branch. If those branches run, the revisions fail validation and say so. Staging is not blocked by them. {% endblocktrans %} {% trans "The inventory names each one." %}

{% endif %} {% if undefined_script_count %}

{% blocktrans count total=undefined_script_count %} One Script the built-in feature publishes is not defined in the module it publishes from, so a migration cannot keep it under that identity. {% plural %} {{ total }} Scripts the built-in feature publishes are not defined in the modules they publish from, so a migration cannot keep them under those identities. {% endblocktrans %} {% trans "The inventory names each one." %}

{% endif %} {% if reports_excluded %}

{% trans "Built-in report modules are not part of this migration, because reports use an authoring API this plugin does not serve." %} {% trans "The inventory says how many, and the cutover withdraws any permission naming them." %}

{% endif %} {% if helper_count %}

{% blocktrans count total=helper_count %} One module publishes no Script, so it migrates as a helper file rather than a script file. {% plural %} {{ total }} modules publish no Script, so they migrate as helper files rather than script files. {% endblocktrans %} {% trans "The inventory names each one." %}

{% endif %} {% if rows %}

{% trans "Projects" %}

{% trans "Every Project the passes above name, including one the inventory proposed that staging has not created yet. Each state is read now rather than when a pass ran, so it is the verdict validation reached, and a revision that was refused records why on its own page." %}

{% for row in rows %} {% with revision=row.revision %} {% endwith %} {% endfor %}
{% trans "Script Project" %} {% trans "Revision" %} {% trans "Status" %} {% trans "Scripts" %}
{% if row.project %} {{ row.project }} {% else %} {{ row.name }} {% endif %} {% if revision %} {% firstof revision.short_digest _("Not stored") %} {% else %} {{ ''|placeholder }} {% endif %} {% if revision %} {{ revision.get_status_display }} {% else %} {% trans "Not staged" %} {% endif %} {% if revision %} {{ revision.discovered_scripts|length }} {% else %} {{ ''|placeholder }} {% endif %}
{% endif %} {% if cutover_interrupted and perms.netbox_scripts.migrate_scriptproject %} {% endif %}
{% comment %} The seven passes in the order they run, each numbered, with the one next_action names filled and the rest outlined. Verification is last despite sitting outside the destructive gate with the inventory: the gate says who may run a pass, not when it runs. {% endcomment %}
{% endblock content %}