Adding resource link to resource detail page in Heat view

Change-Id: I155d0eec5d46be5df1c7d9ea090de39e56fe6c7d
Implements: blueprint heat-stack-detail-resources-column
This commit is contained in:
Jordan OMara 2014-02-05 17:19:03 -05:00
parent 11eebb8aa3
commit 7a66585e53
2 changed files with 10 additions and 2 deletions

View File

@ -22,6 +22,7 @@ from openstack_dashboard import api
from openstack_dashboard.dashboards.project.stacks \
import api as project_api
from openstack_dashboard.dashboards.project.stacks import mappings
from openstack_dashboard.dashboards.project.stacks \
import tables as project_tables
@ -58,8 +59,11 @@ class ResourceOverviewTab(tabs.Tab):
template_name = "project/stacks/_resource_overview.html"
def get_context_data(self, request):
resource = self.tab_group.kwargs['resource']
resource_url = mappings.resource_to_url(resource)
return {
"resource": self.tab_group.kwargs['resource'],
"resource": resource,
"resource_url": resource_url,
"metadata": self.tab_group.kwargs['metadata']}

View File

@ -11,7 +11,11 @@
</dl>
<dl>
<dt>{% trans "Resource ID" %}</dt>
<dd>{{ resource.physical_resource_id }}</dd>
<dd>
<a href="{{ resource_url }}">
{{ resource.physical_resource_id }}
</a>
</dd>
</dl>
<dl>
<dt>{% trans "Stack Resource Type" %}</dt>