Signed-off-by: Jesse Wolfe <[email protected]>
---
Local-branch: ticket/next/5174-part2
app/models/report.rb | 4 ++++
app/views/reports/_report.html.haml | 5 +++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/app/models/report.rb b/app/models/report.rb
index 7c3b77e..953b296 100644
--- a/app/models/report.rb
+++ b/app/models/report.rb
@@ -121,6 +121,10 @@ class Report < ActiveRecord::Base
end
end
+ def long_name
+ "#{node.name} at #{time}"
+ end
+
def baseline?
self.node.baseline_report == self
end
diff --git a/app/views/reports/_report.html.haml
b/app/views/reports/_report.html.haml
index 665515c..0c57f5a 100644
--- a/app/views/reports/_report.html.haml
+++ b/app/views/reports/_report.html.haml
@@ -13,6 +13,11 @@
%li= link_to 'Destroy', report, :confirm => 'Are you sure?', :method =>
:delete, :class => "delete button"
.item
+ - if report.kind == "inspect"
+ .section
+ %h3= "Compare with baseline:"
+ - form_tag({:id => report, :action => "diff_summary"}, :method => :get)
do
+ %p= select_tag( "baseline_id", options_from_collection_for_select(
Report.baselines, :id, :long_name ) ) + submit_tag("compare")
- if report.resource_statuses.present?
.section
%h3 Events
--
1.7.0.4
--
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.