From 4f3e6d3765fe0c0e9b28b8666766a3fbc58c35fd Mon Sep 17 00:00:00 2001 From: smilerz Date: Mon, 4 Dec 2023 11:29:34 -0600 Subject: [PATCH] added Postgres version to system page. Added warnings for out of date Postgres versions --- cookbook/templates/system.html | 24 +++++++++++++----------- cookbook/views/views.py | 32 ++++++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/cookbook/templates/system.html b/cookbook/templates/system.html index 90c2eabbf..e0efc107d 100644 --- a/cookbook/templates/system.html +++ b/cookbook/templates/system.html @@ -83,17 +83,18 @@ {% trans 'Everything is fine!' %} {% endif %} -

{% trans 'Database' %} {% if postgres %} - {% trans 'Info' %}{% else %}{% trans 'Ok' %}{% endif %}

- {% if postgres %} - {% trans 'Everything is fine!' %} - {% else %} - {% blocktrans %} - This application is not running with a Postgres database backend. This is ok but not recommended as some - features only work with postgres databases. - {% endblocktrans %} - {% endif %} +

{% trans 'Database' %} + + {% if postgres_status == 'warning' %} + {% trans 'Info' %} + {% elif postgres_status == 'danger'%} + {% trans 'Warning' %} + {% else %} + {% trans 'Ok' %} + {% endif %} + +

+ {{postgres_message}}

{% trans 'Orphaned Files' %} @@ -125,6 +126,7 @@