Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Report errors details in Failed Tab.
Browse files Browse the repository at this point in the history
This allows easy indentification of what went wrong, instead of clicking
a few times to pull up the details.

Committer: Rick van der Zwet <[email protected]>
  • Loading branch information
Rick van der Zwet authored and sodabrew committed Jan 9, 2014
1 parent d798595 commit c255a3d
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
36 changes: 36 additions & 0 deletions app/views/nodes/_log_detail.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
- nodes = paginate_scope(local_assigns[:nodes])

- 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
5 changes: 5 additions & 0 deletions app/views/nodes/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@
%h3 Nodes
= render 'nodes', :nodes => @nodes, :selected_status => action_name
%br.clear
- if action_name == 'failed'
.section
%h3 Latest report errors
= render 'log_detail', :nodes => @nodes
%br.clear

0 comments on commit c255a3d

Please sign in to comment.