ManageIQ/manageiq-ui-classic

View on GitHub
app/helpers/application_helper/button/reload.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::Reload < ApplicationHelper::Button::Basic
  include ApplicationHelper::Button::Mixins::XActiveTreeMixin

  def visible?
    return saved_report? if reports_tree?
    return root? if savedreports_tree?
    true
  end

  private

  def saved_report?
    @view_context.active_tab == 'saved_reports'
  end

  def root?
    @view_context.x_node == 'root'
  end
end