mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
Mark the unreachable computes properly
When a compute can not be connected (for whatever reason) mark it as not connected in the template. The generic check if compute.status is not enough because the status variable can contain a string with a connection error.
This commit is contained in:
parent
c62e6ba3bc
commit
2058395081
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@
|
|||
{% if computes_info %}
|
||||
{% for compute in computes_info %}
|
||||
<div id="{{ compute.name }}" class="col-xs-12 col-sm-4">
|
||||
<div class="panel {% if compute.status %}panel-success{% else %}panel-danger{% endif %} panel-data">
|
||||
<div class="panel {% ifequal compute.status 1 %}panel-success{% else %}panel-danger{% endifequal %} panel-data">
|
||||
<div class="panel-heading">
|
||||
{% ifequal compute.status 1 %}
|
||||
<h3 class="panel-title">
|
||||
|
@ -40,11 +40,11 @@
|
|||
<p><strong>{% trans "Status" %}:</strong></p>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-6">
|
||||
{% if compute.status %}
|
||||
{% ifequal compute.status 1 %}
|
||||
<p>{% trans "Connected" %}</p>
|
||||
{% else %}
|
||||
<p>{% trans "Not Connected" %}</p>
|
||||
{% endif %}
|
||||
{% endifequal %}
|
||||
{% if compute.details %}
|
||||
<p>{% trans compute.details %}</p>
|
||||
{% else %}
|
||||
|
|
Loading…
Reference in a new issue