Server overview: display hypervisor name if available
Previously this had a check for is_superuser. That's sort of right since the default nova-api policy doesn't return the hypervisor if you don't have the admin priv. But, since there is a modifiable policy enforced by the api, let's just let that decide. If nova-api returns the hypervisor, presumably it has decided that we're allowed to see it, so let's see it! Change-Id: I0cfe9090e8263f983fa5f42f42616a26407be47a
This commit is contained in:
parent
9219ada359
commit
1f13da0e47
openstack_dashboard/dashboards/project/instances
@ -35,8 +35,7 @@ class OverviewTab(tabs.Tab):
|
||||
"_detail_overview.html")
|
||||
|
||||
def get_context_data(self, request):
|
||||
return {"instance": self.tab_group.kwargs['instance'],
|
||||
"is_superuser": request.user.is_superuser}
|
||||
return {"instance": self.tab_group.kwargs['instance']}
|
||||
|
||||
|
||||
class InterfacesTab(tabs.TableTab):
|
||||
|
@ -20,9 +20,9 @@
|
||||
<dd>{{ instance.created|parse_isotime }}</dd>
|
||||
<dt>{% trans "Time Since Created" %}</dt>
|
||||
<dd>{{ instance.created|parse_isotime|timesince }}</dd>
|
||||
{% if is_superuser %}
|
||||
{% if instance.host_server %}
|
||||
<dt>{% trans "Host" %}</dt>
|
||||
<dd>{{ instance.host_server|default:_("-") }}</dd>
|
||||
<dd>{{ instance.host_server }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user