<commit_before>class ApplicationHelper::Button::VmInstanceScan < ApplicationHelper::Button::Basic
  needs_record

  def calculate_properties
    super
    if disabled?
      self[:title] = if !@record.supports_smartstate_analysis?
                       @record.unsupported_reason(:smartstate_analysis)
                     else
                       @record.active_proxy_error_message
                     end
    end
  end

  def visible?
    return true if @display == "instances"
    (@record.supports_smartstate_analysis? || @record.unsupported_reason(:smartstate_analysis)) &&
     @record.has_proxy?
  end

  def disabled?
    return false if @display == "instances"
    !(@record.supports_smartstate_analysis? && @record.has_active_proxy?)
  end
end<commit_msg>fix checking for reason instead of `supports_ssa?` (transferred from ManageIQ/manageiq@<PASSWORD>)<commit_after>class ApplicationHelper::Button::VmInstanceScan < ApplicationHelper::Button::Basic
  needs_record

  def calculate_properties
    super
    if disabled?
      self[:title] = if !@record.supports_smartstate_analysis?
                       @record.unsupported_reason(:smartstate_analysis)
                     else
                       @record.active_proxy_error_message
                     end
    end
  end

  def visible?
    return true if @display == "instances"
    @record.supports_smartstate_analysis? && @record.has_proxy?
  end

  def disabled?
    return false if @display == "instances"
    !(@record.supports_smartstate_analysis? && @record.has_active_proxy?)
  end
end
{'fraction_non_alphanumeric': 0.08684546615581099, 'fraction_numerical': 0.0, 'mean_word_length': 2.927318295739348, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7657053', 'n_tokens_mistral': 441, 'n_tokens_neox': 424, 'n_words': 87}