Sha256: dd02006b5e7765c0d7df757b72a6016c76f399fb3594578d88afd88f1356df71

Contents?: true

Size: 1.84 KB

Versions: 3

Compression:

Stored size: 1.84 KB

Contents

<% if @experiments.any? %>
  <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>

  <div class="dashboard-controls">
    <input type="text" placeholder="Begin typing to filter" id="filter" />
    <input type="button" id="toggle-completed" value="Hide completed" />
    <input type="button" id="toggle-active" value="Hide active" />
    <input type="button" id="clear-filter" value="Clear filters" />
  </div>

  <% paginated(@experiments).each do |experiment| %>
    <% if experiment.goals.empty? %>
      <%= erb :_experiment, :locals => {:goal => nil, :experiment => experiment} %>
    <% else %>
      <%= erb :_experiment_with_goal_header, :locals => {:experiment => experiment} %>
      <% experiment.goals.each do |g| %>
        <%= erb :_experiment, :locals => {:goal => g, :experiment => experiment} %>
      <% end %>
    <% end %>
  <% end %>

  <div class="pagination">
    <%= pagination(@experiments) %>
  </div>
<% else %>
  <p class="intro">No experiments have started yet, you need to define them in your code and introduce them to your users.</p>
  <p class="intro">Check out the <a href='https://github.com/splitrb/split#readme'>Readme</a> for more help getting started.</p>
<% end %>

<div class="dashboard-controls dashboard-controls-bottom">
  <form action="<%= url "/initialize_experiment" %>" method='post'>
    <label>Add unregistered experiment: </label>
    <select name="experiment" id="experiment-select">
      <option selected disabled>experiment</option>
      <% @unintialized_experiments.sort.each do |experiment_name| %>
          <option value="<%= experiment_name %>"><%= experiment_name %></option>
      <% end %>
    </select>
    <input type="submit" id="register-experiment-btn" value="register experiment"/>
  </form>
<div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
split-4.0.4 lib/split/dashboard/views/index.erb
split-4.0.3 lib/split/dashboard/views/index.erb
split-4.0.2 lib/split/dashboard/views/index.erb