Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Details report errors inside Failed tab. #176

Closed
wants to merge 1 commit into from

2 participants

@optiver-ams-operations

This allows easy indentification of what went wrong, instead of clicking
a few times to pull up the details.

Committer: Rick van der Zwet rickvanderzwet@optiver.com

Rick van der Zwet Report errors details in Failed Tab.
This allows easy indentification of what went wrong, instead of clicking
a few times to pull up the details.

Committer: Rick van der Zwet <rickvanderzwet@optiver.com>
7018b9f
@sodabrew
Owner

Interesting! Could you attach a cropped screen shot of how this looks in use?

@sodabrew
Owner

Ping @optiver-ams-operations would you mind helping to "sell" this feature with a small screenshot of it in action?

@ghost

tothegithub
If im not mistaken, Rick means the added field at the bottom of the image.

Signed,
His colleague :)

@sodabrew sodabrew commented on the diff
app/views/nodes/_log_detail.html.haml
@@ -0,0 +1,36 @@
+- nodes = paginate_scope(local_assigns[:nodes])
@sodabrew Owner

I don't think you need local_assigns here -- nodes = paginate_scope(nodes) should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sodabrew sodabrew commented on the diff
app/views/nodes/index.html.haml
@@ -18,3 +18,7 @@
.section
%h3 Nodes
= render 'nodes', :nodes => @nodes, :selected_status => action_name
+ - if action_name == 'failed'
@sodabrew Owner

Should it only be the failed nodes display that gets this? The general nodes overview might benefit from a quick view of failures as well. (But I'm not sure.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sodabrew
Owner

Please rebase your branch off rails3 and open a new PR for consideration in the next Dashboard major. You may also need a CLA with Puppet Labs before I can merge the PR.

@sodabrew
Owner

Also, the new file _log_detail.html.haml is very similar to app/views/reports/_log.html.haml -- only Hostname is added as a column -- could you take a look at merging up these templates instead of duplicating?

@sodabrew
Owner

Merged as c255a3d

@sodabrew sodabrew closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 15, 2013
  1. Report errors details in Failed Tab.

    Rick van der Zwet authored
    This allows easy indentification of what went wrong, instead of clicking
    a few times to pull up the details.
    
    Committer: Rick van der Zwet <rickvanderzwet@optiver.com>
This page is out of date. Refresh to see the latest.
View
36 app/views/nodes/_log_detail.html.haml
@@ -0,0 +1,36 @@
+- nodes = paginate_scope(local_assigns[:nodes])
@sodabrew Owner

I don't think you need local_assigns here -- nodes = paginate_scope(nodes) should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
+- unless nodes.empty?
+ %table.inspector
+ %thead
+ %tr
+ %th{:scope => :col} Hostname
+ %th{:scope => :col} Level
+ %th{:scope => :col} Message
+ %th{:scope => :col} Source
+ %th{:scope => :col} File
+ %th{:scope => :col} Line
+ %th{:scope => :col} Time
+ %tbody
+ - nodes.each do |node|
+ - if node.last_apply_report.logs.present?
+ - node.last_apply_report.logs.each do |log|
+ - if (log.level == 'err')
+ %tr.puppet_log
+ %td.node
+ = link_to h(node.name), node
+ %td.loglevel
+ = log.level
+ %td
+ = log.message
+ %td
+ = log.source
+ %td
+ = log.file
+ %td
+ = log.line
+ %td.nowrap
+ = link_to h(node.last_apply_report.time), node.last_apply_report
+- else
+ %p
+ = describe_no_matches_for :nodes
View
4 app/views/nodes/index.html.haml
@@ -18,3 +18,7 @@
.section
%h3 Nodes
= render 'nodes', :nodes => @nodes, :selected_status => action_name
+ - if action_name == 'failed'
@sodabrew Owner

Should it only be the failed nodes display that gets this? The general nodes overview might benefit from a quick view of failures as well. (But I'm not sure.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ .section
+ %h3 Latest report errors
+ = render 'log_detail', :nodes => @nodes
Something went wrong with that request. Please try again.