<commit_before>- if is_multi_command?
  #manager_results
    %ul
      - @results.each_with_index do |miner_results, index|
        %li= link_to "Miner #{index}", "#miner-#{index}"

    - @results.each_with_index do |miner_results, miner_results_index|
      %div(id="miner-#{miner_results_index}" class="miner")
        %ul
          - miner_results.each_pair do |key, results|
            - next if key == :id
            - results = results.first[key] if results.respond_to?(:first)
            - next unless results
            %li= link_to key.to_s, "#result-#{key.to_s}"

        - miner_results.each_pair do |key, results|
          - next if key == :id
          - results = results.first[key] if results.respond_to?(:first)
          - next unless results

          %div(id="result-#{key.to_s}" class="miner")
            - if results.is_a?(Array)
              %ul
                - results.each_with_index do |result, index|
                  %li= link_to "Result #{index}", "#result-#{key.to_s}-#{index}"

            = render partial: 'shared/run/results_table', locals: { results: results, key: key.to_s } if results

- else
  #manager_results
    %ul
      - @results.each_with_index do |miner_results, index|
        %li= link_to "Miner #{index}", "#miner-#{index}"

    - @results.each_with_index do |miner_results, index|
      - miner = @miner_pool.miners[index]
      - next unless miner

      %div(id="miner-#{index}" class="miner")
        %h3 Miner #{miner.host + ':' + miner.port.to_s}

        %ul
          - miner_results.each_with_index do |miner_result, miner_result_index|
            %li= link_to 'Result ' + miner_result_index.to_s, "#result-#{miner_result_index}"
  
        - miner_results.each_with_index do |miner_result, miner_result_index|
          %div(id="result-#{miner_result_index}" class="result")
            %h3 Result #{miner_result_index}
            - if miner_result.is_a?(Array)
              - miner_result.each_with_index do |result, index|
                - if result.is_a?(Hash)
                  %table(cellpadding="0" cellspacing="0" id="run-results")
                    - result.each_pair do |key, value|
                      %tr
                        %td= key
                        %td= value
                - else
                  = miner_result
            - elsif miner_result.is_a?(Hash)
              %table(cellpadding="0" cellspacing="0" id="run-results")
                - miner_result.each_pair do |key, value|<commit_msg>handling offline miners in manager query<commit_after>- if is_multi_command?
  #manager_results
    %ul
      - @results.each_with_index do |miner_results, index|
        %li= link_to "Miner #{index}", "#miner-#{index}"

    - @results.each_with_index do |miner_results, miner_results_index|
      %div(id="miner-#{miner_results_index}" class="miner")
        %ul
          - miner_results.each_pair do |key, results|
            - next if key == :id
            - results = results.first[key] if results.respond_to?(:first)
            - next unless results
            %li= link_to key.to_s, "#result-#{key.to_s}"

        - miner_results.each_pair do |key, results|
          - next if key == :id
          - results = results.first[key] if results.respond_to?(:first)
          - next unless results

          %div(id="result-#{key.to_s}" class="miner")
            - if results.is_a?(Array)
              %ul
                - results.each_with_index do |result, index|
                  %li= link_to "Result #{index}", "#result-#{key.to_s}-#{index}"

            = render partial: 'shared/run/results_table', locals: { results: results, key: key.to_s } if results

- else
  #manager_results
    %ul
      - @results.each_with_index do |miner_results, index|
        %li= link_to "Miner #{index}", "#miner-#{index}"

    - @results.each_with_index do |miner_results, index|
      - miner = @miner_pool.miners[index]
      - next unless miner && miner_results

      %div(id="miner-#{index}" class="miner")
        %h3 Miner #{miner.host + ':' + miner.port.to_s}

        %ul
          - miner_results.each_with_index do |miner_result, miner_result_index|
            %li= link_to 'Result ' + miner_result_index.to_s, "#result-#{miner_result_index}"
  
        - miner_results.each_with_index do |miner_result, miner_result_index|
          %div(id="result-#{miner_result_index}" class="result")
            %h3 Result #{miner_result_index}
            - if miner_result.is_a?(Array)
              - miner_result.each_with_index do |result, index|
                - if result.is_a?(Hash)
                  %table(cellpadding="0" cellspacing="0" id="run-results")
                    - result.each_pair do |key, value|
                      %tr
                        %td= key
                        %td= value
                - else
                  = miner_result
            - elsif miner_result.is_a?(Hash)
              %table(cellpadding="0" cellspacing="0" id="run-results")
                - miner_result.each_pair do |key, value|
{'fraction_non_alphanumeric': 0.12960760998810938, 'fraction_numerical': 0.0023781212841854932, 'mean_word_length': 2.0294117647058822, 'pattern_counts': {'":': 0, '<': 3, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5706065', 'n_tokens_mistral': 1607, 'n_tokens_neox': 1623, 'n_words': 317}