Signed-off-by: Jason Guiditta jason.guiditta@gmail.com --- src/app/controllers/instance_controller.rb | 2 ++ src/app/views/instance/show.html.erb | 21 +++++++++++++++++---- src/app/views/portal_pool/show.html.erb | 19 ++++++++++++++++--- src/public/stylesheets/dcloud.css | 2 +- 4 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/src/app/controllers/instance_controller.rb b/src/app/controllers/instance_controller.rb index 1ab1a5e..32d5e3f 100644 --- a/src/app/controllers/instance_controller.rb +++ b/src/app/controllers/instance_controller.rb @@ -4,6 +4,8 @@ class InstanceController < ApplicationController
def show @instances = Instance.find(:all, :conditions => {:portal_pool_id => params[:id]}) + @pool = PortalPool.find(params[:id]) + @provider = @pool.cloud_account.provider end
def new diff --git a/src/app/views/instance/show.html.erb b/src/app/views/instance/show.html.erb index f660595..1327ef5 100644 --- a/src/app/views/instance/show.html.erb +++ b/src/app/views/instance/show.html.erb @@ -1,8 +1,21 @@ <% if @instances.size == 0 %> <h1>There are no pools to display</h1> <% else %> - <%@instances.each {|instance| %> - <%= instance.name %><br/> - <% } %> + <table> + <thead> + <tr> + <th scope="col">Actions</th> + <th scope="col">Name</th> + </tr> + </thead> + <tbody> + <%@instances.each {|instance| %> + <tr> + <td></td> + <td><div><%= instance.name %></div></td> + </tr> + <% } %> + </tbody> + </table> <% end %> -<%= link_to "Add a new instance", :controller => "instance", :action => "new", :id => @pool, :provider => @provider%> +<%= link_to "Add a new instance", :controller => "instance", :action => "new", :id => @pool, :provider => @provider%> \ No newline at end of file diff --git a/src/app/views/portal_pool/show.html.erb b/src/app/views/portal_pool/show.html.erb index f660595..8dd06f5 100644 --- a/src/app/views/portal_pool/show.html.erb +++ b/src/app/views/portal_pool/show.html.erb @@ -1,8 +1,21 @@ <% if @instances.size == 0 %> <h1>There are no pools to display</h1> <% else %> - <%@instances.each {|instance| %> - <%= instance.name %><br/> - <% } %> + <table> + <thead> + <tr> + <th scope="col">Actions</th> + <th scope="col">Name</th> + </tr> + </thead> + <tbody> + <%@instances.each {|instance| %> + <tr> + <td></td> + <td><div><%= instance.name %></div></td> + </tr> + <% } %> + </tbody> + </table> <% end %> <%= link_to "Add a new instance", :controller => "instance", :action => "new", :id => @pool, :provider => @provider%> diff --git a/src/public/stylesheets/dcloud.css b/src/public/stylesheets/dcloud.css index 0267815..143feec 100644 --- a/src/public/stylesheets/dcloud.css +++ b/src/public/stylesheets/dcloud.css @@ -138,7 +138,7 @@ input, select { text-align:left; font-size: 14px; line-height: 18px; - +}
#content_area table th { background: none;
deltacloud-devel@lists.fedorahosted.org