From 5443beef65a593d57401e35b6fcac8d9ad079645 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 20 Sep 2021 17:15:31 +1000 Subject: [PATCH 1/3] Improve 'health status' warnings - Don't show error message if only non-critical warnings present --- InvenTree/InvenTree/context.py | 7 ++++++- InvenTree/templates/navbar.html | 10 +--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/InvenTree/InvenTree/context.py b/InvenTree/InvenTree/context.py index 3e1f98ffc2..bd68a0182f 100644 --- a/InvenTree/InvenTree/context.py +++ b/InvenTree/InvenTree/context.py @@ -36,9 +36,14 @@ def health_status(request): 'email_configured': InvenTree.status.is_email_configured(), } + # The following keys are required to denote system health + health_keys = [ + 'django_q_running', + ] + all_healthy = True - for k in status.keys(): + for k in health_keys: if status[k] is not True: all_healthy = False diff --git a/InvenTree/templates/navbar.html b/InvenTree/templates/navbar.html index b109bd9daf..6946b69bce 100644 --- a/InvenTree/templates/navbar.html +++ b/InvenTree/templates/navbar.html @@ -71,11 +71,7 @@ {% if user.is_staff %} {% if not system_healthy %} - {% if not django_q_running %} - {% else %} - - {% endif %} {% elif not up_to_date %} {% endif %} @@ -96,11 +92,7 @@ {% if system_healthy or not user.is_staff %} {% else %} - {% if not django_q_running %} - - {% else %} - - {% endif %} + {% endif %} {% trans "System Information" %} From c1a827819c3a10d18383d25041c8eefc74bc65eb Mon Sep 17 00:00:00 2001 From: rocheparadox Date: Mon, 20 Sep 2021 17:00:45 +0530 Subject: [PATCH 2/3] css for part to occupy full height - fix for bug Inventree#1848 --- InvenTree/InvenTree/static/css/inventree.css | 4 ++++ InvenTree/templates/js/translated/part.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index 9ed478ea90..585c0b3825 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -1061,3 +1061,7 @@ input[type='number']{ .search-menu .ui-menu-item { margin-top: 0.5rem; } + +.product-card-panel{ + height: 100%; +} diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index 8cae5d249b..9abbd2a0b9 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -768,7 +768,7 @@ function partGridTile(part) { var html = `