app/presenters/hyrax/fixity_status_presenter.rb
# Returns a html_safe string communicating fixity status checks,
# possibly on multiple files/versions.
Returns a html_safe string communicating fixity status checks,
possibly on multiple files/versions.
Returns a html_safe string communicating fixity status checks possibly on multiple files / versions .
def render_file_set_status
      log_path = "/usr/local/rails/vault/log/fixity/#{@file_set.last_fixity_check}.log"
      @file_set_status ||=
          if @file_set.last_fixity_check.present? and File.read(log_path).include?(@file_set_id)
            content_tag("span", "FAILED", class: "label label-danger") + ' ' + "on #{humanize_datetime(@file_set.last_fixity_check)}"
          elsif @file_set.last_fixity_check.present?
            content_tag("span", "passed", class: "label label-success") + ' ' + "on #{humanize_datetime(@file_set.last_fixity_check)}"
          else
            "Fixity checks have not yet been run on this object"
          end
    end
def render_file_set_status log_path = "/usr/local/rails/vault/log/fixity/#{@file_set.last_fixity_check}.log" @file_set_status ||= if @file_set . last_fixity_check . present? and File . read ( log_path ) . include? ( @file_set_id ) content_tag ( "span" , "FAILED" , class : "label label-danger" ) + ' ' + "on #{humanize_datetime(@file_set.last_fixity_check)}" elsif @file_set . last_fixity_check . present? content_tag ( "span" , "passed" , class : "label label-success" ) + ' ' + "on #{humanize_datetime(@file_set.last_fixity_check)}" else "Fixity checks have not yet been run on this object" end end
Returns a html_safe string communicating fixity status checks,
possibly on multiple files/versions.
Returns a html_safe string communicating fixity status checks possibly on multiple files / versions .
# Check logs for file set id