From e9132200d6f458a39b2715a1ffdf123a8324b08c Mon Sep 17 00:00:00 2001 From: Jordan OMara Date: Wed, 5 Feb 2014 17:19:03 -0500 Subject: [PATCH] Adding resource link to resource detail page in Heat view Change-Id: I155d0eec5d46be5df1c7d9ea090de39e56fe6c7d Implements: blueprint heat-stack-detail-resources-column --- openstack_dashboard/dashboards/project/stacks/tabs.py | 6 +++++- .../project/stacks/templates/stacks/_resource_overview.html | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/dashboards/project/stacks/tabs.py b/openstack_dashboard/dashboards/project/stacks/tabs.py index 935975be..c68464a3 100644 --- a/openstack_dashboard/dashboards/project/stacks/tabs.py +++ b/openstack_dashboard/dashboards/project/stacks/tabs.py @@ -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']} diff --git a/openstack_dashboard/dashboards/project/stacks/templates/stacks/_resource_overview.html b/openstack_dashboard/dashboards/project/stacks/templates/stacks/_resource_overview.html index 64ed7f7c..ba8156e8 100644 --- a/openstack_dashboard/dashboards/project/stacks/templates/stacks/_resource_overview.html +++ b/openstack_dashboard/dashboards/project/stacks/templates/stacks/_resource_overview.html @@ -11,7 +11,11 @@
{% trans "Resource ID" %}
-
{{ resource.physical_resource_id }}
+
+ + {{ resource.physical_resource_id }} + +
{% trans "Stack Resource Type" %}