jirametrics 2.10pre1 → 2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jirametrics/aggregate_config.rb +1 -1
- data/lib/jirametrics/cycletime_histogram.rb +3 -1
- data/lib/jirametrics/exporter.rb +7 -7
- data/lib/jirametrics/html/aging_work_bar_chart.erb +2 -2
- data/lib/jirametrics/html/cycletime_histogram.erb +27 -4
- data/lib/jirametrics/status.rb +0 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6d6dd1e6c2811b1395ef0ce25d1458db4c3b88c2e4ab774e6c2db045549e51e
|
4
|
+
data.tar.gz: 53d614e48e61a7fad285d72de82f6f59a0c9024c33f39b36478c7c01866150c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '079f3d1f72a7d4cfd3d3da08d508cacfe4f04d6926e3674d5c6654cb290b8f1a1d7bbdb585bc587b743a888b85a19714294cdd15a9f891e2a7b52f5303b70d6f'
|
7
|
+
data.tar.gz: 9a6bdfbe92dc04d8264efad3d6be1569383f604968fa3c83fbda33fb20b25210b545cb86102a1e51926348f58aad97328c119be772e15f72090932fc40fff5d4
|
@@ -48,6 +48,8 @@ class CycletimeHistogram < ChartBase
|
|
48
48
|
|
49
49
|
the_stats = {}
|
50
50
|
|
51
|
+
overall_stats = stats_for histogram_data: histogram_data_for(issues: histogram_issues), percentiles: @percentiles
|
52
|
+
the_stats[:all] = overall_stats
|
51
53
|
data_sets = rules_to_issues.keys.collect do |rules|
|
52
54
|
the_issue_type = rules.label
|
53
55
|
the_histogram = histogram_data_for(issues: rules_to_issues[rules])
|
@@ -74,7 +76,7 @@ class CycletimeHistogram < ChartBase
|
|
74
76
|
count_hash
|
75
77
|
end
|
76
78
|
|
77
|
-
def stats_for histogram_data:, percentiles:
|
79
|
+
def stats_for histogram_data:, percentiles:
|
78
80
|
return {} if histogram_data.empty?
|
79
81
|
|
80
82
|
total_values = histogram_data.values.sum
|
data/lib/jirametrics/exporter.rb
CHANGED
@@ -64,12 +64,8 @@ class Exporter
|
|
64
64
|
selected = []
|
65
65
|
each_project_config(name_filter: name_filter) do |project|
|
66
66
|
project.evaluate_next_level
|
67
|
-
# next if project.aggregated_project?
|
68
67
|
|
69
68
|
project.run load_only: true
|
70
|
-
project.board_configs.each do |board_config|
|
71
|
-
board_config.run
|
72
|
-
end
|
73
69
|
project.issues.each do |issue|
|
74
70
|
selected << [project, issue] if keys.include? issue.key
|
75
71
|
end
|
@@ -79,9 +75,13 @@ class Exporter
|
|
79
75
|
raise unless e.message.start_with? 'This is an aggregated project and issues should have been included'
|
80
76
|
end
|
81
77
|
|
82
|
-
selected.
|
83
|
-
|
84
|
-
|
78
|
+
if selected.empty?
|
79
|
+
file_system.log "No issues found to match #{keys.collect(&:inspect).join(', ')}"
|
80
|
+
else
|
81
|
+
selected.each do |project, issue|
|
82
|
+
file_system.log "\nProject #{project.name}"
|
83
|
+
file_system.log issue.dump
|
84
|
+
end
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
@@ -43,8 +43,8 @@ new Chart(document.getElementById('<%= chart_id %>').getContext('2d'),
|
|
43
43
|
<% if percentage_line_x %>
|
44
44
|
line: {
|
45
45
|
type: 'line',
|
46
|
-
|
47
|
-
|
46
|
+
scaleID: 'x',
|
47
|
+
value: '<%= percentage_line_x %>',
|
48
48
|
borderColor: <%= CssVariable.new('--aging-work-bar-chart-percentage-line-color').to_json %>,
|
49
49
|
borderWidth: 1,
|
50
50
|
drawTime: 'afterDraw'
|
@@ -23,12 +23,12 @@ if show_stats
|
|
23
23
|
<% the_stats.each do |k, v| %>
|
24
24
|
<tr>
|
25
25
|
<td><%= k %></td>
|
26
|
-
<td><%= v[:min] %></td>
|
27
|
-
<td><%= v[:max] %></td>
|
28
|
-
<td><%= sprintf('%.2f', v[:average]) %></td>
|
26
|
+
<td style="text-align: right;"><%= v[:min] %></td>
|
27
|
+
<td style="text-align: right;"><%= v[:max] %></td>
|
28
|
+
<td style="text-align: right;"><%= sprintf('%.2f', v[:average]) %></td>
|
29
29
|
<td><%= v[:mode].join(', ') %></td>
|
30
30
|
<% percentiles.each do |p| %>
|
31
|
-
<td><%= v[:percentiles][p] %></td>
|
31
|
+
<td style="text-align: right;"><%= v[:percentiles][p] %></td>
|
32
32
|
<% end %>
|
33
33
|
</tr>
|
34
34
|
<% end %>
|
@@ -72,6 +72,8 @@ new Chart(document.getElementById('<%= chart_id %>').getContext('2d'),
|
|
72
72
|
grid: {
|
73
73
|
color: <%= CssVariable['--grid-line-color'].to_json %>
|
74
74
|
},
|
75
|
+
min: 0,
|
76
|
+
offset: false, // Gets rid of the ugly padding on left.
|
75
77
|
},
|
76
78
|
y: {
|
77
79
|
stacked: true,
|
@@ -85,6 +87,27 @@ new Chart(document.getElementById('<%= chart_id %>').getContext('2d'),
|
|
85
87
|
}
|
86
88
|
},
|
87
89
|
plugins: {
|
90
|
+
annotation: {
|
91
|
+
annotations: {
|
92
|
+
<%
|
93
|
+
results = the_stats[:all][:percentiles]
|
94
|
+
results.each do |percentile, value|
|
95
|
+
%>
|
96
|
+
percentile<%= percentile.to_s %>: {
|
97
|
+
type: 'line',
|
98
|
+
scaleID: 'x',
|
99
|
+
value: <%= value %>,
|
100
|
+
borderWidth: 1,
|
101
|
+
drawTime: 'beforeDatasetsDraw',
|
102
|
+
label: {
|
103
|
+
enabled: true,
|
104
|
+
content: '<%= "#{percentile}%" %>',
|
105
|
+
position: 'start',
|
106
|
+
}
|
107
|
+
},
|
108
|
+
<% end %>
|
109
|
+
},
|
110
|
+
},
|
88
111
|
tooltip: {
|
89
112
|
callbacks: {
|
90
113
|
label: function(context) {
|
data/lib/jirametrics/status.rb
CHANGED
@@ -38,12 +38,6 @@ class Status
|
|
38
38
|
def self.from_raw raw
|
39
39
|
category_config = raw['statusCategory']
|
40
40
|
|
41
|
-
legal_keys = %w[new indeterminate done]
|
42
|
-
unless legal_keys.include? category_config['key']
|
43
|
-
puts "Category key #{category_config['key'].inspect} should be one of #{legal_keys.inspect}. Found:\n" \
|
44
|
-
"#{category_config}"
|
45
|
-
end
|
46
|
-
|
47
41
|
Status.new(
|
48
42
|
name: raw['name'],
|
49
43
|
id: raw['id'].to_i,
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jirametrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: '2.10'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Bowler
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: random-word
|