Skip to content

Commit

Permalink
Merge pull request #1589 from romanblanco/bz1454600
Browse files Browse the repository at this point in the history
Enabled 'Delete Saved Report' toolbar button
(cherry picked from commit af93bea)

https://bugzilla.redhat.com/show_bug.cgi?id=1478400
  • Loading branch information
mzazrivec authored and simaishi committed Aug 4, 2017
1 parent fd60ae8 commit bff7eb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/controllers/report_controller/saved_reports.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ def fetch_saved_report(id)
def saved_report_delete
assert_privileges("saved_report_delete")
savedreports = find_checked_items
unless savedreports.present?
report_result = x_node.split('_').last
savedreport = report_result.split('-').last
savedreports = Array.wrap(from_cid(savedreport))
end

if savedreports.empty? && params[:id].present? && !MiqReportResult.for_user(current_user).exists?(params[:id].to_i)
# saved report is being viewed in report accordion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ def visible?
private

def saved_report?
@view_context.active_tab == 'saved_reports'
%w(saved_reports report_info).include?(@view_context.active_tab)
end
end

0 comments on commit bff7eb1

Please sign in to comment.