1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

replace deprecated ifequal/ifnotequal with if

This commit is contained in:
catborise 2020-06-04 15:40:57 +03:00
parent e46bb99b3b
commit 6a0d04d300
14 changed files with 74 additions and 74 deletions

View file

@ -17,9 +17,9 @@
<td><a href="{% url 'instance' host.0 inst %}">{{ inst }}</a><br><small><em>{{ info.title }}</em></small></td>
<td><a href="{% url 'overview' host.0 %}">{{ host.1 }}</a><br><small><em>{% if info.userinstances.count > 0 %}{{ info.userinstances.first_user.user.username }}{% if info.userinstances.count > 1 %} (+{{ info.userinstances.count|add:"-1" }}){% endif %}{% endif %}</em></small></td>
<td>
{% ifequal vm.status 1 %}<span class="text-success">{% trans "Active" %}</span>{% endifequal %}
{% ifequal vm.status 5 %}<span class="text-danger">{% trans "Off" %}</span>{% endifequal %}
{% ifequal vm.status 3 %}<span class="text-warning">{% trans "Suspend" %}</span>{% endifequal %}
{% if vm.status == 1 %}<span class="text-success">{% trans "Active" %}</span>{% endif %}
{% if vm.status == 5 %}<span class="text-danger">{% trans "Off" %}</span>{% endif %}
{% if vm.status == 3 %}<span class="text-warning">{% trans "Suspend" %}</span>{% endif %}
</td>
<td>{{ vm.vcpu }}</td>
<td>{{ vm.memory|filesizeformat }}</td>