Sha256: eee22319c5afa51dbebb6bd521995dd8e5c62a0978dd809e0d257adf17663341

Contents?: true

Size: 1.83 KB

Versions: 1

Compression:

Stored size: 1.83 KB

Contents

<h1>Split Dashboard</h1>
<p class="intro">The list below contains all the registered experiments along with the number of test participants, completed and conversion rate currently in the system.</p>

<% @experiments.each do |experiment| %>
  <h2><%= experiment.name %></h2>
  <table class="queues">
    <tr>
      <th>Alternative Name</th>
      <th>Participants</th>
      <th>Non-finished</th>
      <th>Completed</th>
      <th>Conversion Rate</th>
      <th>Z-Score</th>
      <th>Winner</th>
    </tr>

    <% total_participants = total_completed = 0 %>
    <% experiment.alternatives.each do |alternative| %>
      <tr>
        <td><%= alternative.name %></td>
        <td><%= alternative.participant_count %></td>
        <td><%= alternative.participant_count - alternative.completed_count %></td>
        <td><%= alternative.completed_count %></td>
        <td><%= (alternative.conversion_rate * 100).round(2) %>%</td>
        <td><%= alternative.z_score %></td>
        <td>
          <% if experiment.winner %>
            <% if experiment.winner.name == alternative.name %>
              Winner
            <% else %>
              Loser
            <% end %>
          <% else %>
            <form action="<%= url experiment.name %>" method='post'>
              <input type='hidden' name='alternative' value='<%= alternative.name %>'>
              <input type="submit" value="Use this">
            </form>
          <% end %>
        </td>
      </tr>

      <% total_participants += alternative.participant_count %>
      <% total_completed += alternative.completed_count %>
    <% end %>

    <tr class="totals">
      <td>Totals</td>
      <td><%= total_participants %></td>
      <td><%= total_participants - total_completed %></td>
      <td><%= total_completed %></td>
      <td>N/A</td>
      <td>N/A</td>
      <td>N/A</td>
    </tr>
  </table>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
split-0.1.0 lib/split/dashboard/views/index.erb