Commit c372bb2a by Bach Dániel

dashboard: use inst.short_hostname instead of inst.primary_host.hostname

parent 0f33e9ae
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<i class="fa {{ i.get_status_icon }}" title="{{ i.get_status_display }}"></i> <i class="fa {{ i.get_status_icon }}" title="{{ i.get_status_display }}"></i>
{{ i.name }} {{ i.name }}
</span> </span>
<small class="text-muted"> {{ i.primary_host.hostname }}</small> <small class="text-muted"> {{ i.short_hostname }}</small>
<div class="pull-right dashboard-vm-favourite" data-vm="{{ i.pk }}"> <div class="pull-right dashboard-vm-favourite" data-vm="{{ i.pk }}">
{% if i.fav %} {% if i.fav %}
<i class="fa fa-star text-primary title-favourite" title="{% trans "Unfavourite" %}"></i> <i class="fa fa-star text-primary title-favourite" title="{% trans "Unfavourite" %}"></i>
......
...@@ -1883,7 +1883,7 @@ class VmList(LoginRequiredMixin, FilterMixin, ListView): ...@@ -1883,7 +1883,7 @@ class VmList(LoginRequiredMixin, FilterMixin, ListView):
'pk': i.pk, 'pk': i.pk,
'name': i.name, 'name': i.name,
'icon': i.get_status_icon(), 'icon': i.get_status_icon(),
'host': "" if not i.primary_host else i.primary_host.hostname, 'host': i.short_hostname,
'status': i.get_status_display(), 'status': i.get_status_display(),
'fav': i.pk in favs, 'fav': i.pk in favs,
} for i in instances] } for i in instances]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment