do not link machine if no url present

This commit is contained in:
Tomáš Mládek 2020-07-15 15:43:24 +02:00
parent cabe3baeb1
commit 41c1f38cdb

View file

@ -63,22 +63,30 @@
VPS STATS — {{ vps_stats|safe }}
</section>
{% for machine in machines %}
<a class="machine box status-{{ machine.status }}" href="{{ machine.url|default:"#" }}">
<section class="box-content">
{% if machine.image_url %}
<img src="{{ machine.image_url }}" alt="image for {{ machine.short_name }}"/>
{% endif %}
<div class="label">
<h3>{{ machine.short_name }}</h3>
{% if machine.description %}
<p class="description">{{ machine.description }}</p>
{% endif %}
</div>
</section>
<section class="status" title="Last ping at: {{ machine.last_ping|default:"UNKNOWN" }}">
STATUS: {{ machine.status }}
</section>
{% if machine.url %}
<a class="machine box status-{{ machine.status }}" href="{{ machine.url }}">
{% else %}
<div class="machine box status-{{ machine.status }}">
{% endif %}
<section class="box-content">
{% if machine.image_url %}
<img src="{{ machine.image_url }}" alt="image for {{ machine.short_name }}"/>
{% endif %}
<div class="label">
<h3>{{ machine.short_name }}</h3>
{% if machine.description %}
<p class="description">{{ machine.description }}</p>
{% endif %}
</div>
</section>
<section class="status" title="Last ping at: {{ machine.last_ping|default:"UNKNOWN" }}">
STATUS: {{ machine.status }}
</section>
{% if machine.url %}
</a>
{% else %}
</div>
{% endif %}
{% endfor %}
</section>
{% endif %}