Blob Blame History Raw
From c61f0d21383fb2041e35c5e3d1b0f11627ab599d Mon Sep 17 00:00:00 2001
From: Ana Krivokapic <akrivoka@redhat.com>
Date: Wed, 3 Sep 2014 12:09:02 +0200
Subject: [PATCH] Add dropdown actions to all details pages

Partially implements: blueprint detail-pages-ia

Change-Id: Ic09385d19b417b256cbc51d044d66ecbb54c7d52

Conflicts:
	openstack_dashboard/dashboards/admin/networks/views.py
---
 openstack_dashboard/dashboards/admin/networks/tests.py          | 7 +++++++
 openstack_dashboard/dashboards/project/stacks/views.py          | 4 ++++
 openstack_dashboard/dashboards/project/volumes/volumes/views.py | 6 +++---
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/openstack_dashboard/dashboards/admin/networks/tests.py b/openstack_dashboard/dashboards/admin/networks/tests.py
index 764a070..e233302 100644
--- a/openstack_dashboard/dashboards/admin/networks/tests.py
+++ b/openstack_dashboard/dashboards/admin/networks/tests.py
@@ -191,12 +191,19 @@ class NetworkTests(test.BaseAdminViewTests):
         api.neutron.is_extension_supported(IsA(http.HttpRequest),
                                            'mac-learning')\
             .AndReturn(mac_learning)
+<<<<<<< HEAD
         api.neutron.is_extension_supported(
             IsA(http.HttpRequest),
             'dhcp_agent_scheduler').AndReturn(True)
         api.neutron.is_extension_supported(
             IsA(http.HttpRequest),
             'dhcp_agent_scheduler').AndReturn(True)
+=======
+        api.neutron.is_extension_supported(IsA(http.HttpRequest),
+                'dhcp_agent_scheduler').AndReturn(True)
+        api.neutron.is_extension_supported(IsA(http.HttpRequest),
+                'dhcp_agent_scheduler').AndReturn(True)
+>>>>>>> dc6b1ce... Add dropdown actions to all details pages
 
         self.mox.ReplayAll()
 
diff --git a/openstack_dashboard/dashboards/project/stacks/views.py b/openstack_dashboard/dashboards/project/stacks/views.py
index dc34564..87a86a3 100644
--- a/openstack_dashboard/dashboards/project/stacks/views.py
+++ b/openstack_dashboard/dashboards/project/stacks/views.py
@@ -308,6 +308,10 @@ class DetailView(tabs.TabView):
     def get_redirect_url():
         return reverse('horizon:project:stacks:index')
 
+    @staticmethod
+    def get_redirect_url():
+        return reverse('horizon:project:stacks:index')
+
 
 class ResourceView(tabs.TabView):
     tab_group_class = project_tabs.ResourceDetailTabs
diff --git a/openstack_dashboard/dashboards/project/volumes/volumes/views.py b/openstack_dashboard/dashboards/project/volumes/volumes/views.py
index f59beac..b5bd7fc 100644
--- a/openstack_dashboard/dashboards/project/volumes/volumes/views.py
+++ b/openstack_dashboard/dashboards/project/volumes/volumes/views.py
@@ -46,10 +46,10 @@ class DetailView(tabs.TabView):
     page_title = _("Volume Details: {{ volume.name }}")
 
     def get_context_data(self, **kwargs):
-        datum = self.get_data()
-        table = project_tables.VolumesTable(self.request)
         context = super(DetailView, self).get_context_data(**kwargs)
-        context["volume"] = datum
+        volume = self.get_data()
+        table = project_tables.VolumesTable(self.request)
+        context["volume"] = volume
         context["url"] = self.get_redirect_url()
         context["actions"] = table.render_row_actions(volume)
         return context