<commit_before>
class DashboardController < ApplicationController

  protect_from_forgery except: :heartbeat

  def show
    gather
    @title = 'dashboard:' + partial(@group.id)
  end

  def heartbeat
    gather
    respond_to { |format| format.js }
  end

  def progress
    render json: { animals: animals_progress }
  end

  private

  include DashboardWorker<commit_msg>dashboard/show now redirects when id.size==10 (diff from dashboard traffic-light breaks)<commit_after>
class DashboardController < ApplicationController

  protect_from_forgery except: :heartbeat

  def show
    if id.size == 10
      redirect_to request.url.sub(id, porter.port(id))
    else
      gather
      @title = 'dashboard:' + partial(@group.id)
    end
  end

  def heartbeat
    gather
    respond_to { |format| format.js }
  end

  def progress
    render json: { animals: animals_progress }
  end

  private

  include DashboardWorker
{'fraction_non_alphanumeric': 0.0737527114967462, 'fraction_numerical': 0.004338394793926247, 'mean_word_length': 3.3130841121495327, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4725263', 'n_tokens_mistral': 283, 'n_tokens_neox': 270, 'n_words': 78}