blackbeard 0.0.5.0 → 0.0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dashboard/routes/metrics.rb +7 -1
- data/dashboard/views/cohorts/show.erb +1 -1
- data/lib/blackbeard/chartable.rb +2 -2
- data/lib/blackbeard/cohort_metric.rb +2 -1
- data/lib/blackbeard/group_metric.rb +1 -0
- data/lib/blackbeard/metric_date.rb +1 -1
- data/lib/blackbeard/metric_hour.rb +1 -1
- data/lib/blackbeard/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa44763d398c47b3063551c73926ec687539f3c7
|
4
|
+
data.tar.gz: e79c73df961507fc06858312fe91ed5c3a1caa1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56daa5b7823b2b5c3ca4ef2380d0c9e9fea8221f40aa03e274f7a43bd640488938e57f3d012fcb45b319cbbaa720a7e5675b0b6b33ddaf8b95a341f84617c3ef
|
7
|
+
data.tar.gz: 552061f079c0f531a850f8f9b62e4f9675d9df8867f3ffe4f2ef0d84bfa3cbaf69c1c12d2b77378e796e1200387dc4d4480d884284d99cbc07b37b16f12b96aa
|
data/dashboard/routes/metrics.rb
CHANGED
@@ -42,7 +42,13 @@ module Blackbeard
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def ensure_charts
|
45
|
-
@charts = []
|
45
|
+
@charts = [chartable.recent_hours_chart, chartable.recent_days_chart]
|
46
|
+
end
|
47
|
+
|
48
|
+
def chartable
|
49
|
+
return GroupMetric.new(@group, @metric) if @group
|
50
|
+
return CohortMetric.new(@cohort, @metric) if @cohort
|
51
|
+
return @metric
|
46
52
|
end
|
47
53
|
|
48
54
|
end
|
data/lib/blackbeard/chartable.rb
CHANGED
@@ -29,7 +29,7 @@ module Blackbeard
|
|
29
29
|
:dom_id => 'recent_hour_chart',
|
30
30
|
:title => title,
|
31
31
|
:columns => ['Hour']+chartable_segments,
|
32
|
-
:rows => data.map{ |metric_hour| metric_hour.result_rows(chartable_segments) }
|
32
|
+
:rows => data.reverse.map{ |metric_hour| metric_hour.result_rows(chartable_segments) }
|
33
33
|
)
|
34
34
|
end
|
35
35
|
|
@@ -39,7 +39,7 @@ module Blackbeard
|
|
39
39
|
:dom_id => 'recent_days_chart',
|
40
40
|
:title => "Last #{count} Days",
|
41
41
|
:columns => ['Day']+chartable_segments,
|
42
|
-
:rows => data.map{ |metric_date| metric_date.result_rows(chartable_segments) }
|
42
|
+
:rows => data.reverse.map{ |metric_date| metric_date.result_rows(chartable_segments) }
|
43
43
|
)
|
44
44
|
end
|
45
45
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module Blackbeard
|
2
2
|
class CohortMetric
|
3
|
+
include ConfigurationMethods
|
3
4
|
include Chartable
|
4
5
|
|
5
6
|
attr_reader :cohort, :metric
|
@@ -24,7 +25,7 @@ module Blackbeard
|
|
24
25
|
end
|
25
26
|
|
26
27
|
def chartable_segments
|
27
|
-
metric_data.map{|s| "avg #{s}" }
|
28
|
+
metric_data.segments.map{|s| "avg #{s}" }
|
28
29
|
end
|
29
30
|
|
30
31
|
def chartable_result_for_hour(hour)
|
data/lib/blackbeard/version.rb
CHANGED