trailguide 0.1.31 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +73 -8
- data/app/assets/javascripts/trail_guide/admin/application.js +20 -1
- data/app/assets/stylesheets/trail_guide/admin/application.css +22 -0
- data/app/assets/stylesheets/trail_guide/admin/experiments.css +36 -3
- data/app/controllers/trail_guide/admin/application_controller.rb +59 -8
- data/app/controllers/trail_guide/admin/experiments_controller.rb +209 -16
- data/app/controllers/trail_guide/admin/groups_controller.rb +34 -0
- data/app/controllers/trail_guide/experiments_controller.rb +1 -1
- data/app/views/layouts/trail_guide/admin/_calculator.erb +24 -0
- data/app/views/layouts/trail_guide/admin/_footer.html.erb +27 -0
- data/app/views/layouts/trail_guide/admin/_header.html.erb +147 -0
- data/app/views/layouts/trail_guide/admin/_import_modal.html.erb +45 -0
- data/app/views/layouts/trail_guide/admin/application.html.erb +17 -3
- data/app/views/trail_guide/admin/experiments/_alert_peek.html.erb +19 -0
- data/app/views/trail_guide/admin/experiments/_alert_state.html.erb +49 -0
- data/app/views/trail_guide/admin/experiments/_btn_analyze.html.erb +11 -0
- data/app/views/trail_guide/admin/experiments/_btn_analyze_goal.html.erb +5 -0
- data/app/views/trail_guide/admin/experiments/_btn_convert.html.erb +33 -0
- data/app/views/trail_guide/admin/experiments/_btn_enroll.html.erb +3 -0
- data/app/views/trail_guide/admin/experiments/_btn_join.html.erb +11 -0
- data/app/views/trail_guide/admin/experiments/_btn_leave.html.erb +7 -0
- data/app/views/trail_guide/admin/experiments/_btn_pause.html.erb +5 -0
- data/app/views/trail_guide/admin/experiments/_btn_peek.html.erb +13 -0
- data/app/views/trail_guide/admin/experiments/_btn_reset.html.erb +5 -0
- data/app/views/trail_guide/admin/experiments/_btn_restart.html.erb +5 -0
- data/app/views/trail_guide/admin/experiments/_btn_resume.html.erb +5 -0
- data/app/views/trail_guide/admin/experiments/_btn_schedule.html.erb +6 -0
- data/app/views/trail_guide/admin/experiments/_btn_start.html.erb +5 -0
- data/app/views/trail_guide/admin/experiments/_btn_stop.html.erb +5 -0
- data/app/views/trail_guide/admin/experiments/_experiment.html.erb +68 -172
- data/app/views/trail_guide/admin/experiments/_header.html.erb +87 -0
- data/app/views/trail_guide/admin/experiments/_start_modal.html.erb +57 -0
- data/app/views/trail_guide/admin/experiments/_tbody.html.erb +112 -0
- data/app/views/trail_guide/admin/experiments/_thead.html.erb +38 -0
- data/app/views/trail_guide/admin/experiments/index.html.erb +8 -16
- data/app/views/trail_guide/admin/experiments/show.html.erb +78 -0
- data/app/views/trail_guide/admin/groups/index.html.erb +40 -0
- data/app/views/trail_guide/admin/groups/show.html.erb +9 -0
- data/app/views/trail_guide/admin/orphans/_alert.html.erb +44 -0
- data/config/initializers/trailguide.rb +72 -9
- data/config/routes/admin.rb +19 -12
- data/lib/trail_guide/admin/engine.rb +2 -0
- data/lib/trail_guide/admin.rb +2 -0
- data/lib/trail_guide/calculators/bayesian.rb +98 -0
- data/lib/trail_guide/calculators/calculator.rb +58 -0
- data/lib/trail_guide/calculators/score.rb +68 -0
- data/lib/trail_guide/calculators.rb +8 -0
- data/lib/trail_guide/catalog.rb +134 -19
- data/lib/trail_guide/combined_experiment.rb +8 -3
- data/lib/trail_guide/config.rb +6 -1
- data/lib/trail_guide/engine.rb +2 -0
- data/lib/trail_guide/errors.rb +30 -1
- data/lib/trail_guide/experiment.rb +0 -1
- data/lib/trail_guide/experiments/base.rb +189 -53
- data/lib/trail_guide/experiments/config.rb +82 -13
- data/lib/trail_guide/experiments/participant.rb +21 -1
- data/lib/trail_guide/helper.rb +59 -32
- data/lib/trail_guide/metrics/checkpoint.rb +24 -0
- data/lib/trail_guide/metrics/config.rb +45 -0
- data/lib/trail_guide/metrics/funnel.rb +24 -0
- data/lib/trail_guide/metrics/goal.rb +89 -0
- data/lib/trail_guide/metrics.rb +9 -0
- data/lib/trail_guide/participant.rb +54 -21
- data/lib/trail_guide/variant.rb +34 -12
- data/lib/trail_guide/version.rb +2 -2
- data/lib/trailguide.rb +4 -0
- metadata +112 -7
- data/app/views/layouts/trail_guide/admin/_footer.erb +0 -10
- data/app/views/layouts/trail_guide/admin/_header.erb +0 -42
- data/app/views/trail_guide/admin/experiments/_combined_experiment.html.erb +0 -189
- data/config/routes.rb +0 -5
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailguide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rebec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -66,6 +66,76 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.9.3
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: gsl
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.1.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.1.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: integration
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.1.4
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.1.4
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: distribution
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.7.3
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.7.3
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubystats
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.3.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.3.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: abanalyzer
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
69
139
|
- !ruby/object:Gem::Dependency
|
70
140
|
name: sqlite3
|
71
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,16 +195,41 @@ files:
|
|
125
195
|
- app/assets/stylesheets/trail_guide/admin/experiments.css
|
126
196
|
- app/controllers/trail_guide/admin/application_controller.rb
|
127
197
|
- app/controllers/trail_guide/admin/experiments_controller.rb
|
198
|
+
- app/controllers/trail_guide/admin/groups_controller.rb
|
128
199
|
- app/controllers/trail_guide/experiments_controller.rb
|
129
|
-
- app/views/layouts/trail_guide/admin/
|
130
|
-
- app/views/layouts/trail_guide/admin/
|
200
|
+
- app/views/layouts/trail_guide/admin/_calculator.erb
|
201
|
+
- app/views/layouts/trail_guide/admin/_footer.html.erb
|
202
|
+
- app/views/layouts/trail_guide/admin/_header.html.erb
|
203
|
+
- app/views/layouts/trail_guide/admin/_import_modal.html.erb
|
131
204
|
- app/views/layouts/trail_guide/admin/application.html.erb
|
132
|
-
- app/views/trail_guide/admin/experiments/
|
205
|
+
- app/views/trail_guide/admin/experiments/_alert_peek.html.erb
|
206
|
+
- app/views/trail_guide/admin/experiments/_alert_state.html.erb
|
207
|
+
- app/views/trail_guide/admin/experiments/_btn_analyze.html.erb
|
208
|
+
- app/views/trail_guide/admin/experiments/_btn_analyze_goal.html.erb
|
209
|
+
- app/views/trail_guide/admin/experiments/_btn_convert.html.erb
|
210
|
+
- app/views/trail_guide/admin/experiments/_btn_enroll.html.erb
|
211
|
+
- app/views/trail_guide/admin/experiments/_btn_join.html.erb
|
212
|
+
- app/views/trail_guide/admin/experiments/_btn_leave.html.erb
|
213
|
+
- app/views/trail_guide/admin/experiments/_btn_pause.html.erb
|
214
|
+
- app/views/trail_guide/admin/experiments/_btn_peek.html.erb
|
215
|
+
- app/views/trail_guide/admin/experiments/_btn_reset.html.erb
|
216
|
+
- app/views/trail_guide/admin/experiments/_btn_restart.html.erb
|
217
|
+
- app/views/trail_guide/admin/experiments/_btn_resume.html.erb
|
218
|
+
- app/views/trail_guide/admin/experiments/_btn_schedule.html.erb
|
219
|
+
- app/views/trail_guide/admin/experiments/_btn_start.html.erb
|
220
|
+
- app/views/trail_guide/admin/experiments/_btn_stop.html.erb
|
133
221
|
- app/views/trail_guide/admin/experiments/_experiment.html.erb
|
222
|
+
- app/views/trail_guide/admin/experiments/_header.html.erb
|
223
|
+
- app/views/trail_guide/admin/experiments/_start_modal.html.erb
|
224
|
+
- app/views/trail_guide/admin/experiments/_tbody.html.erb
|
225
|
+
- app/views/trail_guide/admin/experiments/_thead.html.erb
|
134
226
|
- app/views/trail_guide/admin/experiments/index.html.erb
|
227
|
+
- app/views/trail_guide/admin/experiments/show.html.erb
|
228
|
+
- app/views/trail_guide/admin/groups/index.html.erb
|
229
|
+
- app/views/trail_guide/admin/groups/show.html.erb
|
230
|
+
- app/views/trail_guide/admin/orphans/_alert.html.erb
|
135
231
|
- config/initializers/assets.rb
|
136
232
|
- config/initializers/trailguide.rb
|
137
|
-
- config/routes.rb
|
138
233
|
- config/routes/admin.rb
|
139
234
|
- config/routes/engine.rb
|
140
235
|
- lib/trail_guide/adapters.rb
|
@@ -153,6 +248,10 @@ files:
|
|
153
248
|
- lib/trail_guide/algorithms/distributed.rb
|
154
249
|
- lib/trail_guide/algorithms/random.rb
|
155
250
|
- lib/trail_guide/algorithms/weighted.rb
|
251
|
+
- lib/trail_guide/calculators.rb
|
252
|
+
- lib/trail_guide/calculators/bayesian.rb
|
253
|
+
- lib/trail_guide/calculators/calculator.rb
|
254
|
+
- lib/trail_guide/calculators/score.rb
|
156
255
|
- lib/trail_guide/catalog.rb
|
157
256
|
- lib/trail_guide/combined_experiment.rb
|
158
257
|
- lib/trail_guide/config.rb
|
@@ -164,6 +263,11 @@ files:
|
|
164
263
|
- lib/trail_guide/experiments/config.rb
|
165
264
|
- lib/trail_guide/experiments/participant.rb
|
166
265
|
- lib/trail_guide/helper.rb
|
266
|
+
- lib/trail_guide/metrics.rb
|
267
|
+
- lib/trail_guide/metrics/checkpoint.rb
|
268
|
+
- lib/trail_guide/metrics/config.rb
|
269
|
+
- lib/trail_guide/metrics/funnel.rb
|
270
|
+
- lib/trail_guide/metrics/goal.rb
|
167
271
|
- lib/trail_guide/participant.rb
|
168
272
|
- lib/trail_guide/spec_helper.rb
|
169
273
|
- lib/trail_guide/unity.rb
|
@@ -189,7 +293,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
293
|
- !ruby/object:Gem::Version
|
190
294
|
version: '0'
|
191
295
|
requirements: []
|
192
|
-
|
296
|
+
rubyforge_project:
|
297
|
+
rubygems_version: 2.7.9
|
193
298
|
signing_key:
|
194
299
|
specification_version: 4
|
195
300
|
summary: User experiments for rails
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<div class="footer container-fluid bg-light">
|
2
|
-
<div class="row">
|
3
|
-
<div class="col-sm text-left">
|
4
|
-
<%= link_to "TrailGuide v#{TrailGuide::Version::VERSION}", "https://github.com/markrebec/trailguide", target: :blank, class: "text-muted" %>
|
5
|
-
</div>
|
6
|
-
<div class="col-sm text-right">
|
7
|
-
<small class="text-muted"><%= TrailGuide.redis._client.id %><%= "/#{TrailGuide.redis.namespace}" if TrailGuide.redis.respond_to?(:namespace) %></small>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
</div>
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<nav class="navbar navbar-expanded-sm navbar-light bg-light">
|
2
|
-
<%= link_to trail_guide_admin.experiments_path, class: "navbar-brand" do %>
|
3
|
-
<%= image_tag "trail_guide/trailguide.png" %>
|
4
|
-
<%= TrailGuide::Admin.configuration.title %>
|
5
|
-
<% end %>
|
6
|
-
<div class="col-sm text-center">
|
7
|
-
<%= link_to trail_guide_admin.experiments_path, class: "text-dark" do %>
|
8
|
-
<strong class="total">
|
9
|
-
<%= TrailGuide.catalog.count %>
|
10
|
-
</strong>
|
11
|
-
<span>experiments</span>
|
12
|
-
<% end %>
|
13
|
-
|
14
|
-
<span>/</span>
|
15
|
-
|
16
|
-
<%= link_to trail_guide_admin.scoped_experiments_path(scope: :running), class: "text-dark" do %>
|
17
|
-
<strong class="total">
|
18
|
-
<%= TrailGuide.catalog.running.count %>
|
19
|
-
</strong>
|
20
|
-
<span>running</span>
|
21
|
-
<% end %>
|
22
|
-
|
23
|
-
<span>/</span>
|
24
|
-
|
25
|
-
<%= link_to trail_guide_admin.scoped_experiments_path(scope: :paused), class: "text-dark" do %>
|
26
|
-
<strong class="total">
|
27
|
-
<%= TrailGuide.catalog.paused.count %>
|
28
|
-
</strong>
|
29
|
-
<span>paused</span>
|
30
|
-
<% end %>
|
31
|
-
|
32
|
-
<span>/</span>
|
33
|
-
|
34
|
-
<%= link_to trail_guide_admin.scoped_experiments_path(scope: :stopped), class: "text-dark" do %>
|
35
|
-
<strong class="total">
|
36
|
-
<%= TrailGuide.catalog.stopped.count %>
|
37
|
-
</strong>
|
38
|
-
<span>stopped</span>
|
39
|
-
<% end %>
|
40
|
-
</div>
|
41
|
-
<span class="navbar-brand"><small class="text-muted"><%= TrailGuide::Admin.configuration.subtitle %></small></span>
|
42
|
-
</nav>
|
@@ -1,189 +0,0 @@
|
|
1
|
-
<div class="experiment row justify-content-center">
|
2
|
-
<div class="col-sm-12 col-md-10 col-lg-8">
|
3
|
-
<div class="row">
|
4
|
-
<div class="col-sm-12 col-md-6 col-lg-8">
|
5
|
-
<h4 id="<%= combined_experiment.experiment_name %>">
|
6
|
-
<%= link_to combined_experiment.experiment_name.to_s.humanize.titleize, trail_guide_admin.experiments_path(anchor: combined_experiment.experiment_name), class: "text-dark" %>
|
7
|
-
</h4>
|
8
|
-
</div>
|
9
|
-
<div class="col-sm-12 col-md-6 col-lg-4 text-right">
|
10
|
-
<% if combined_experiment.running? %>
|
11
|
-
<% if experiment_peekable?(combined_experiment) %>
|
12
|
-
<% if experiment_peeking?(combined_experiment) %>
|
13
|
-
<%= link_to trail_guide_admin.experiments_path(anchor: combined_experiment.experiment_name), class: 'btn btn-sm btn-outline-primary', method: :put, data: {toggle: :tooltip}, title: "hide this experiment's metrics" do %>
|
14
|
-
<span class="fas fa-eye-slash" />
|
15
|
-
<% end %>
|
16
|
-
<% else %>
|
17
|
-
<%= link_to peek_url(combined_experiment), class: 'btn btn-sm btn-primary', method: :put, data: {toggle: :tooltip}, title: "peek at this experiment's metrics" do %>
|
18
|
-
<span class="fas fa-eye" />
|
19
|
-
<% end %>
|
20
|
-
<% end %>
|
21
|
-
<% end %>
|
22
|
-
|
23
|
-
<% if combined_experiment.configuration.can_resume? %>
|
24
|
-
<%= link_to trail_guide_admin.pause_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-warning', method: :put, data: {toggle: :tooltip}, title: 'pause this experiment - you will have the option to resume or reset' do %>
|
25
|
-
<span class="fas fa-pause" />
|
26
|
-
<% end %>
|
27
|
-
<% end %>
|
28
|
-
|
29
|
-
<%= link_to trail_guide_admin.stop_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-danger', method: :put, data: {toggle: :tooltip}, title: 'stop this experiment - once stopped you will need to reset before restarting' do %>
|
30
|
-
<span class="fas fa-stop" />
|
31
|
-
<% end %>
|
32
|
-
|
33
|
-
<%= link_to trail_guide_admin.restart_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-danger',method: :put, data: {toggle: :tooltip}, title: 'restart this experiment - will reset all data and restart the experiment' do %>
|
34
|
-
<span class="fas fa-redo" />
|
35
|
-
<% end %>
|
36
|
-
<% elsif combined_experiment.paused? %>
|
37
|
-
<% if combined_experiment.configuration.can_resume? %>
|
38
|
-
<%= link_to trail_guide_admin.resume_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-success',method: :put, data: {toggle: :tooltip}, title: 'resume this experiment to start bucketing users and serving variants again' do %>
|
39
|
-
<span class="fas fa-redo" />
|
40
|
-
<% end %>
|
41
|
-
<%= link_to trail_guide_admin.stop_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-danger', method: :put, data: {toggle: :tooltip}, title: 'stop this experiment - once stopped you will need to reset before restarting' do %>
|
42
|
-
<span class="fas fa-stop" />
|
43
|
-
<% end %>
|
44
|
-
<% end %>
|
45
|
-
<%= link_to trail_guide_admin.restart_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-danger',method: :put, data: {toggle: :tooltip}, title: 'restart this experiment - will reset all data and restart the experiment' do %>
|
46
|
-
<span class="fas fa-redo" />
|
47
|
-
<% end %>
|
48
|
-
<% elsif combined_experiment.stopped? %>
|
49
|
-
<%= link_to trail_guide_admin.restart_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-danger',method: :put, data: {toggle: :tooltip}, title: 'restart this experiment - will reset all data and restart the experiment' do %>
|
50
|
-
<span class="fas fa-redo" />
|
51
|
-
<% end %>
|
52
|
-
<% elsif !combined_experiment.started? %>
|
53
|
-
<%= link_to trail_guide_admin.start_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-success',method: :put, data: {toggle: :tooltip}, title: 'start this experiment' do %>
|
54
|
-
<span class="fas fa-play" />
|
55
|
-
<% end %>
|
56
|
-
<% end %>
|
57
|
-
<%= link_to trail_guide_admin.reset_experiment_path(combined_experiment.experiment_name), class: 'btn btn-sm btn-outline-danger',method: :put, data: {toggle: :tooltip}, title: "stop this experiment if it's running and reset all data" do %>
|
58
|
-
<span class="fas fa-ban" />
|
59
|
-
<% end %>
|
60
|
-
</div>
|
61
|
-
</div>
|
62
|
-
|
63
|
-
<div class="row">
|
64
|
-
<div class="col-sm-12 col-md-6 col-lg-8">
|
65
|
-
<p><%= combined_experiment.configuration.summary %></p>
|
66
|
-
</div>
|
67
|
-
<div class="col-sm-12 col-md-6 col-lg-4 text-right">
|
68
|
-
<% if combined_experiment.started? %>
|
69
|
-
<small class="text-muted"><%= combined_experiment.started_at.strftime('%b %e %Y @ %l:%M %p') %></small>
|
70
|
-
<span class="text-muted">—</span>
|
71
|
-
<% if combined_experiment.stopped? %>
|
72
|
-
<small class="text-muted"><%= combined_experiment.stopped_at.strftime('%b %e %Y @ %l:%M %p') %></small>
|
73
|
-
<% elsif combined_experiment.paused? %>
|
74
|
-
<small class="text-muted">paused</small>
|
75
|
-
<% else %>
|
76
|
-
<small class="text-muted">running</small>
|
77
|
-
<% end %>
|
78
|
-
<% else %>
|
79
|
-
<small class="text-muted">not running</small>
|
80
|
-
<% end %>
|
81
|
-
</div>
|
82
|
-
</div>
|
83
|
-
|
84
|
-
<table class="table table-hover">
|
85
|
-
<% combined_experiments = combined_experiment.combined.map { |e| TrailGuide.catalog.find(e) } %>
|
86
|
-
<% combined_experiments.each do |experiment| %>
|
87
|
-
<thead class="thead-light">
|
88
|
-
<tr>
|
89
|
-
<th scope="col">
|
90
|
-
<h5 id="<%= experiment.experiment_name %>">
|
91
|
-
<%= link_to experiment.experiment_name.to_s.humanize.titleize, trail_guide_admin.experiments_path(anchor: experiment.experiment_name), class: "text-dark" %>
|
92
|
-
</h5>
|
93
|
-
</th>
|
94
|
-
|
95
|
-
<th scope="col">Participants</th>
|
96
|
-
|
97
|
-
<% if experiment.goals.empty? %>
|
98
|
-
<th scope="col">Converted</th>
|
99
|
-
<% else %>
|
100
|
-
<% experiment.goals.each do |goal| %>
|
101
|
-
<th scope="col"><%= goal.to_s.humanize.titleize %></th>
|
102
|
-
<% end %>
|
103
|
-
<% end %>
|
104
|
-
|
105
|
-
<th> </th>
|
106
|
-
</tr>
|
107
|
-
</thead>
|
108
|
-
|
109
|
-
<tbody>
|
110
|
-
<% experiment.variants.each do |variant| %>
|
111
|
-
<tr>
|
112
|
-
<th scope="row">
|
113
|
-
<% if experiment.configuration.preview_url? %>
|
114
|
-
<%= link_to variant.name.to_s.humanize.titleize, preview_url(variant), target: :blank, class: "text-dark" %>
|
115
|
-
<% else %>
|
116
|
-
<%= variant.name.to_s.humanize.titleize %>
|
117
|
-
<% end %>
|
118
|
-
|
119
|
-
<% if experiment.running? && !experiment.winner? && participant.variant(experiment) == variant %>
|
120
|
-
<span class="fas fa-user text-muted" data-toggle="tooltip" title="you are currently in this cohort"></span>
|
121
|
-
<% end %>
|
122
|
-
<% if experiment.winner? && variant == experiment.winner %>
|
123
|
-
<span class="fas fa-star text-primary" data-toggle="tooltip" title="this variant has been promoted as the winner of the experiment"></span>
|
124
|
-
<% end %>
|
125
|
-
<% if variant.control? %>
|
126
|
-
<span class="fas fa-cog text-muted" data-toggle="tooltip" title="this variant is the control group for this experiment"></span>
|
127
|
-
<% end %>
|
128
|
-
</th>
|
129
|
-
|
130
|
-
<td><%= experiment_metric combined_experiment, variant.participants %></td>
|
131
|
-
|
132
|
-
<% if experiment.goals.empty? %>
|
133
|
-
<td><%= experiment_metric combined_experiment, variant.converted %></td>
|
134
|
-
<% else %>
|
135
|
-
<% experiment.goals.each do |goal| %>
|
136
|
-
<td><%= experiment_metric combined_experiment, variant.converted(goal) %></td>
|
137
|
-
<% end %>
|
138
|
-
<% end %>
|
139
|
-
|
140
|
-
<td class="text-right">
|
141
|
-
<% if experiment.running? && !experiment.winner? %>
|
142
|
-
<% if participant.variant(experiment) == variant %>
|
143
|
-
<%= link_to trail_guide_admin.leave_experiment_path(experiment.experiment_name), class: "btn btn-sm btn-outline-secondary", method: :put, data: {toggle: :tooltip}, title: 'leave this cohort' do %>
|
144
|
-
<span class="fas fa-sign-out-alt" />
|
145
|
-
<% end %>
|
146
|
-
<% else %>
|
147
|
-
<%= link_to trail_guide_admin.join_experiment_path(experiment.experiment_name, variant.name), class: "btn btn-sm btn-secondary", method: :put, data: {toggle: :tooltip}, title: 'join this cohort' do %>
|
148
|
-
<span class="fas fa-sign-in-alt" />
|
149
|
-
<% end %>
|
150
|
-
<% end %>
|
151
|
-
<% end %>
|
152
|
-
|
153
|
-
<% if !experiment.winner? || variant != experiment.winner %>
|
154
|
-
<%= link_to trail_guide_admin.winner_experiment_path(experiment.experiment_name, variant.name), class: "btn btn-sm btn-#{experiment.winner? ? "outline-" : ""}primary", method: :put, data: {toggle: :tooltip}, title: 'rollout this variant as the winner for this experiment' do %>
|
155
|
-
<span class="fas fa-star" />
|
156
|
-
<% end %>
|
157
|
-
<% elsif experiment.winner? && variant == experiment.winner %>
|
158
|
-
<%= link_to trail_guide_admin.clear_experiment_path(experiment.experiment_name), class: "btn btn-sm btn-warning", method: :put, data: {toggle: :tooltip}, title: 'remove this variant as the selected winner' do %>
|
159
|
-
<span class="fas fa-window-close" />
|
160
|
-
<% end %>
|
161
|
-
<% end %>
|
162
|
-
</td>
|
163
|
-
</tr>
|
164
|
-
<% end %>
|
165
|
-
</tbody>
|
166
|
-
<% end %>
|
167
|
-
|
168
|
-
<tfoot class="thead-light">
|
169
|
-
<tr>
|
170
|
-
<th scope="row"> </th>
|
171
|
-
<th>
|
172
|
-
<span><%= number_with_delimiter combined_experiment.participants %></span>
|
173
|
-
<% if combined_experiment.configuration.target_sample_size %>
|
174
|
-
<span class="text-muted">/ <%= number_with_delimiter combined_experiment.configuration.target_sample_size %></span>
|
175
|
-
<% end %>
|
176
|
-
</th>
|
177
|
-
<% if combined_experiment.goals.empty? %>
|
178
|
-
<th><%= experiment_metric combined_experiment, combined_experiments.sum(&:converted) %></th>
|
179
|
-
<% else %>
|
180
|
-
<% combined_experiment.goals.each do |goal| %>
|
181
|
-
<th><%= experiment_metric combined_experiment, combined_experiments.sum { |e| e.converted(goal) } %></th>
|
182
|
-
<% end %>
|
183
|
-
<% end %>
|
184
|
-
<th> </th>
|
185
|
-
</tr>
|
186
|
-
</tfoot>
|
187
|
-
</table>
|
188
|
-
</div>
|
189
|
-
</div>
|
data/config/routes.rb
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# this not only organizes the routes, but also ensures they're only included
|
2
|
-
# once (via ruby require behavior), because having two separate engines in the
|
3
|
-
# gem can cause routes to be parsed twice and double up
|
4
|
-
require_relative 'routes/engine'
|
5
|
-
require_relative 'routes/admin'
|