<commit_before>ActiveAdmin.register_page "Dashboard" do

  menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") }

  content :title => proc{ I18n.t("active_admin.dashboard") } do
    columns do
      column do
        panel "Statistics" do
          para " There are #{Place.count} places: #{Depot.count} depots, #{Farm.count} farms"
        end
      end
      column do
        panel "Most recent Farm activity" do
          ul do
            Farm.find(:all, order: "updated_at desc", limit: 10).map do |farm|
              li link_to(farm.name, admin_farm_path(farm))
            end
          end
        end
      end
      column do
        panel "Most recent Depot activity" do
          ul do
            Depot.find(:all, order: "updated_at desc", limit: 10).map do |depot|
              li link_to(depot.name, admin_depot_path(depot))
            end
          end
        end
      end
    end
  end
end<commit_msg>Add version info to backend.<commit_after>ActiveAdmin.register_page "Dashboard" do

  menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") }

  content :title => proc{ I18n.t("active_admin.dashboard") } do
    panel "Teikei" do
      para "version #{`git describe --tags --abbrev=0`}"
    end
    columns do
      column do
        panel "Statistics" do
          para " There are #{Place.count} places: #{Depot.count} depots, #{Farm.count} farms"
        end
      end
      column do
        panel "Most recent Farm activity" do
          ul do
            Farm.find(:all, order: "updated_at desc", limit: 10).map do |farm|
              li link_to(farm.name, admin_farm_path(farm))
            end
          end
        end
      end
      column do
        panel "Most recent Depot activity" do
          ul do
            Depot.find(:all, order: "updated_at desc", limit: 10).map do |depot|
              li link_to(depot.name, admin_depot_path(depot))
            end
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10020140986908359, 'fraction_numerical': 0.009566968781470292, 'mean_word_length': 1.8631123919308357, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4785646', 'n_tokens_mistral': 622, 'n_tokens_neox': 610, 'n_words': 183}