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

  def skip?
    return false if @record.kind_of?(OrchestrationStack) && @display == "instances"
    !(@record.is_available?(:smartstate_analysis) ||
      @record.is_available_now_error_message(:smartstate_analysis)) ||
    !@record.has_proxy?
  end

  def disable?
    if !@record.is_available?(:smartstate_analysis)
      return @record.is_available_now_error_message(:smartstate_analysis)
    elsif !@record.has_active_proxy?
      return @record.active_proxy_error_message
    end
  end
end
<commit_msg>Fixed issue with scan button on instance pages<commit_after>class ApplicationHelper::Button::VmInstanceScan < ApplicationHelper::Button::Basic
  needs_record

  def skip?
    return false if @display == "instances"
    !(@record.is_available?(:smartstate_analysis) ||
      @record.is_available_now_error_message(:smartstate_analysis)) ||
    !@record.has_proxy?
  end

  def disable?
    if !@record.is_available?(:smartstate_analysis)
      return @record.is_available_now_error_message(:smartstate_analysis)
    elsif !@record.has_active_proxy?
      return @record.active_proxy_error_message
    end
  end
end

{'fraction_non_alphanumeric': 0.10121457489878542, 'fraction_numerical': 0.0, 'mean_word_length': 5.274111675126903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2272583', 'n_tokens_mistral': 379, 'n_tokens_neox': 376, 'n_words': 64}