Merge "Replace strings with booleans in memory details"

This commit is contained in:
Zuul 2022-10-19 13:24:55 +00:00 committed by Gerrit Code Review
commit dff397a114
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ class UpdateMemory(tables.LinkAction):
def get_processor_memory(memory):
if memory.hugepages_configured == 'True':
if memory.hugepages_configured is True:
template_name = \
'admin/inventory/memorys/_memoryfunction_hugepages.html'
else:

View File

@ -1,4 +1,4 @@
{% if memory.hugepages_configured == 'True' %}
{% if memory.hugepages_configured == True %}
<strong>{{ "4K Pages: " }}</strong> {{ "<br>" }}
<strong>{{ "&nbsp;&nbsp;&nbsp;&nbsp;Total: " }}</strong> {{ memory.vm_hugepages_nr_4K }} {{ "<br>" }}

View File

@ -1,4 +1,4 @@
{% if memory.hugepages_configured == 'True' %}
{% if memory.hugepages_configured == True %}
<strong>{{ "Size: " }}</strong> {{ memory.vswitch_hugepages_size_mib }} {{ " MiB" }} {{ "<br>" }}
{% if memory.vswitch_hugepages_reqd or memory.vswitch_hugepages_reqd == 0 %}
<strong>{{ "&nbsp;&nbsp;&nbsp;&nbsp;Total: " }}</strong> {{ memory.vswitch_hugepages_nr }}