<commit_before>ActiveAdmin::Dashboards.build do
  
  section("Recent Articles", :if => proc {current_user.is_admin? || current_user.is_editor? }) do
    table_for Article.order("created_at DESC").limit(5) do
      column "Article Title", :title do |article|
        link_to article.title, [:admin, article]
      end
      column "Author", :author_name
      column "Date Created", :created_at
      column "Date Updated", :updated_at
    end
    strong { link_to "View All Articles", admin_articles_path }
    strong {'|'}
    strong { link_to "New Article", new_admin_article_path }
  end
  
  section("Users", :if => proc{ current_user.is_admin? }) do
    table_for User.order("created_at DESC").limit(5) do
      column "User", :email do |user|
        user.email
      end
      column "Department", :department
      column "Editor", :is_editor
    end
    strong { link_to "View All Users", admin_users_path }
    strong {'|'}
    strong { link_to "New User", new_admin_user_path }
  end
  

  # Define your dashboard sections here. Each block will be
  # rendered on the dashboard in the context of the view. So just
  # return the content which you would like to display.
  
  # == Simple Dashboard Section
  # Here is an example of a simple dashboard section
  #
  #   section "Recent Posts" do
  #     ul do
  #       Post.recent(5).collect do |post|<commit_msg>Link to user page from admin dashboard<commit_after>ActiveAdmin::Dashboards.build do
  
  section("Recent Articles", :if => proc {current_user.is_admin? || current_user.is_editor? }) do
    table_for Article.order("created_at DESC").limit(5) do
      column "Article Title", :title do |article|
        link_to article.title, [:admin, article]
      end
      column "Author", :author_name
      column "Date Created", :created_at
      column "Date Updated", :updated_at
    end
    strong { link_to "View All Articles", admin_articles_path }
    strong {'|'}
    strong { link_to "New Article", new_admin_article_path }
  end
  
  section("Users", :if => proc{ current_user.is_admin? }) do
    table_for User.order("created_at DESC").limit(5) do
      column "User", :email do |user|
        link_to user.email, [:admin, user]
      end
      column "Department", :department
      column "Editor", :is_editor
    end
    strong { link_to "View All Users", admin_users_path }
    strong {'|'}
    strong { link_to "New User", new_admin_user_path }
  end
  

  # Define your dashboard sections here. Each block will be
  # rendered on the dashboard in the context of the view. So just
  # return the content which you would like to display.
  
  # == Simple Dashboard Section
  # Here is an example of a simple dashboard section
  #
  #   section "Recent Posts" do
  #     ul do
  #       Post.recent(5).collect do |post|
{'fraction_non_alphanumeric': 0.10268336314847942, 'fraction_numerical': 0.002146690518783542, 'mean_word_length': 3.099706744868035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6576364', 'n_tokens_mistral': 872, 'n_tokens_neox': 841, 'n_words': 280}