-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtemplate.haml
More file actions
217 lines (208 loc) · 9.07 KB
/
template.haml
File metadata and controls
217 lines (208 loc) · 9.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
!!! 5
%html{ :lang => 'en' }
%head
/ Required meta tags
%meta{ :charset => 'utf-8' }
%meta{ :name => 'viewport', :content => 'width=device-width, initial-scale=1, shrink-to-fit=no' }
/ Page self-refresh once per hour
%meta(http-equiv="refresh" content="3600")
/ Bootstrap CSS
%link{ :rel => 'stylesheet',
:href => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css',
:integrity => 'sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm',
:crossorigin => 'anonymous' }
/ DataTables CSS
%link{ :rel => 'stylesheet',
:href => 'https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css' }
%style{ :type => 'text/css' }
= ".shiftzilla-chart { width: 600px; height: 200px; }"
= ".shiftzilla-card { width: 700px; }"
%title Shiftzilla
%body
.container-fluid
.row
.col
%h1
= "#{tname == '_overall' ? 'Shiftzilla' : '<a href ="index.html">Shiftzilla</a>'}"
\|
%small
%span.text-muted= tdisp
\|
%small
%span.text-muted= latest_snapshot
.row
.col
%p.text-muted= "Last built: #{build_time} (builds hourly 03:00 - 21:00 UTC-4)"
%hr
.row
.col-6
%a{ :name => 'top' }
- if tname != '_overall' and not tinfo.nil? and not tinfo.ad_hoc?
%h5 Team Info
%ul
- unless is_group
%li= "Team Lead: #{tinfo.lead}"
- if not tinfo.group.nil? and not tinfo.group.lead.nil?
%li= "Group Lead: #{tinfo.group.lead}"
- if tinfo.components.length > 0
%li= "BZ Component(s): " + tinfo.components.map{ |c| "<a href='component_#{c}.html'>#{c}</a>"}.join(', ')
%h5= "#{tdisp} Summary"
%table.table.table-hover.table-sm
%tr
%td Release
- releases.each do |r|
%td.text-right= r[:release].name
%tr
%td Total
- releases.each do |r|
%td.text-right= r[:snapdata].total_bugs
%tr
%td w/ Customer Cases
- releases.each do |r|
%td.text-right= r[:snapdata].total_cc
%tr
%td Avg. Bug Age
- releases.each do |r|
%td.text-right= r[:bug_avg_age]
%tr
%td Avg. Blocker Age
- releases.each do |r|
%td.text-right= r[:tb_avg_age]
%tr
%td New Today
- releases.each do |r|
%td.text-right= r[:snapdata].new_bugs
%tr
%td Closed Yesterday
- releases.each do |r|
%td.text-right= r[:snapdata].closed_bugs
%tr
%td Blockers
- releases.each do |r|
%td.text-right= r[:snapdata].total_tb
%tr
%td New Blockers Today
- releases.each do |r|
%td.text-right= r[:snapdata].new_tb
%tr
%td Closed Blockers Yesterday
- releases.each do |r|
%td.text-right= r[:snapdata].closed_tb
- if tname == '_overall' and include_groups
%h5 Totals By Group
%table.table.table-hover.table-sm
%tr
%td Group
- releases.each do |r|
%td.text-right= r[:release].name
- team_files.each do |tm|
- unless tm[:is_group]
- next
%tr
%td
- if tm[:tname] == tdisp
= tdisp
- else
%a{ :href => tm[:file] }= tm[:tname]
- releases.each do |r|
%td.text-right= tm[:releases][r[:release].name]
- if tname == '_overall'
%h5 Totals By Team
%table.table.table-hover.table-sm
%tr
%td Team
- releases.each do |r|
%td.text-right= r[:release].name
- team_files.each do |tm|
- if tm[:is_group]
- next
%tr
%td
- if tm[:tname] == tdisp
= tdisp
- else
%a{ :href => tm[:file] }= tm[:tname]
- releases.each do |r|
%td.text-right= tm[:releases][r[:release].name]
.col-6
- releases.each do |r|
- next if tname != '_overall' and r[:release].name == 'All'
- next if r.nil? or r[:release].built_in? or r[:no_data] or not r.has_key?(:charts)
.badge.badge-secondary.text-left.w-100= r[:release].name
- [:burndown,:new_closed,:blockers].each do |chart|
- next if tname != '_overall' and chart != :burndown
.badge.badge-light.text-left.text-muted.w-100.pr-4= r[:charts][chart][:title]
%div{ :id => "chart_#{r[:release].token}_#{chart.to_s}", :class => 'card-body w-100', :style => 'height: 200px;' }
- if all_bugs.length > 0
.row
.col
%hr
%a{ :name => "TeamBugs-All" }
%h5
= "Team Bugs (#{all_bugs.length} total)"
%small
%a{ :href => '#top' } Back to top
%table.table.table-sm.table-striped.display{ :id => "team-bugs-all" }
%thead
%tr
%th
%abbr{ :title => 'Beta Blocker, Test Blocker, Ops Blocker, or Online Blocker?' } Blocker
%th
%abbr{ :title => 'See https://mojo.redhat.com/docs/DOC-1159309' } PM
%th
%abbr{ :title => 'Has attached customer cases?'} CC
%th Target
%th Bug
%th Status
%th Component
%th Age
%th Owner
%th Summary
%tbody
- all_bugs.each do |b|
%tr
%td
= b.beta_blocker ? "<span class='badge badge-info'>βeta</span>" : ''
= b.test_blocker ? "<span class='badge badge-danger'>Test</span>" : ''
= b.ops_blocker ? "<span class='badge badge-dark'>Ops</span>" : ''
= b.online_blocker ? "<span class='badge badge-warning'>Online</span>" : ''
%td= b.pm_score
%td= b.cust_cases ? "<span class='badge badge-warning'>CC</span>" : ''
%td(data-order="#{b.semver}")= b.tgt_release
%td
%a{ :href => "#{bug_url}#{b.id}", :target => '_blank' }= b.id
%td= b.status
%td= b.component
%td= b.age
%td
%a{ :href => "mailto:#{b.owner}" }= b.owner
%td= b.summary
/ Optional JavaScript
/ jQuery first, then Popper.js, then Bootstrap JS
%script{ :src => 'https://code.jquery.com/jquery-3.2.1.slim.min.js',
:integrity => 'sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN',
:crossorigin => 'anonymous' }
%script{ :src => 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js',
:integrity => 'sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q',
:crossorigin => 'anonymous' }
%script{ :src => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js',
:integrity => 'sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl',
:crossorigin => 'anonymous' }
/ DataTables JavaScript
%script{ :src => 'https://code.jquery.com/jquery-1.12.4.js' }
%script{ :src => 'https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js' }
%script{ :src => 'https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap4.min.js' }
%script{ :src => 'js/jquery.flot.min.js' }
%script{ :type => 'text/javascript' }
$(document).ready(function() {
- if all_bugs.length > 0
$('#team-bugs-all').DataTable({ 'paging': false, 'order': [[0,'desc'],[1,'desc'],[2,'desc']] });
- releases.each do |r|
- next if tname != '_overall' and r[:release].name == 'All'
- next if r.nil? or r[:release].built_in? or r[:no_data] or not r.has_key?(:charts)
- [:burndown,:new_closed,:blockers].each do |chart|
- next if tname != '_overall' and chart != :burndown
= "var cdata_#{r[:release].token}_#{chart.to_s} = JSON.parse('#{r[:charts][chart][:data]}');"
= "var copts_#{r[:release].token}_#{chart.to_s} = JSON.parse('#{r[:charts][chart][:options]}');"
= "$.plot($(\"#chart_#{r[:release].token}_#{chart.to_s}\"), cdata_#{r[:release].token}_#{chart.to_s}, copts_#{r[:release].token}_#{chart.to_s});"
});