Commit 798a65fc authored by root's avatar root

feat: added current release to update page

parent cb2fb59a
......@@ -126,6 +126,17 @@ class Update(views.View):
"""Handle GET requests."""
context = {}
try:
request.ldap.search(
settings.LDAP_TREE_CPANEL,
'(objectClass=*)',
attributes=['type']
)
cur_release = request.ldap.entries[0].type.value
context['current_release'] = cur_release.replace("_", " ")
except Exception as e:
context['current_release'] = None
if settings.NO_API:
puppet_status = debug.STATUS
else:
......
......@@ -14,6 +14,9 @@
<div class="page__content--update">
<div class="page__content-left--update">
<div class="update-text {{ status }}">
<h4>
{% trans 'Versión actual:' %} {{ current_release }}
</h4>
{% if status == 'error' %}
<h3>
{% trans 'La tarea de Mantenimiento o Actualización ha producido un error.' %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment