<commit_before><% content_for :admin_tab do %>
  <li id="new-repo"><%= link_to 'New Repository', 'wee' %></li>
<% end if admin? %>

<%= render :partial => "admin/tabs" %>

<% if admin? %>
  <% sheet_form_for @repository, {:trigger => 'new-repo'} do |s| %>
    <h2>Create a new repository</h2>
    <%= s.text_field 'Name:', :name %>
    <%= s.text_field 'Path:', :path %>
    <%= s.text_field 'Subdomain:', :subdomain %>
  <% end %>
<% end %>

<div id="repository-admin">
<ul id="repos">
<% @repositories.each do |repo| -%>
  <li class="repo" id="repo-<%= repo.id %>">
    <%=h repo.name %>
    <span class="log"><%= repo.path %></span>
    <% if admin? %>
      <% if repo.sync? %>
      <div class="need-sync" id="sync-<%= repo.id %>">
        <span id="percent-<%= repo.id %>" class="sync-percent">0%</span>
        
        The changesets <%= repo.revisions_to_sync.inspect.sub(/\.\./, '-') %> need to be synced.
        <img id="indicator-<%= repo.id %>" src="/images/app/progress.gif" style="display:none" />
        <% v = "importer#{repo.id}" %>
        <% content_for :javascript do %><commit_msg>Add actual progress for sync when admin ui loads<commit_after><% content_for :admin_tab do %>
  <li id="new-repo"><%= link_to 'New Repository', 'wee' %></li>
<% end if admin? %>

<%= render :partial => "admin/tabs" %>

<% if admin? %>
  <% sheet_form_for @repository, {:trigger => 'new-repo'} do |s| %>
    <h2>Create a new repository</h2>
    <%= s.text_field 'Name:', :name %>
    <%= s.text_field 'Path:', :path %>
    <%= s.text_field 'Subdomain:', :subdomain %>
  <% end %>
<% end %>

<div id="repository-admin">
<ul id="repos">
<% @repositories.each do |repo| -%>
  <li class="repo" id="repo-<%= repo.id %>">
    <%=h repo.name %>
    <span class="log"><%= repo.path %></span>
    <% if admin? %>
      <% if repo.sync? %>
      <div class="need-sync" id="sync-<%= repo.id %>">
        <span id="percent-<%= repo.id %>" class="sync-percent"><%= repo.sync_progress %>%</span>
        
        The changesets <%= repo.revisions_to_sync.inspect.sub(/\.\./, '-') %> need to be synced.
        <img id="indicator-<%= repo.id %>" src="/images/app/progress.gif" style="display:none" />
        <% v = "importer#{repo.id}" %>
        <% content_for :javascript do %>
{'fraction_non_alphanumeric': 0.24327897752313796, 'fraction_numerical': 0.0022036139268400176, 'mean_word_length': 3.1272727272727274, 'pattern_counts': {'":': 0, '<': 76, '<?xml version=': 0, '>': 80, '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': '6629986', 'n_tokens_mistral': 905, 'n_tokens_neox': 815, 'n_words': 182}