Commit e260daf447159c51df9bbbab203937d2ecb90aa7
1 parent
b8cd5720
Exists in
master
and in
1 other branch
Applying config.confirm_resolve_err option to errs list.
Showing
3 changed files
with
6 additions
and
3 deletions
Show diff stats
app/helpers/errs_helper.rb
@@ -3,5 +3,8 @@ module ErrsHelper | @@ -3,5 +3,8 @@ module ErrsHelper | ||
3 | def last_notice_at err | 3 | def last_notice_at err |
4 | err.last_notice_at || err.created_at | 4 | err.last_notice_at || err.created_at |
5 | end | 5 | end |
6 | - | 6 | + |
7 | + def err_confirm | ||
8 | + Errbit::Config.confirm_resolve_err === false ? nil : 'Seriously?' | ||
9 | + end | ||
7 | end | 10 | end |
8 | \ No newline at end of file | 11 | \ No newline at end of file |
app/views/errs/_table.html.haml
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | %td.latest #{time_ago_in_words(last_notice_at err)} ago | 19 | %td.latest #{time_ago_in_words(last_notice_at err)} ago |
20 | %td.deploy= err.app.last_deploy_at ? err.app.last_deploy_at.to_s(:micro) : 'n/a' | 20 | %td.deploy= err.app.last_deploy_at ? err.app.last_deploy_at.to_s(:micro) : 'n/a' |
21 | %td.count= link_to err.notices.count, app_err_path(err.app, err) | 21 | %td.count= link_to err.notices.count, app_err_path(err.app, err) |
22 | - %td.resolve= link_to image_tag("thumbs-up.png"), resolve_app_err_path(err.app, err), :title => "Resolve", :method => :put, :confirm => 'Seriously?', :class => 'resolve' if err.unresolved? | 22 | + %td.resolve= link_to image_tag("thumbs-up.png"), resolve_app_err_path(err.app, err), :title => "Resolve", :method => :put, :confirm => err_confirm, :class => 'resolve' if err.unresolved? |
23 | - if errs.none? | 23 | - if errs.none? |
24 | %tr | 24 | %tr |
25 | %td{:colspan => (@app ? 5 : 6)} | 25 | %td{:colspan => (@app ? 5 : 6)} |
app/views/errs/show.html.haml
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | %strong Last Notice: | 8 | %strong Last Notice: |
9 | = last_notice_at(@err).to_s(:micro) | 9 | = last_notice_at(@err).to_s(:micro) |
10 | - content_for :action_bar do | 10 | - content_for :action_bar do |
11 | - %span= link_to 'resolve', resolve_app_err_path(@app, @err), :method => :put, :confirm => (Errbit::Config.confirm_resolve_err === false ? nil : 'Seriously?'), :class => 'resolve' if @err.unresolved? | 11 | + %span= link_to 'resolve', resolve_app_err_path(@app, @err), :method => :put, :confirm => err_confirm, :class => 'resolve' if @err.unresolved? |
12 | 12 | ||
13 | %h4= @notice.try(:message) | 13 | %h4= @notice.try(:message) |
14 | 14 |