<commit_before>#miner
  %h2= @miner.host + ':' + @miner.port.to_s

  #tabs
    %ul
      %li= link_to 'Summary', '#miner-summary'
      %li= link_to 'Devices', '#devices'
      %li= link_to 'Pools',   '#pools'
      %li= link_to 'Stats',   '#stats'

    #miner-summary
      %ul
        %li= link_to "Overview", '#overview'
        %li= link_to "Coin", '#coin'

      %table(cellpadding="0" cellspacing="0" id="overview")
        - @miner.summary.each_pair do |key, value|
          %tr
            %td= key
            %td= value

      %table(cellpadding="0" cellspacing="0" id="coin")
        - @miner.coin.each_pair do |key, value|
          %tr
            %td= key
            %td= value
  
    #devices
      - devices = @miner.devs
      %ul
        - devices.each_with_index do |device, index|
          - if asc = device.delete(:asc)
            %li= link_to 'ASC ' + asc.to_s, '#device-' + index.to_s
          - elsif pga = device.delete(:pga)
            %li= link_to 'PGA ' + pga.to_s, '#device-' + index.to_s

      - devices.each_with_index do |device, index|
        %table(cellpadding="0" cellspacing="0" id="device-#{index.to_s}")
          - device.each_pair do |key, value|
            %tr
              %td= key
              %td= value

    #pools
      - pools = @miner.pools
      %ul
        - pools.each_with_index do |pool, index|
          - if id = pool.delete(:pool)
            %li= link_to 'Pool ' + id.to_s, '#pool-' + index.to_s

      - pools.each_with_index do |pool, index|
        %table(cellpadding="0" cellspacing="0" id="pool-#{index.to_s}")
          - pool.each_pair do |key, value|
            %tr
              %td= key
              %td= value

    #stats
      - stats = @miner.stats
      %ul
        - stats.each_with_index do |stat, index|
          - stat.delete(:stats)
          - id = stat.delete(:id)
          %li= link_to id, '#stat-' + index.to_s

      - stats.each_with_index do |stat, index|
        %table(cellpadding="0" cellspacing="0" id="stat-#{index.to_s}")
          - stat.each_pair do |key, value|
            %tr
              %td= key
              %td= value

:javascript
  $(function() {
    $('#tabs').tabs();
    $('#miner-summary').tabs();
    $('#stats').tabs();
    $('#pools').tabs();
    $('#devices').tabs();
  });<commit_msg>adding version string<commit_after>- version = @miner.version

#miner
  %h2
    = @miner.host + ':' + @miner.port.to_s
  %h4 Version: cgminer #{version[:cgminer]} (API #{version[:api]})

  #tabs
    %ul
      %li= link_to 'Summary', '#miner-summary'
      %li= link_to 'Devices', '#devices'
      %li= link_to 'Pools',   '#pools'
      %li= link_to 'Stats',   '#stats'
      %li= link_to 'Config',   '#config'

    #miner-summary
      %ul
        %li= link_to "Overview", '#overview'
        %li= link_to "Coin", '#coin'

      %table(cellpadding="0" cellspacing="0" id="overview")
        - @miner.summary.each_pair do |key, value|
          %tr
            %td= key
            %td= value

      %table(cellpadding="0" cellspacing="0" id="coin")
        - @miner.coin.each_pair do |key, value|
          %tr
            %td= key
            %td= value
  
    #devices
      - devices = @miner.devs
      %ul
        - devices.each_with_index do |device, index|
          - if asc = device.delete(:asc)
            %li= link_to 'ASC ' + asc.to_s, '#device-' + index.to_s
          - elsif pga = device.delete(:pga)
            %li= link_to 'PGA ' + pga.to_s, '#device-' + index.to_s

      - devices.each_with_index do |device, index|
        %table(cellpadding="0" cellspacing="0" id="device-#{index.to_s}")
          - device.each_pair do |key, value|
            %tr
              %td= key
              %td= value

    #pools
      - pools = @miner.pools
      %ul
        - pools.each_with_index do |pool, index|
          - if id = pool.delete(:pool)
            %li= link_to 'Pool ' + id.to_s, '#pool-' + index.to_s

      - pools.each_with_index do |pool, index|
        %table(cellpadding="0" cellspacing="0" id="pool-#{index.to_s}")
          - pool.each_pair do |key, value|
            %tr
              %td= key
              %td= value

    #stats
      - stats = @miner.stats
      %ul
        - stats.each_with_index do |stat, index|
          - stat.delete(:stats)
          - id = stat.delete(:id)
          %li= link_to id, '#stat-' + index.to_s

      - stats.each_with_index do |stat, index|
        %table(cellpadding="0" cellspacing="0" id="stat-#{index.to_s}")
          - stat.each_pair do |key, value|
            %tr
              %td= key
              %td= value

    #config
      - config = @miner.config

      %table(cellpadding="0" cellspacing="0")
        - config.each_pair do |key, value|
          %tr
            %td= key
            %td= value

:javascript
  $(function() {
    $('#tabs').tabs();
    $('#miner-summary').tabs();
    $('#stats').tabs();
    $('#pools').tabs();
    $('#devices').tabs();
  });
{'fraction_non_alphanumeric': 0.16535591853196208, 'fraction_numerical': 0.00504133897963299, 'mean_word_length': 1.7833894500561167, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '646052', 'n_tokens_mistral': 1744, 'n_tokens_neox': 1720, 'n_words': 369}