{% extends "layouts/panel.html" %} {% load i18n %} {% load ravix_ui %} {% block title %}{% trans "Updates" %}{% endblock %} {% block page_title %}{% trans "Updates" %}{% endblock %} {% block content %}

{% trans "Updates" %}

{% trans "Core, theme and plugin versions, checking for a new version from the official source, and the upgrade history. No file is replaced without a SHA-256 check and a digital signature." %}

{% trans "How to update" %}
{% csrf_token %}
{% if v.core.restart_pending %}

{% trans "The code on disk (" %}{{ v.core.disk }}{% trans ") is newer than the running process (" %}{{ v.core.running }}{% trans "). Restart the web service." %}

{% endif %} {% if lock %}

{% trans "An upgrade is in progress:" %} {{ lock.operation }} {% blocktrans trimmed with since=lock.since|jalali_datetime %}(since {{ since }}). No other upgrade is possible until it finishes.{% endblocktrans %}

{% endif %} {% for r in recovery %}{% endfor %} {% if error %}{% endif %} {% if source_state == "no_key" %}

{% trans "The official update source is disabled until a trusted public key is configured, because no package can be verified without one. This is not an error; new versions are simply not checked yet." %}

{% elif not has_source %}

{% trans "The official update source is not configured (" %}RAVIX_UPDATE_URL{% trans "). Until you configure it, only installed versions are shown. No new version is ever “guessed”." %}

{% endif %} {% if not web_apply %}

{% trans "Applying upgrades from the web is off (the safest mode). Do it with the command" %} python manage.py ravix_update apply core {% trans "to apply an upgrade." %}

{% endif %}

{% trans "Core" %}

{% trans "Current version:" %} {% blocktrans trimmed with running=v.core.running %}{{ running }} — plugin contract{% endblocktrans %} {{ v.contracts.plugin_api }}{% trans ", theme contract" %} {{ v.contracts.theme_api }}{% trans ", Python" %} {{ v.python }}

{% if plan and plan.latest %}

{% trans "New version:" %} {{ plan.latest.version }} {% if plan.latest.released %}({{ plan.latest.released }}){% endif %}{% if plan.latest.migrations %} {% trans "— includes a database migration" %}{% endif %}

{% if notes %}

{{ notes }}

{% elif plan.latest.notes %}

{{ plan.latest.notes }}

{% endif %} {% if job %}

{% trans "An update is in progress." %} {% trans "Show progress" %}

{% endif %} {% if manual %}{% endif %} {% if can_queue and plan.can_apply and not job %}
{% csrf_token %} {% if manual %}{% endif %}
{% endif %} {% if plan.problems %}{% endif %} {% if plan.warnings %}
    {% for p in plan.warnings %}
  • {{ p }}
  • {% endfor %}
{% endif %} {% if can_manage and web_apply and plan.can_apply %}
{% csrf_token %}
{% endif %} {% elif plan %}

{% trans "The core is up to date" %}

{% endif %}
{% if can_manage and web_apply %}

{% trans "Update from a file" %}

{% trans "Upload the update ZIP you downloaded (it contains index.json and the ravix-core package). It is checked (SHA-256 and signature), the site is backed up first, then upgraded, and restarted automatically on shared hosting." %}

{% csrf_token %}
{% endif %}

{% trans "Themes and plugins" %}

{% for t in v.themes %}{% endfor %} {% for p in v.plugins %}{% endfor %}
{% trans "Type" %}{% trans "Name" %}{% trans "Version" %}{% trans "New version" %}
{% trans "Theme" %}{{ t.slug }}{{ t.version }}{{ t.new|default:"—" }} {% if can_manage and web_apply and t.new %}
{% csrf_token %}
{% endif %}
{% trans "Plugin" %}{{ p.slug }}{{ p.version }}{{ p.new|default:"—" }} {% if can_manage and web_apply and p.new %}
{% csrf_token %}
{% endif %}

{% trans "Update history" %}

{% if runs %}
{% for r in runs %}{% endfor %}
#{% trans "Time" %}{% trans "Component" %}{% trans "Version" %}{% trans "Status" %}{% trans "Migration" %}
{{ r.pk }}{{ r.started_at|jalali_datetime }}{{ r.get_component_display }}{% if r.slug %} {{ r.slug }}{% endif %}{% if r.kind == "rollback" %} {% trans "(rollback)" %}{% endif %} {{ r.from_version }} → {{ r.to_version }} {{ r.get_status_display }} {{ r.migrations_applied|length }}{% trans "Details" %}
{% else %}
{% trans "No upgrade has been performed yet." %}
{% endif %}
{% endblock %}