show correct link to compute instances in stack resource overview tab

There are two related fixes in the stacks resource overview page.
First, any resource types for which horizon does not have a link for
were getting a URL of "None" in the uuid field, and with this
change the link is suppressed if it is None. The second part involves
adding compute resources to the resource mappings, so that the uuid
field for those links to the instance detail page.

Change-Id: Ib8d51b49ac51092a3d7db6d889f4427167e5adb0
Closes-Bug: 1322162
This commit is contained in:
Miguel Grinberg 2014-08-21 23:00:02 +00:00
parent 285ae20d81
commit e8f5dc442c
2 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,8 @@ resource_urls = {
'link': 'horizon:project:networks:detail'},
"AWS::S3::Bucket": {
'link': 'horizon:project:containers:index'},
"OS::Nova::Server": {
'link': 'horizon:project:instances:detail'},
"OS::Quantum::Net": {
'link': 'horizon:project:networks:detail'},
"OS::Quantum::Port": {

View File

@ -12,9 +12,13 @@
<dl>
<dt>{% trans "Resource ID" %}</dt>
<dd>
{% if resource_url %}
<a href="{{ resource_url }}">
{{ resource.physical_resource_id }}
</a>
{% else %}
{{ resource.physical_resource_id }}
{% endif %}
</dd>
</dl>
<dl>