- {% blocktrans trimmed %}
- This will run unattended-upgrades, which will attempt to upgrade
- your system with the latest Debian packages. It may take a few
- minutes to complete.
- {% endblocktrans %}
-
+ {% if result %}
-
+
{% trans "Output from unattended-upgrades:" %}
+
+
{{ result.error }}
+ {% endif %}
+
+ {% if result.output %}
+
+
+
+ {% trans "The operating system is up to date now. " %}
+
+
+
+
+
+
+
{% trans "Output from unattended-upgrades:" %}
+
{{ result.output }}
+
+
+ {% endif %}
+
+ {% endif %}
+
+
+ {% if not result and not running %}
+
+ {% blocktrans trimmed %}
+ This will run unattended-upgrades, which will attempt to upgrade
+ your system with the latest Debian packages. It may take a few
+ minutes to complete.
+ {% endblocktrans %}
+
+
+
+ {% endif %}
+
+ {% if running %}
+
+
+ {% trans "Upgrade is running" %}
+
+ {% endif %}
{% endblock %}
+
+{% block page_js %}
+
+{% endblock %}
diff --git a/plinth/modules/upgrades/templates/upgrades_run.html b/plinth/modules/upgrades/templates/upgrades_run.html
deleted file mode 100644
index aa904c28b..000000000
--- a/plinth/modules/upgrades/templates/upgrades_run.html
+++ /dev/null
@@ -1,68 +0,0 @@
-{% extends 'base.html' %}
-{% comment %}
-#
-# This file is part of Plinth.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-{% endcomment %}
-
-{% load i18n %}
-
-{% block content %}
-
-
{{title}}
-
- {% if upgrades_error %}
-
- {% trans "There was an error while upgrading." %}
-
-
-
{% trans "Output from unattended-upgrades:" %}
-
-
{{ upgrades_error }}
- {% endif %}
-
- {% if upgrades_output %}
-
-
-
- {% trans "The operating system is up to date now. " %}
-
-