mountain-goat 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +84 -70
- data/generators/mg/mg_generator.rb +9 -3
- data/generators/mg/templates/create_mountain_goat_tables.rb +4 -0
- data/generators/mg/templates/mountain-goat.yml +1 -0
- data/lib/mountain-goat.rb +12 -12
- data/lib/mountain-goat/controllers/mg/mountain_goat_controller.rb +1 -1
- data/lib/mountain-goat/controllers/mg/report_items_controller.rb +5 -5
- data/lib/mountain-goat/controllers/mg/reports_controller.rb +28 -1
- data/lib/mountain-goat/metric_tracking.rb +4 -4
- data/lib/mountain-goat/models/mg/report.rb +4 -4
- data/lib/mountain-goat/models/mg/report_item.rb +2 -2
- data/lib/mountain-goat/models/mg/report_mailer.rb +7 -0
- data/lib/mountain-goat/public/jquery.raphael.js +25 -1
- data/lib/mountain-goat/public/mg.css +307 -316
- data/lib/mountain-goat/public/mg.js +17 -16
- data/lib/mountain-goat/public/mg.png +0 -0
- data/lib/mountain-goat/version.rb +1 -1
- data/lib/mountain-goat/views/mountain_goat/layouts/mountain_goat.html.erb +21 -20
- data/lib/mountain-goat/views/mountain_goat/mg/mountain_goat/login.html.erb +11 -19
- data/lib/mountain-goat/views/mountain_goat/mg/report_items/_report_item_form.html.erb +1 -1
- data/lib/mountain-goat/views/mountain_goat/mg/report_items/_report_item_pivot_form.html.erb +4 -4
- data/lib/mountain-goat/views/mountain_goat/mg/reports/_report_form.html.erb +7 -2
- data/lib/mountain-goat/views/mountain_goat/mg/reports/_report_report_items.html.erb +1 -1
- data/lib/mountain-goat/views/mountain_goat/mg/reports/edit.html.erb +27 -30
- data/lib/mountain-goat/views/mountain_goat/mg/reports/index.html.erb +24 -20
- data/lib/mountain-goat/views/mountain_goat/mg/reports/new.html.erb +14 -13
- data/lib/mountain-goat/views/mountain_goat/mg/reports/show.html.erb +10 -13
- data/mountain-goat.gemspec +2 -2
- metadata +31 -54
- data/lib/mountain-goat/controllers/mg/metric_variants_controller.rb +0 -81
- data/lib/mountain-goat/controllers/mg/metrics_controller.rb +0 -110
- data/lib/mountain-goat/controllers/mg/rallies_controller.rb +0 -43
- data/lib/mountain-goat/models/mg/ci_meta.rb +0 -10
- data/lib/mountain-goat/models/mg/convert.rb +0 -147
- data/lib/mountain-goat/models/mg/convert_meta_type.rb +0 -20
- data/lib/mountain-goat/models/mg/cs_meta.rb +0 -10
- data/lib/mountain-goat/models/mg/metric.rb +0 -8
- data/lib/mountain-goat/models/mg/metric_variant.rb +0 -25
- data/lib/mountain-goat/models/mg/rally.rb +0 -59
- data/lib/mountain-goat/views/mountain_goat/mg/converts/.tmp_show.html.erb.4433~ +0 -69
- data/lib/mountain-goat/views/mountain_goat/mg/converts/_convert_form.html.erb +0 -26
- data/lib/mountain-goat/views/mountain_goat/mg/converts/_convert_meta_type_form.html.erb +0 -27
- data/lib/mountain-goat/views/mountain_goat/mg/converts/edit.html.erb +0 -13
- data/lib/mountain-goat/views/mountain_goat/mg/converts/index.html.erb +0 -25
- data/lib/mountain-goat/views/mountain_goat/mg/converts/new.html.erb +0 -13
- data/lib/mountain-goat/views/mountain_goat/mg/converts/show.html.erb +0 -44
- data/lib/mountain-goat/views/mountain_goat/mg/metric_variants/_metric_variant_form.html.erb +0 -37
- data/lib/mountain-goat/views/mountain_goat/mg/metric_variants/edit.html.erb +0 -13
- data/lib/mountain-goat/views/mountain_goat/mg/metric_variants/index.html.erb +0 -34
- data/lib/mountain-goat/views/mountain_goat/mg/metric_variants/new.html.erb +0 -15
- data/lib/mountain-goat/views/mountain_goat/mg/metric_variants/show.html.erb +0 -30
- data/lib/mountain-goat/views/mountain_goat/mg/metrics/.tmp_show.html.erb.21270~ +0 -68
- data/lib/mountain-goat/views/mountain_goat/mg/metrics/_metric_form.html.erb +0 -24
- data/lib/mountain-goat/views/mountain_goat/mg/metrics/edit.html.erb +0 -13
- data/lib/mountain-goat/views/mountain_goat/mg/metrics/index.html.erb +0 -14
- data/lib/mountain-goat/views/mountain_goat/mg/metrics/new.html.erb +0 -14
- data/lib/mountain-goat/views/mountain_goat/mg/metrics/show.html.erb +0 -67
- data/lib/mountain-goat/views/mountain_goat/mg/rallies/.tmp__rally.html.erb.40484~ +0 -12
- data/lib/mountain-goat/views/mountain_goat/mg/rallies/_rallies.html.erb +0 -5
- data/lib/mountain-goat/views/mountain_goat/mg/rallies/_rallies_form.html.erb +0 -21
- data/lib/mountain-goat/views/mountain_goat/mg/rallies/_rally.html.erb +0 -12
- data/lib/mountain-goat/views/mountain_goat/mg/rallies/edit.html.erb +0 -13
- data/lib/mountain-goat/views/mountain_goat/mg/rallies/index.html.erb +0 -19
- data/lib/mountain-goat/views/mountain_goat/mg/rallies/new.html.erb +0 -13
- data/lib/mountain-goat/views/mountain_goat/mg/rallies/show.html.erb +0 -14
@@ -1,24 +0,0 @@
|
|
1
|
-
<%# locals => f %>
|
2
|
-
|
3
|
-
<% if f.object.new_record? %>
|
4
|
-
<div class="item metric-type">
|
5
|
-
<%= f.label :metric_type, 'Type (this is technical)' %>
|
6
|
-
<%= f.text_field :metric_type %>
|
7
|
-
</div>
|
8
|
-
<% else %>
|
9
|
-
<h2><%= f.object.metric_type %></h2>
|
10
|
-
<% end %>
|
11
|
-
|
12
|
-
<div class="item title">
|
13
|
-
<%= f.label :title %>
|
14
|
-
<%= f.text_field :title %>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<div class="item tally-each-serve">
|
18
|
-
<%= f.check_box :tally_each_serve %>
|
19
|
-
<%= f.label :tally_each_serve, "Tally every hit (or just once per user)" %>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<div class="item submit">
|
23
|
-
<%= f.submit 'Submit' %>
|
24
|
-
</div>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<div id="container-main" class="mt-metrics">
|
4
|
-
<div class="mountain-goat-panel centered">
|
5
|
-
<h1>Edit <%= @metric.title %></h1>
|
6
|
-
|
7
|
-
<% form_for :metric, @metric, :url => mg_metric_url(:id => @metric.id), :html => { :method => :put } do |f| %>
|
8
|
-
<%= f.error_messages %>
|
9
|
-
|
10
|
-
<%= render :partial => 'mg/metrics/metric_form', :locals => { :f => f } %>
|
11
|
-
<% end %>
|
12
|
-
</div>
|
13
|
-
</div>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
|
2
|
-
<div id="container-main" class="mt-metrics">
|
3
|
-
<div class="mountain-goat-panel">
|
4
|
-
<h1>All metrics</h1>
|
5
|
-
|
6
|
-
<% @metrics.each do |metric| %>
|
7
|
-
<h2><a href="<%= mg_metric_url metric %>"><%=h metric.title %> </a></h2>
|
8
|
-
<% end %>
|
9
|
-
|
10
|
-
<span class="actions">
|
11
|
-
<a class="button" href="<%= new_mg_metric_url %>">New metric</a>
|
12
|
-
</span>
|
13
|
-
</div>
|
14
|
-
</div>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<div id="container-main" class="mt-metrics">
|
4
|
-
<div class="mountain-goat-panel cenetered">
|
5
|
-
<h2>New metric</h2>
|
6
|
-
|
7
|
-
<% form_for :metric, @metric, :url => mg_metrics_url do |f| %>
|
8
|
-
<%= f.error_messages %>
|
9
|
-
|
10
|
-
<%= render :partial => 'mg/metrics/metric_form', :locals => { :f => f } %>
|
11
|
-
<% end %>
|
12
|
-
|
13
|
-
</div>
|
14
|
-
</div>
|
@@ -1,67 +0,0 @@
|
|
1
|
-
|
2
|
-
<div id="container-main" class="mt-metrics">
|
3
|
-
<div class="mountain-goat-panel cenetered">
|
4
|
-
<ul class="nav">
|
5
|
-
<li><a href="<%= mg_converts_url %>">Goals</a></li>
|
6
|
-
<li><a href="<%= mg_metric_url :id => @metric.id %>"><%=h @metric.title %></a></li>
|
7
|
-
</ul>
|
8
|
-
|
9
|
-
<h1><%=h @metric.title %> Metric</h1>
|
10
|
-
|
11
|
-
<div class="variants">
|
12
|
-
<% if @metric.metric_variants.count == 0 %>
|
13
|
-
<span class="none">No metric variants</span>
|
14
|
-
<% else %>
|
15
|
-
<div class="statpads">
|
16
|
-
<div class="flyer-analysis statpad">
|
17
|
-
<div class="title">Conversions</div>
|
18
|
-
<div class="statbody">
|
19
|
-
<%= mg_chart("analysis_graph#{@metric.id}",
|
20
|
-
{ "Served" => { :collection => @rates[:served], :x => :variant_type, :y => :value },
|
21
|
-
"Conversions" => { :collection => @rates[:conversions], :x => :variant_type, :y => :value } },
|
22
|
-
{ :xaxis => { :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :show => false, :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "view(s)") %>
|
23
|
-
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
<div class="flyer-analysis statpad">
|
27
|
-
<div class="title">Conversion Rates</div>
|
28
|
-
<div class="statbody">
|
29
|
-
<%= mg_chart("analysis_conv_graph#{@metric.id}",
|
30
|
-
{ "Conversion Rate (%)" => { :collection => @rates[:conversion_rates], :x => :variant_type, :y => :value } },
|
31
|
-
{ :xaxis => { :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :show => false, :position => "ne" }, :grid => { :hoverable => true, :clickable => true }, :inline => false }, :placeholder_size => "420x260", :pie_hover => true, :line_hover_absolute => true, :item_title => "%") %>
|
32
|
-
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
|
37
|
-
|
38
|
-
<div class="metric-category">
|
39
|
-
<span class="metric"><a href="<%= mg_metric_url :id => @metric.id %>"><%= @metric.title %></a></span>
|
40
|
-
<% if @metric.metric_variants.count == 0 %>
|
41
|
-
<span class="none">No metric variants [<a href="<%= new_mg_metric_metric_variant_url :metric_id => @metric.id %>">Add one</a>]</span>
|
42
|
-
<% else %>
|
43
|
-
<% @metric.metric_variants.each do |mv| %>
|
44
|
-
<div class="item rate">
|
45
|
-
<span class="rate-holder">
|
46
|
-
<span class="title"><a href="<%= mg_metric_variant_url mv %>"><%=h mv.name %></a></span>
|
47
|
-
<span class="rates" style="width:<%= number_to_percentage(mv.conversion_rate, :precision => 0) %>"></span>
|
48
|
-
</span>
|
49
|
-
|
50
|
-
<span class="percent-holder">
|
51
|
-
<span class="val"><%= number_to_percentage(mv.conversion_rate, :precision => 0) %></span>
|
52
|
-
(<span class="conversions"><%= mv.conversions %></span> /
|
53
|
-
<span class="served"><%= mv.served %></span>)
|
54
|
-
</span>
|
55
|
-
</div>
|
56
|
-
<% end %>
|
57
|
-
<% end %>
|
58
|
-
</div>
|
59
|
-
<% end %>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div class="actions">
|
63
|
-
<a class="button" href="<%= edit_mg_metric_url :id => @metric %>">Edit Metric</a>
|
64
|
-
<a class="button" href="<%= new_mg_metric_metric_variant_url :metric_id => @metric.id %>">New Variant</a>
|
65
|
-
</div>
|
66
|
-
</div>
|
67
|
-
</div>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<%# locals => rally %>
|
2
|
-
|
3
|
-
<li class="rally" data-rally-id="<%= rally.id %>"><span class="name"><%= rally.convert.name %></span>
|
4
|
-
<ul>
|
5
|
-
<% rally.all_metas.each do |k,v| %>
|
6
|
-
<% if !v.blank? %>
|
7
|
-
<li><%= k %>: <%= v %></li>
|
8
|
-
<% end %>
|
9
|
-
<% end %>
|
10
|
-
</ul>
|
11
|
-
<span class="time"><%= content_tag(:abbr, rally.created_at.to_s, :title => rally.created_at.getutc.iso8601, :class => "time-ago") %></span>
|
12
|
-
</li>
|
@@ -1,21 +0,0 @@
|
|
1
|
-
<%# locals => f %>
|
2
|
-
|
3
|
-
<% if f.object.new_record? %>
|
4
|
-
<div class="item metric-type">
|
5
|
-
<%= f.label :convert_type, 'Type (this is technical)' %>
|
6
|
-
<%= f.text_field :convert_type %>
|
7
|
-
</div>
|
8
|
-
<% else %>
|
9
|
-
<%= f.hidden_field(:convert_id) %>
|
10
|
-
<h2><%= f.object.convert.name %></h2>
|
11
|
-
<span class="item created_at">
|
12
|
-
<%= f.label :created_at %>
|
13
|
-
<%= f.text_field :created_at %>
|
14
|
-
</span>
|
15
|
-
<% end %>
|
16
|
-
|
17
|
-
<%# TODO: Metas %>
|
18
|
-
|
19
|
-
<div class="item submit">
|
20
|
-
<%= f.submit 'Submit' %>
|
21
|
-
</div>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<%# locals => rally %>
|
2
|
-
|
3
|
-
<li class="rally" data-rally-id="<%= rally.id %>"><span class="name"><%= rally.convert.name %></span>
|
4
|
-
<ul>
|
5
|
-
<% rally.all_metas.each do |k,v| %>
|
6
|
-
<% if !v.blank? %>
|
7
|
-
<li><%= k %>: <%= v %></li>
|
8
|
-
<% end %>
|
9
|
-
<% end %>
|
10
|
-
</ul>
|
11
|
-
<span class="time"><%= content_tag(:abbr, rally.created_at.to_s, :title => rally.created_at.getutc.iso8601, :class => "time-ago") %></span>
|
12
|
-
</li>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
<div id="container-main" class="mt-rallies">
|
3
|
-
<div class="mountain-goat-panel cenetered">
|
4
|
-
<h2>Edit rally</h2>
|
5
|
-
|
6
|
-
<% form_for :rally, @rally, :url => mg_rallies_url do |f| %>
|
7
|
-
<%= f.error_messages %>
|
8
|
-
|
9
|
-
<%= render :partial => 'mg/rallies/rallies_form', :locals => { :f => f } %>
|
10
|
-
<% end %>
|
11
|
-
|
12
|
-
</div>
|
13
|
-
</div>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
|
2
|
-
<div id="container-main" class="mt-rallies">
|
3
|
-
<div class="mountain-goat-panel">
|
4
|
-
<h1>Rallies <% if @convert %>for <%=h @convert.name %><% else %>for all Goals<% end %></h1>
|
5
|
-
|
6
|
-
<div class="recent-rally" data-reload="true" data-rally-id="<%= @rallies.count > 0 ? @rallies.first.id : -1 %>" data-convert-id="<%= @convert ? @convert.id : '' %>"></div>
|
7
|
-
<a href="javascript:void(0)" class="reload">Reload</a>
|
8
|
-
|
9
|
-
<% if @rallies.count > 0 %>
|
10
|
-
<ul class="rally-list">
|
11
|
-
<% @rallies.each do |rally| %>
|
12
|
-
<%= render 'rally', :rally => rally %>
|
13
|
-
<% end %>
|
14
|
-
</ul>
|
15
|
-
<% else %>
|
16
|
-
<h2>No rallies for yet this goal.</h2>
|
17
|
-
<% end %>
|
18
|
-
</div>
|
19
|
-
</div>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
<div id="container-main" class="mt-rallies">
|
3
|
-
<div class="mountain-goat-panel cenetered">
|
4
|
-
<h2>New rally</h2>
|
5
|
-
|
6
|
-
<% form_for :rally, @rally, :url => mg_rallies_url do |f| %>
|
7
|
-
<%= f.error_messages %>
|
8
|
-
|
9
|
-
<%= render :partial => 'mg/rallies/rallies_form', :locals => { :f => f } %>
|
10
|
-
<% end %>
|
11
|
-
|
12
|
-
</div>
|
13
|
-
</div>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
|
2
|
-
<div id="container-main" class="mt-rallies">
|
3
|
-
<div class="mountain-goat-panel cenetered">
|
4
|
-
<h2>Rally for <%=h @rally.convert.name %></h2>
|
5
|
-
|
6
|
-
<div class="rally">
|
7
|
-
<span class="occured"><%= @rally.created_at.to_s %></span>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="actions">
|
11
|
-
<a class="button" href="<%= edit_mg_rally_url @rally.id %>">Edit</a>
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
</div>
|