+1.

I've opened #5024 for some quibbles I have about how the
_nodes.html.haml partial is used, but this patch is a good minimal fix
for the issue.

-- 
Jacob Helwig

On Fri, 01 Oct 2010 14:31:48 -0400, Nick Lewis wrote:
> Date: Fri,  1 Oct 2010 14:31:48 -0400
> From: Nick Lewis <[email protected]>
> To: [email protected]
> Subject: [Puppet-dev] [PATCH/puppet-dashboard 1/1] [#4601] Fixes table
>  rendering on group/class/node pages
> X-Mailer: git-send-email 1.7.3
> Message-Id: <[email protected]>
> 
> The node table on group/class pages now take into account the "source" column
> in the case when there are no nodes. The report table on node pages now omits
> the footer if there is no "more" link to put in it.
> 
> Signed-off-by: Nick Lewis <[email protected]>
> ---
>  app/views/nodes/_nodes.html.haml |    2 +-
>  app/views/nodes/show.html.haml   |   12 +++++-------
>  2 files changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/app/views/nodes/_nodes.html.haml 
> b/app/views/nodes/_nodes.html.haml
> index 9636314..fef62d5 100644
> --- a/app/views/nodes/_nodes.html.haml
> +++ b/app/views/nodes/_nodes.html.haml
> @@ -29,5 +29,5 @@
>              = node.last_report ? node.last_report.time : "Has not reported"
>        = pagination_for nodes, more_link
>      - else
> -      %td.empty{:colspan => 3}
> +      %td.empty{:colspan => container.nil? ? 3 : 4}
>          = describe_no_matches_for :nodes
> diff --git a/app/views/nodes/show.html.haml b/app/views/nodes/show.html.haml
> index 10bc3c0..388e39f 100644
> --- a/app/views/nodes/show.html.haml
> +++ b/app/views/nodes/show.html.haml
> @@ -47,14 +47,12 @@
>                  %td= report.total_resources
>                  %td= report.failed_resources
>                  %td= report.total_time
> -          %tfoot
> -            %tr
> -              %td{:colspan => @node ? 8 : 7}
> -                .actionbar
> -                  - if @node.reports.count > reports_limit
> +          - if @node.reports.count > reports_limit
> +            %tfoot
> +              %tr
> +                %td{:colspan => @node ? 8 : 7}
> +                  .actionbar
>                      = link_to "More &raquo;", reports_node_path(@node), 
> :class => 'button'
> -                  - else
> -                    &nbsp;
>  
>      .section
>        %h3 Dashboard activity
> -- 
> 1.7.3
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/puppet-dev?hl=en.
> 

Attachment: signature.asc
Description: Digital signature

Reply via email to