<commit_before>%table.zebra-striped
  %thead
    %tr
      %th.model-name= t "admin.dashboard.model_name"
      %th.last-used= t "admin.dashboard.last_used"
      %th.records= t "admin.dashboard.records"
      %th.controls
  %tbody
    - @abstract_models.each do |abstract_model|
      - if authorized? :list, abstract_model
        - list_path = list_path(:model_name => abstract_model.to_param)
        - row_class = "#{cycle("odd", "even")}#{" link" if list_path}"

        %tr{:class => row_class, :"data-link" => list_path}
          %td
            %span.show= link_to RailsAdmin.config(abstract_model).label, list_path
          %td
            - if (last_used = @most_recent_changes[abstract_model.pretty_name])
              = time_ago_in_words last_used
              = t "admin.dashboard.ago"
          %td
            - percent = (@max < 2.0 ? 0.0 : ((Math.log(@count[abstract_model.pretty_name]) * 100.0) / Math.log(@max)))
            .label.animate-width-to{:class => get_indicator(percent), :'data-animate-length' => ([1.0, percent].max.to_i * 20), :'data-animate-width-to' => "#{[2.0, percent].max.to_i}%", :style => "width:2%"}= @count[abstract_model.pretty_name]
          %td
            - if authorized? :new, abstract_model
              = link_to t("admin.dashboard.add_new"), new_path(:model_name => abstract_model.to_param)
            - if authorized? :see_history, abstract_model
              - history_path = history_model_path(:model_name => abstract_model.to_param)
              = link_to t("admin.history.name"), history_path
- if authorized? :see_history
  #block-tables.block
    .content
      %h2.title= t("admin.history.name")
      .inner
        #timeline
        #listingHistory
          = render(:partial => 'history', :locals => {:month => Time.now.month, :year => Time.now.year, :history => @history})
        = javascript_tag do
          :plain<commit_msg>try to fix weird tests failure on rubies 1.87 on Travis (Out of range for log(0) ?)<commit_after>%table.zebra-striped
  %thead
    %tr
      %th.model-name= t "admin.dashboard.model_name"
      %th.last-used= t "admin.dashboard.last_used"
      %th.records= t "admin.dashboard.records"
      %th.controls
  %tbody
    - @abstract_models.each do |abstract_model|
      - if authorized? :list, abstract_model
        - list_path = list_path(:model_name => abstract_model.to_param)
        - row_class = "#{cycle("odd", "even")}#{" link" if list_path}"

        %tr{:class => row_class, :"data-link" => list_path}
          %td
            %span.show= link_to RailsAdmin.config(abstract_model).label, list_path
          %td
            - if (last_used = @most_recent_changes[abstract_model.pretty_name])
              = time_ago_in_words last_used
              = t "admin.dashboard.ago"
          %td
            - count = @count[abstract_model.pretty_name]
            - percent = count > 0 ? (@max < 2.0 ? count : ((Math.log(count) * 100.0) / Math.log(@max))) : -1
            .label.animate-width-to{:class => get_indicator(percent), :'data-animate-length' => ([1.0, percent].max.to_i * 20), :'data-animate-width-to' => "#{[2.0, percent].max.to_i}%", :style => "width:2%"}= @count[abstract_model.pretty_name]
          %td
            - if authorized? :new, abstract_model
              = link_to t("admin.dashboard.add_new"), new_path(:model_name => abstract_model.to_param)
            - if authorized? :see_history, abstract_model
              - history_path = history_model_path(:model_name => abstract_model.to_param)
              = link_to t("admin.history.name"), history_path
- if authorized? :see_history
  #block-tables.block
    .content
      %h2.title= t("admin.history.name")
      .inner
        #timeline
        #listingHistory
          = render(:partial => 'history', :locals => {:month => Time.now.month, :year => Time.now.year, :history => @history})
        = javascript_tag do
          :plain
{'fraction_non_alphanumeric': 0.14963038490950803, 'fraction_numerical': 0.009176650522559266, 'mean_word_length': 2.551131221719457, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '3098395', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1262, 'n_words': 236}