<div class="row">
  <div class="col-md-6">
    <h1><%= link_to(@domain.name, "http://#{@domain.name}", target: '_blank') %></h1>
    <h2>Traffic Rank: <span class="theme-color"><%= number_with_delimiter(@domain.last_rank.traffic_rank, delimiter: ',') %></span></h2>
    <%= form_tag(domains_path, method: 'post', class: 'form-horizontal', turboboost: true) do %>
        <%= hidden_field_tag('domain[name]', @domain.name) %>
        <span class="input-group-btn"> <%= submit_tag 'Update', class: 'btn btn-primary' %></span>
    <% end %>
  </div>
  <div class="col-md-6">
    <h2>Historical Chart</h2>
    <%= line_chart(@data, @options) %>
  </div>
</div>
<h3>Data from all time</h3>
<table class="table table-striped">
  <tr>
    <th>Traffic Rank</th>
    <th>Logged</th>
  </tr>
  <% @domain.ranks.each do |rank| %>
    <tr>
      <td><%= rank.traffic_rank %></td>
      <td><%= "#{time_ago_in_words(rank.created_at)} ago" %></td>
    </tr>
  <% end %>
</table>
<div class="row">
  <div class="col-md-6">
    <h1><%= link_to(@domain.name, "http://#{@domain.name}", target: '_blank') %></h1>
    <h2>Traffic Rank: <span class="theme-color"><%= number_with_delimiter(@domain.last_rank.traffic_rank, delimiter: ',') %></span></h2>
    <%= form_tag(domains_path, method: 'post', class: 'form-horizontal', turboboost: true) do %>
        <%= hidden_field_tag('domain[name]', @domain.name) %>
        <span class="input-group-btn"> <%= submit_tag 'Update', class: 'btn btn-primary' %></span>
    <% end %>
  </div>
  <div class="col-md-6">
    <h2>Historical Chart</h2>
    <%= line_chart(@data, @options) %>
  </div>
</div>
<h3>Data from all time</h3>
<table class="table table-striped">
  <tr>
    <th>Traffic Rank</th>
    <th>Logged</th>
  </tr>
  <% @domain.ranks.reverse.each do |rank| %>
    <tr>
      <td><%= rank.traffic_rank %></td>
      <td><%= "#{time_ago_in_words(rank.created_at)} ago" %></td>
    </tr>
  <% end %>
</table>
Change traffic rank data to display in reverse chronilogical order.
Change traffic rank data to display in reverse chronilogical order.
