ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::SummaryReload < ApplicationHelper::Button::ButtonWithoutRbacCheck
  def visible?
    @explorer && !monitoring_page? && ((@record && proper_layout? && proper_showtype?) || @lastaction == 'show_list')
  end

  private

  def proper_layout?
    @layout != 'miq_policy_rsop'
  end

  def monitoring_page?
    @lastaction == "show_timeline" || @sb[:action] == "chargeback" || @showtype == "performance"
  end

  def proper_showtype?
    !%w[details item].include?(@showtype)
  end
end