conductor 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/generators/conductor/templates/conductor.css +72 -0
- data/lib/conductor/helpers/dashboard_helper.rb +0 -2
- data/lib/conductor/views/dashboard/_current_weights.html.haml +16 -0
- data/lib/conductor/views/dashboard/_daily_stats.html.haml +22 -0
- data/lib/conductor/views/dashboard/_top_nav.html.haml +3 -0
- data/lib/conductor/views/dashboard/_weight_history.html.haml +22 -0
- data/lib/conductor/views/dashboard/index.html.haml +18 -60
- metadata +6 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.4
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#conductor_dashboard {
|
2
|
+
font-size: 12px;
|
3
|
+
font-family: 'Gill Sans';
|
4
|
+
}
|
5
|
+
|
6
|
+
#conductor_dashboard .title h1 {
|
7
|
+
margin-bottom: 0px;
|
8
|
+
}
|
9
|
+
|
10
|
+
#conductor_dashboard .title .generated {
|
11
|
+
font-size: 1.25em;
|
12
|
+
padding-left: 1em;
|
13
|
+
}
|
14
|
+
|
15
|
+
#conductor_dashboard .top_nav {
|
16
|
+
margin: 2em 0em;
|
17
|
+
}
|
18
|
+
|
19
|
+
#conductor_dashboard .top_nav .nav {
|
20
|
+
display: inline;
|
21
|
+
border-right: 1px solid black;
|
22
|
+
padding: .50em;
|
23
|
+
}
|
24
|
+
|
25
|
+
#conductor_dashboard .top_nav .last {
|
26
|
+
display: inline;
|
27
|
+
border-right: none;
|
28
|
+
padding: .25em;
|
29
|
+
}
|
30
|
+
|
31
|
+
#conductor_dashboard fieldset {
|
32
|
+
border-left: none;
|
33
|
+
border-right: none;
|
34
|
+
border-bottom: 1px dotted #CCCCCC;
|
35
|
+
}
|
36
|
+
|
37
|
+
#conductor_dashboard fieldset legend {
|
38
|
+
padding: 0px 10px;
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
#conductor_dashboard #weights .group table {
|
43
|
+
display: none;
|
44
|
+
}
|
45
|
+
|
46
|
+
#conductor_dashboard #dailies .group table {
|
47
|
+
display: none;
|
48
|
+
}
|
49
|
+
|
50
|
+
#conductor_dashboard #history .group table {
|
51
|
+
display: none;
|
52
|
+
}
|
53
|
+
|
54
|
+
|
55
|
+
#conductor_dashboard .toggle_table {
|
56
|
+
font-size: .80;
|
57
|
+
font-decoration: underline;
|
58
|
+
color: blue;
|
59
|
+
text-align: right;
|
60
|
+
padding: 1em .5em;
|
61
|
+
}
|
62
|
+
|
63
|
+
#conductor_dashboard table {
|
64
|
+
margin-top: 1em;
|
65
|
+
}
|
66
|
+
|
67
|
+
#conductor_dashboard table tr th {
|
68
|
+
background: #CCCCCC;
|
69
|
+
font-family: "Warnock Pro", "Goudy Old Style", "Palatino", "Book Antiqua", Georgia, serif;
|
70
|
+
font-style: italic;
|
71
|
+
font-size: 1.25em;
|
72
|
+
}
|
@@ -25,7 +25,6 @@ module DashboardHelper
|
|
25
25
|
dr = group.min {|a,b| a.activity_date <=> b.activity_date }.activity_date..group.max {|a,b| a.activity_date <=> b.activity_date }.activity_date
|
26
26
|
|
27
27
|
return Gchart.line(:size => '600x250',
|
28
|
-
:title => group_name,
|
29
28
|
:legend => legend,
|
30
29
|
:data => data,
|
31
30
|
:axis_with_labels => ['x','y'],
|
@@ -48,7 +47,6 @@ module DashboardHelper
|
|
48
47
|
dr = group.min {|a,b| a.computed_at <=> b.computed_at}.computed_at.to_date..group.max {|a,b| a.computed_at <=> b.computed_at }.computed_at.to_date
|
49
48
|
|
50
49
|
return Gchart.line(:size => '700x350',
|
51
|
-
:title => group_name,
|
52
50
|
:legend => legend,
|
53
51
|
:data => data,
|
54
52
|
:axis_with_labels => ['x','y'],
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%a{:name => "current_weights"}
|
2
|
+
%h2 Current Experiment Weights
|
3
|
+
- @weights.group_by(&:group_name).each do |group_name, group|
|
4
|
+
.group
|
5
|
+
%fieldset
|
6
|
+
%legend= group_name
|
7
|
+
= image_tag current_weights(group_name, group)
|
8
|
+
.toggle_table (table)
|
9
|
+
%table
|
10
|
+
%tr
|
11
|
+
%th Alternative
|
12
|
+
%th Weight
|
13
|
+
- group.each do |row|
|
14
|
+
%tr
|
15
|
+
%td.name= row.alternative
|
16
|
+
%td.weight= row.weight
|
@@ -0,0 +1,22 @@
|
|
1
|
+
%a{:name => "daily_stats"}
|
2
|
+
%h2 Experiment Statistics
|
3
|
+
- @dailies.group_by(&:group_name).each do |group_name, group|
|
4
|
+
.group
|
5
|
+
%fieldset
|
6
|
+
%legend= group_name
|
7
|
+
.chart= image_tag daily_stats(group_name, group)
|
8
|
+
.toggle_table (table)
|
9
|
+
%table
|
10
|
+
%tr
|
11
|
+
%th Date
|
12
|
+
%th Alternative
|
13
|
+
%th Views
|
14
|
+
%th Conversions
|
15
|
+
%th Value
|
16
|
+
- group.sort_by(&:activity_date).reverse.each do |row|
|
17
|
+
%tr
|
18
|
+
%td.date= row.activity_date
|
19
|
+
%td.name= row.alternative
|
20
|
+
%td.views= row.views
|
21
|
+
%td.conversions= row.conversions
|
22
|
+
%td.value= row.conversion_value
|
@@ -0,0 +1,22 @@
|
|
1
|
+
%a{:name => "weight_history"}
|
2
|
+
%h2 Experiment Weight History
|
3
|
+
- @weight_history.group_by(&:group_name).each do |group_name, group|
|
4
|
+
.group
|
5
|
+
%fieldset
|
6
|
+
%legend= group_name
|
7
|
+
.chart= image_tag weight_history(group_name, group)
|
8
|
+
.toggle_table (table)
|
9
|
+
%table
|
10
|
+
%tr
|
11
|
+
%th Date
|
12
|
+
%th Alternative
|
13
|
+
%th Weight
|
14
|
+
- group.sort_by(&:computed_at).reverse.each do |row|
|
15
|
+
%tr
|
16
|
+
%td.date
|
17
|
+
= row.computed_at
|
18
|
+
- if row.launch_window
|
19
|
+
= "(#{row.launch_window} day(s) till hard launch)"
|
20
|
+
%td.name= row.alternative
|
21
|
+
%td.weight= row.weight
|
22
|
+
|
@@ -4,67 +4,25 @@
|
|
4
4
|
%meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
|
5
5
|
%title
|
6
6
|
= h(yield(:title) || "Conductor Statistic as of #{Time.now}")
|
7
|
+
= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'
|
7
8
|
= stylesheet_link_tag 'conductor', :media => "all"
|
9
|
+
|
10
|
+
:javascript
|
11
|
+
$(document).ready(function() {
|
12
|
+
$('.toggle_table').click(function() {
|
13
|
+
$(this).parent().find('table').toggle();
|
14
|
+
});
|
15
|
+
});
|
16
|
+
|
8
17
|
%body
|
9
18
|
#conductor_dashboard
|
10
|
-
|
11
|
-
%
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
%th Alternative
|
20
|
-
%th Weight
|
21
|
-
- group.each do |row|
|
22
|
-
%tr
|
23
|
-
%td.name= row.alternative
|
24
|
-
%td.weight= row.weight
|
25
|
-
|
26
|
-
#dailies
|
27
|
-
%h2 Experiment Statistics
|
28
|
-
- @dailies.group_by(&:group_name).each do |group_name, group|
|
29
|
-
.group
|
30
|
-
%fieldset
|
31
|
-
%legend= group_name
|
32
|
-
.chart
|
33
|
-
= image_tag daily_stats(group_name, group)
|
34
|
-
%table
|
35
|
-
%tr
|
36
|
-
%th Date
|
37
|
-
%th Alternative
|
38
|
-
%th Views
|
39
|
-
%th Conversions
|
40
|
-
%th Value
|
41
|
-
- group.sort_by(&:activity_date).reverse.each do |row|
|
42
|
-
%tr
|
43
|
-
%td.date= row.activity_date
|
44
|
-
%td.name= row.alternative
|
45
|
-
%td.views= row.views
|
46
|
-
%td.conversions= row.conversions
|
47
|
-
%td.value= row.conversion_value
|
48
|
-
|
49
|
-
#history
|
50
|
-
%h2 Experiment Weight History
|
51
|
-
- @weight_history.group_by(&:group_name).each do |group_name, group|
|
52
|
-
.group
|
53
|
-
%fieldset
|
54
|
-
%legend= group_name
|
55
|
-
= image_tag weight_history(group_name, group)
|
56
|
-
%table
|
57
|
-
%tr
|
58
|
-
%th Date
|
59
|
-
%th Alternative
|
60
|
-
%th Weight
|
61
|
-
- group.sort_by(&:computed_at).reverse.each do |row|
|
62
|
-
%tr
|
63
|
-
%td.date
|
64
|
-
= row.computed_at
|
65
|
-
- if row.launch_window
|
66
|
-
= "(#{row.launch_window} day(s) till hard launch)"
|
67
|
-
%td.name= row.alternative
|
68
|
-
%td.weight= row.weight
|
69
|
-
|
19
|
+
.title
|
20
|
+
%h1 Conductor Statistics
|
21
|
+
.generated= "Generated on #{Time.now}"
|
22
|
+
|
23
|
+
.top_nav= render :file => 'dashboard/_top_nav'
|
24
|
+
#weights= render :file => 'dashboard/_current_weights'
|
25
|
+
#dailies= render :file => 'dashboard/_daily_stats'
|
26
|
+
#history= render :file => 'dashboard/_weight_history'
|
27
|
+
|
70
28
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 0.6.
|
8
|
+
- 4
|
9
|
+
version: 0.6.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Noctivity
|
@@ -71,6 +71,10 @@ files:
|
|
71
71
|
- lib/conductor/experiment/weight.rb
|
72
72
|
- lib/conductor/helpers/dashboard_helper.rb
|
73
73
|
- lib/conductor/roll_up.rb
|
74
|
+
- lib/conductor/views/dashboard/_current_weights.html.haml
|
75
|
+
- lib/conductor/views/dashboard/_daily_stats.html.haml
|
76
|
+
- lib/conductor/views/dashboard/_top_nav.html.haml
|
77
|
+
- lib/conductor/views/dashboard/_weight_history.html.haml
|
74
78
|
- lib/conductor/views/dashboard/index.html.haml
|
75
79
|
- lib/conductor/weights.rb
|
76
80
|
- test/db/schema.rb
|