[PATCH conductor] BZ785006 Clicking pool and deployment links in list view, leads to appropriate list view

jtomasek at redhat.com jtomasek at redhat.com
Thu Feb 2 10:29:22 UTC 2012


From: Jiri Tomasek <jtomasek at redhat.com>

---
 src/app/views/deployments/_list.html.haml |    8 ++++----
 src/app/views/pools/_list.html.haml       |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/app/views/deployments/_list.html.haml b/src/app/views/deployments/_list.html.haml
index d2177ac..b66f8fc 100644
--- a/src/app/views/deployments/_list.html.haml
+++ b/src/app/views/deployments/_list.html.haml
@@ -31,12 +31,12 @@
       - selected = params[:select] == 'all'
       = check_box_tag "deployments_selected[]", deployment.id, selected, :id => "deployment_checkbox_#{deployment.id}"
     %td{:class => 'alert'}= deployment.failed_instances.present? ? image_tag("sb_icon_instance_failure.png") : ""
-    %td= link_to(deployment.name, deployment)
+    %td= link_to(deployment.name, deployment_path(deployment, :view => :filter))
     %td= deployment.created_at
     %td= deployment.deployable_xml.name
     %td= deployment.deployment_state
     %td{:class => 'center'}= deployment.instances.count
-    %td= link_to deployment.pool.name, pool_path(deployment.pool)
+    %td= link_to deployment.pool.name, pool_path(deployment.pool, :view => :filter)
     %td= owner_name(deployment)
     %td= link_to(deployment.provider.provider_type.name, deployment.provider) if deployment.provider
 :javascript
@@ -55,12 +55,12 @@
           #{image_tag("sb_icon_instance_failure.png")}
         {{/if}}
       </td>
-      <td><a href="#{deployment_path('replace_id').sub('replace_id', '${id}')}">${name}</a></td>
+      <td><a href="#{deployment_path('replace_id', :view => :filter).sub('replace_id', '${id}')}">${name}</a></td>
       <td>${created_at}</td>
       <td>${deployable_xml_name}</td>
       <td>${deployment_state}</td>
       <td class="center">${instances_count}</td>
-      <td><a href="#{pool_path('replace_id').sub('replace_id', '${pool.id}')}">${pool.name}</a></td>
+      <td><a href="#{pool_path('replace_id', :view => :filter).sub('replace_id', '${pool.id}')}">${pool.name}</a></td>
       <td>${owner}</td>
       <td>
         {{if provider}}
diff --git a/src/app/views/pools/_list.html.haml b/src/app/views/pools/_list.html.haml
index adc0304..8c53d35 100644
--- a/src/app/views/pools/_list.html.haml
+++ b/src/app/views/pools/_list.html.haml
@@ -27,7 +27,7 @@
     %td{:class => 'checkbox'}
       %input{:name => "pools_selected[]", :type => "checkbox", :value => pool.id, :id => "pool_checkbox_#{pool.id}" }
     %td{:class => 'alert'}= (@statistics[:instances_failed] & pool.instances).present? ? image_tag("sb_icon_instance_failure.png") : ""
-    %td= link_to(pool.name, pool)
+    %td= link_to(pool.name, pool_path(pool, :view => :filter))
     %td{:class => 'center'}= pool.deployments.count
     %td{:class => 'center'}= pool.statistics[:total_instances]
     %td{:class => 'center'}= pool.statistics[:instances_pending]
@@ -47,7 +47,7 @@
           #{image_tag("sb_icon_instance_failure.png")}
         {{/if}}
       </td>
-      <td><a href="#{pool_path('replace_id').sub('replace_id', '${id}')}">${name}</a></td>
+      <td><a href="#{pool_path('replace_id', :view => :filter).sub('replace_id', '${id}')}">${name}</a></td>
       <td class="center">${deployments_count}</td>
       <td class="center">${statistics.total_instances}</td>
       <td class="center">${statistics.instances_pending}</td>
-- 
1.7.7.6




More information about the aeolus-devel mailing list