watchdog-dashboard 0.1.0
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +123 -0
- data/Rakefile +8 -0
- data/app/assets/config/watchdog_dashboard_manifest.js +1 -0
- data/app/assets/stylesheets/watchdog/dashboard/application.css +15 -0
- data/app/controllers/concerns/flaky_stats.rb +217 -0
- data/app/controllers/concerns/metric_stats.rb +217 -0
- data/app/controllers/watchdog/dashboard/application_controller.rb +6 -0
- data/app/controllers/watchdog/dashboard/dashboard_controller.rb +71 -0
- data/app/controllers/watchdog/dashboard/metrics_controller.rb +37 -0
- data/app/helpers/watchdog/dashboard/application_helper.rb +6 -0
- data/app/helpers/watchdog/dashboard/dashboard_helper.rb +4 -0
- data/app/helpers/watchdog/dashboard/metrics_helper.rb +4 -0
- data/app/jobs/watchdog/dashboard/application_job.rb +6 -0
- data/app/mailers/watchdog/dashboard/application_mailer.rb +8 -0
- data/app/models/watchdog/dashboard/application_record.rb +7 -0
- data/app/models/watchdog/dashboard/metric.rb +5 -0
- data/app/views/layouts/watchdog/dashboard/application.html.erb +28 -0
- data/app/views/watchdog/dashboard/dashboard/_sidebar.html.erb +83 -0
- data/app/views/watchdog/dashboard/dashboard/flakies.html.erb +263 -0
- data/app/views/watchdog/dashboard/dashboard/historic.html.erb +495 -0
- data/app/views/watchdog/dashboard/dashboard/index.html.erb +219 -0
- data/app/views/watchdog/dashboard/dashboard/metrics.html.erb +263 -0
- data/config/initializers/assets.rb +1 -0
- data/config/routes.rb +10 -0
- data/db/migrate/20250331204354_create_watchdog_dashboard_metrics.rb +14 -0
- data/lib/tasks/watchdog/dashboard_tasks.rake +4 -0
- data/lib/watchdog/dashboard/engine.rb +7 -0
- data/lib/watchdog/dashboard/version.rb +5 -0
- data/lib/watchdog/dashboard.rb +19 -0
- metadata +92 -0
@@ -0,0 +1,219 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<title>RSpec Performance Dashboard</title>
|
6
|
+
<style>
|
7
|
+
|
8
|
+
.container {
|
9
|
+
max-width: 1200px;
|
10
|
+
margin: 0 auto;
|
11
|
+
padding: 32px;
|
12
|
+
}
|
13
|
+
.header {
|
14
|
+
display: flex;
|
15
|
+
align-items: center;
|
16
|
+
justify-content: space-between;
|
17
|
+
margin-bottom: 1.5rem;
|
18
|
+
}
|
19
|
+
.title {
|
20
|
+
font-size: 1.875rem;
|
21
|
+
color: rgb(74, 222, 128);
|
22
|
+
}
|
23
|
+
.version {
|
24
|
+
font-size: 0.875rem;
|
25
|
+
color: rgb(156, 163, 175);
|
26
|
+
margin-left: 0.5rem;
|
27
|
+
}
|
28
|
+
.last-scan {
|
29
|
+
background-color: rgba(31, 41, 55, 0.7);
|
30
|
+
padding: 0.25rem 0.75rem;
|
31
|
+
border-radius: 0.375rem;
|
32
|
+
border-left: 2px solid rgb(239, 68, 68);
|
33
|
+
font-size: 0.75rem;
|
34
|
+
}
|
35
|
+
.last-scan-time {
|
36
|
+
color: rgb(250, 204, 21);
|
37
|
+
}
|
38
|
+
.summary-grid {
|
39
|
+
display: grid;
|
40
|
+
grid-template-columns: repeat(4, 1fr);
|
41
|
+
gap: 1.5rem;
|
42
|
+
margin-bottom: 2rem;
|
43
|
+
}
|
44
|
+
.summary-card {
|
45
|
+
background-color: rgba(31, 41, 55, 0.8);
|
46
|
+
padding: 1rem;
|
47
|
+
border-radius: 0.5rem;
|
48
|
+
border: 1px solid rgb(55, 65, 81);
|
49
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
50
|
+
transition: border-color 0.3s;
|
51
|
+
text-align: center;
|
52
|
+
}
|
53
|
+
.summary-card:hover {
|
54
|
+
border-color: rgb(239, 68, 68);
|
55
|
+
}
|
56
|
+
.summary-card h3 {
|
57
|
+
font-size: 1.25rem;
|
58
|
+
margin-bottom: 0.5rem;
|
59
|
+
color: rgb(248, 113, 113);
|
60
|
+
}
|
61
|
+
.summary-card .value {
|
62
|
+
font-size: 2.25rem;
|
63
|
+
font-weight: 700;
|
64
|
+
margin-bottom: 0.5rem;
|
65
|
+
}
|
66
|
+
.summary-card .trend {
|
67
|
+
font-size: 0.875rem;
|
68
|
+
color: rgb(156, 163, 175);
|
69
|
+
}
|
70
|
+
.content-grid {
|
71
|
+
display: grid;
|
72
|
+
grid-template-columns: 1fr 1fr;
|
73
|
+
gap: 1.5rem;
|
74
|
+
margin-bottom: 2rem;
|
75
|
+
}
|
76
|
+
.section {
|
77
|
+
background-color: rgba(31, 41, 55, 0.8);
|
78
|
+
padding: 1rem;
|
79
|
+
border-radius: 0.5rem;
|
80
|
+
border: 1px solid rgb(55, 65, 81);
|
81
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
82
|
+
}
|
83
|
+
.section h3 {
|
84
|
+
font-size: 1.25rem;
|
85
|
+
margin-bottom: 1rem;
|
86
|
+
color: rgb(250, 204, 21);
|
87
|
+
text-align: center;
|
88
|
+
}
|
89
|
+
table {
|
90
|
+
width: 100%;
|
91
|
+
border-collapse: collapse;
|
92
|
+
font-size: 0.875rem;
|
93
|
+
}
|
94
|
+
table thead tr {
|
95
|
+
border-bottom: 1px solid rgb(55, 65, 81);
|
96
|
+
color: rgb(156, 163, 175);
|
97
|
+
}
|
98
|
+
table tbody tr {
|
99
|
+
border-bottom: 1px solid rgb(55, 65, 81);
|
100
|
+
transition: background-color 0.2s;
|
101
|
+
}
|
102
|
+
table tbody tr:hover {
|
103
|
+
background-color: rgba(127, 29, 29, 0.2);
|
104
|
+
}
|
105
|
+
table th, table td {
|
106
|
+
padding: 0.5rem 0;
|
107
|
+
text-align: left;
|
108
|
+
}
|
109
|
+
.footer {
|
110
|
+
margin-top: 2rem;
|
111
|
+
font-size: 0.75rem;
|
112
|
+
color: rgb(107, 114, 128);
|
113
|
+
text-align: center;
|
114
|
+
}
|
115
|
+
.footer a {
|
116
|
+
color: rgb(96, 165, 250);
|
117
|
+
text-decoration: none;
|
118
|
+
transition: color 0.2s;
|
119
|
+
}
|
120
|
+
.footer a:hover {
|
121
|
+
color: rgb(248, 113, 113);
|
122
|
+
}
|
123
|
+
.warning {
|
124
|
+
text-align: center;
|
125
|
+
color: #e74c3c;
|
126
|
+
margin: 30px 0;
|
127
|
+
font-size: 1.25rem;
|
128
|
+
}
|
129
|
+
</style>
|
130
|
+
</head>
|
131
|
+
<body>
|
132
|
+
<div class="container">
|
133
|
+
<div class="header">
|
134
|
+
<div>
|
135
|
+
<span class="title">Rspec Watchdog Dashboard</span>
|
136
|
+
<span class="version">v<%= Watchdog::Dashboard::VERSION %>-alpha</span>
|
137
|
+
</div>
|
138
|
+
<div class="last-scan">
|
139
|
+
Last scan: <span class="last-scan-time"><%= Time.current.strftime('%Y-%m-%d %H:%M:%S UTC') %></span>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<div class="summary-grid">
|
144
|
+
<div class="summary-card">
|
145
|
+
<h3>🕒 Avg Execution Time</h3>
|
146
|
+
<div class="value"><%= Watchdog::Dashboard::Metric.average(:run_time).to_f.round(3) %>s</div>
|
147
|
+
<div class="trend">Test Performance</div>
|
148
|
+
</div>
|
149
|
+
<div class="summary-card">
|
150
|
+
<h3>📁 Unique Files</h3>
|
151
|
+
<div class="value"><%= Watchdog::Dashboard::Metric.distinct.count(:file_path) %></div>
|
152
|
+
<div class="trend">Analyzed Files</div>
|
153
|
+
</div>
|
154
|
+
<div class="summary-card">
|
155
|
+
<h3>🚨 Flaky Tests</h3>
|
156
|
+
<div class="value"><%= Watchdog::Dashboard::Metric.where(flaky: true).count %></div>
|
157
|
+
<div class="trend">Total Flaky</div>
|
158
|
+
</div>
|
159
|
+
<div class="summary-card">
|
160
|
+
<h3>📊 Total Metrics</h3>
|
161
|
+
<div class="value"><%= Watchdog::Dashboard::Metric.count %></div>
|
162
|
+
<div class="trend">Collected</div>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
<% if Watchdog::Dashboard::Metric.where(flaky: true).any? %>
|
167
|
+
<div class="warning">🔥 Flaky Tests Detected 🔥</div>
|
168
|
+
<% end %>
|
169
|
+
|
170
|
+
<div class="content-grid">
|
171
|
+
<div class="section">
|
172
|
+
<h3>🕒 Top 3 Slowest Tests</h3>
|
173
|
+
<table>
|
174
|
+
<thead>
|
175
|
+
<tr>
|
176
|
+
<th>Description</th>
|
177
|
+
<th>Time (s)</th>
|
178
|
+
</tr>
|
179
|
+
</thead>
|
180
|
+
<tbody>
|
181
|
+
<% Watchdog::Dashboard::Metric.order(run_time: :desc).limit(3).each do |metric| %>
|
182
|
+
<tr>
|
183
|
+
<td><%= metric.description %></td>
|
184
|
+
<td><%= metric.run_time.round(3) %></td>
|
185
|
+
</tr>
|
186
|
+
<% end %>
|
187
|
+
</tbody>
|
188
|
+
</table>
|
189
|
+
</div>
|
190
|
+
<div class="section">
|
191
|
+
<h3>🚨 Top 3 Flaky Tests</h3>
|
192
|
+
<table>
|
193
|
+
<thead>
|
194
|
+
<tr>
|
195
|
+
<th>Description</th>
|
196
|
+
<th>File</th>
|
197
|
+
</tr>
|
198
|
+
</thead>
|
199
|
+
<tbody>
|
200
|
+
<% Watchdog::Dashboard::Metric.where(flaky: true).order(created_at: :desc).limit(3).each do |flaky| %>
|
201
|
+
<tr>
|
202
|
+
<td><%= flaky.description %></td>
|
203
|
+
<td><%= flaky.file_path %></td>
|
204
|
+
</tr>
|
205
|
+
<% end %>
|
206
|
+
</tbody>
|
207
|
+
</table>
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div class="footer">
|
212
|
+
<p>Dashboard <span class="version">v<%= Watchdog::Dashboard::VERSION %>-alpha</span> | Data refreshed every 6 hours |
|
213
|
+
<a href="#">Configure alerts</a> |
|
214
|
+
<a href="#">Export data</a>
|
215
|
+
</p>
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
</body>
|
219
|
+
</html>
|
@@ -0,0 +1,263 @@
|
|
1
|
+
<style>
|
2
|
+
.container {
|
3
|
+
max-width: 1200px;
|
4
|
+
margin: 0 auto;
|
5
|
+
padding: 32px;
|
6
|
+
}
|
7
|
+
.header {
|
8
|
+
display: flex;
|
9
|
+
align-items: center;
|
10
|
+
justify-content: space-between;
|
11
|
+
margin-bottom: 1.5rem;
|
12
|
+
}
|
13
|
+
.title {
|
14
|
+
font-size: 1.875rem;
|
15
|
+
color: rgb(74, 222, 128);
|
16
|
+
}
|
17
|
+
.version {
|
18
|
+
font-size: 0.875rem;
|
19
|
+
color: rgb(156, 163, 175);
|
20
|
+
margin-left: 0.5rem;
|
21
|
+
}
|
22
|
+
.last-scan {
|
23
|
+
background-color: rgba(31, 41, 55, 0.7);
|
24
|
+
padding: 0.25rem 0.75rem;
|
25
|
+
border-radius: 0.375rem;
|
26
|
+
border-left: 2px solid rgb(239, 68, 68);
|
27
|
+
font-size: 0.75rem;
|
28
|
+
}
|
29
|
+
.last-scan-time {
|
30
|
+
color: rgb(250, 204, 21);
|
31
|
+
}
|
32
|
+
.summary-grid {
|
33
|
+
display: grid;
|
34
|
+
grid-template-columns: repeat(4, 1fr);
|
35
|
+
gap: 1.5rem;
|
36
|
+
margin-bottom: 2rem;
|
37
|
+
}
|
38
|
+
.summary-card {
|
39
|
+
background-color: rgba(31, 41, 55, 0.8);
|
40
|
+
padding: 1rem;
|
41
|
+
border-radius: 0.5rem;
|
42
|
+
border: 1px solid rgb(55, 65, 81);
|
43
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
44
|
+
transition: border-color 0.3s;
|
45
|
+
text-align: center;
|
46
|
+
}
|
47
|
+
.summary-card:hover {
|
48
|
+
border-color: rgb(239, 68, 68);
|
49
|
+
}
|
50
|
+
.summary-card h3 {
|
51
|
+
font-size: 1.25rem;
|
52
|
+
margin-bottom: 0.5rem;
|
53
|
+
color: rgb(248, 113, 113);
|
54
|
+
}
|
55
|
+
.summary-card .value {
|
56
|
+
font-size: 2.25rem;
|
57
|
+
font-weight: 700;
|
58
|
+
margin-bottom: 0.5rem;
|
59
|
+
}
|
60
|
+
.summary-card .trend {
|
61
|
+
font-size: 0.875rem;
|
62
|
+
color: rgb(156, 163, 175);
|
63
|
+
}
|
64
|
+
.content-grid {
|
65
|
+
display: grid;
|
66
|
+
grid-template-columns: 1fr 1fr;
|
67
|
+
gap: 1.5rem;
|
68
|
+
margin-bottom: 2rem;
|
69
|
+
}
|
70
|
+
.section {
|
71
|
+
background-color: rgba(31, 41, 55, 0.8);
|
72
|
+
padding: 1rem;
|
73
|
+
border-radius: 0.5rem;
|
74
|
+
border: 1px solid rgb(55, 65, 81);
|
75
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
76
|
+
}
|
77
|
+
.section h3 {
|
78
|
+
font-size: 1.25rem;
|
79
|
+
margin-bottom: 1rem;
|
80
|
+
color: rgb(250, 204, 21);
|
81
|
+
text-align: center;
|
82
|
+
}
|
83
|
+
.section ul {
|
84
|
+
list-style-type: none;
|
85
|
+
padding: 0;
|
86
|
+
}
|
87
|
+
.section ul li {
|
88
|
+
border-bottom: 1px solid rgb(55, 65, 81);
|
89
|
+
padding: 0.5rem 0;
|
90
|
+
}
|
91
|
+
.section ul li:last-child {
|
92
|
+
border-bottom: none;
|
93
|
+
}
|
94
|
+
table {
|
95
|
+
width: 100%;
|
96
|
+
border-collapse: collapse;
|
97
|
+
font-size: 0.875rem;
|
98
|
+
}
|
99
|
+
table thead tr {
|
100
|
+
border-bottom: 1px solid rgb(55, 65, 81);
|
101
|
+
color: rgb(156, 163, 175);
|
102
|
+
}
|
103
|
+
table tbody tr {
|
104
|
+
border-bottom: 1px solid rgb(55, 65, 81);
|
105
|
+
transition: background-color 0.2s;
|
106
|
+
}
|
107
|
+
table tbody tr:hover {
|
108
|
+
background-color: rgba(127, 29, 29, 0.2);
|
109
|
+
}
|
110
|
+
table th, table td {
|
111
|
+
border: 1px solid rgb(55, 65, 81);
|
112
|
+
padding: 0.5rem 1rem;
|
113
|
+
text-align: left;
|
114
|
+
}
|
115
|
+
.footer {
|
116
|
+
margin-top: 2rem;
|
117
|
+
font-size: 0.75rem;
|
118
|
+
color: rgb(107, 114, 128);
|
119
|
+
text-align: center;
|
120
|
+
}
|
121
|
+
.footer a {
|
122
|
+
color: rgb(96, 165, 250);
|
123
|
+
text-decoration: none;
|
124
|
+
transition: color 0.2s;
|
125
|
+
}
|
126
|
+
.footer a:hover {
|
127
|
+
color: rgb(248, 113, 113);
|
128
|
+
}
|
129
|
+
.warning {
|
130
|
+
text-align: center;
|
131
|
+
color: #e74c3c;
|
132
|
+
margin: 30px 0;
|
133
|
+
font-size: 1.25rem;
|
134
|
+
}
|
135
|
+
.percentile-list li {
|
136
|
+
display: flex;
|
137
|
+
justify-content: space-between;
|
138
|
+
padding: 0.25rem 0;
|
139
|
+
}
|
140
|
+
</style>
|
141
|
+
</head>
|
142
|
+
<body>
|
143
|
+
<div class="container">
|
144
|
+
<div class="header">
|
145
|
+
<div>
|
146
|
+
<span class="title">🔍 Rspec Watchdog Dashboard</span>
|
147
|
+
<span class="version">v<%= Watchdog::Dashboard::VERSION %>-alpha</span>
|
148
|
+
</div>
|
149
|
+
<div class="last-scan">
|
150
|
+
Last scan: <span class="last-scan-time"><%= Time.current.strftime('%Y-%m-%d %H:%M:%S UTC') %></span>
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div class="summary-grid">
|
155
|
+
<div class="summary-card">
|
156
|
+
<h3>📊 Total Tests</h3>
|
157
|
+
<div class="value"><%= @total_tests %></div>
|
158
|
+
<div class="trend">All Tests</div>
|
159
|
+
</div>
|
160
|
+
<div class="summary-card">
|
161
|
+
<h3>✅ Passed Tests</h3>
|
162
|
+
<div class="value"><%= @passed_percentage %>%</div>
|
163
|
+
<div class="trend">Passing Rate</div>
|
164
|
+
</div>
|
165
|
+
<div class="summary-card">
|
166
|
+
<h3>🕒 Avg Execution</h3>
|
167
|
+
<div class="value"><%= sprintf('%.4f', @average_time) %>s</div>
|
168
|
+
<div class="trend">Test Duration</div>
|
169
|
+
</div>
|
170
|
+
<div class="summary-card">
|
171
|
+
<h3>❌ Failed Tests</h3>
|
172
|
+
<div class="value"><%= @failed_percentage %>%</div>
|
173
|
+
<div class="trend">Failure Rate</div>
|
174
|
+
</div>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
<% if @failed_tests.any? %>
|
178
|
+
<div class="warning">❌ Failed Tests Detected ❌</div>
|
179
|
+
<% end %>
|
180
|
+
|
181
|
+
<div class="content-grid">
|
182
|
+
<div class="section">
|
183
|
+
<h3>⚡ Fastest vs 🐢 Slowest Test</h3>
|
184
|
+
<ul>
|
185
|
+
<li>
|
186
|
+
<strong>Fastest Test:</strong>
|
187
|
+
<%= @fastest_test.description %>
|
188
|
+
(Time: <%= sprintf('%.4f', @fastest_test.run_time) %> s)
|
189
|
+
</li>
|
190
|
+
<li>
|
191
|
+
<strong>Slowest Test:</strong>
|
192
|
+
<%= @slowest_test.description %>
|
193
|
+
(Time: <%= sprintf('%.4f', @slowest_test.run_time) %> s)
|
194
|
+
</li>
|
195
|
+
</ul>
|
196
|
+
</div>
|
197
|
+
<div class="section">
|
198
|
+
<h3>📊 Time Distribution</h3>
|
199
|
+
<ul>
|
200
|
+
<% @time_distribution_analysis.each do |category, count| %>
|
201
|
+
<li><%= category %>: <%= count %> tests</li>
|
202
|
+
<% end %>
|
203
|
+
</ul>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div class="content-grid">
|
208
|
+
<div class="section percentile-list">
|
209
|
+
<h3>📈 Execution Time Percentiles</h3>
|
210
|
+
<ul>
|
211
|
+
<% @percentiles.each do |percentile| %>
|
212
|
+
<li>
|
213
|
+
<span><%= percentile[:percentile] %>% Percentile</span>
|
214
|
+
<span><%= sprintf('%.4f', percentile[:run_time]) %> s</span>
|
215
|
+
</li>
|
216
|
+
<% end %>
|
217
|
+
</ul>
|
218
|
+
</div>
|
219
|
+
<div class="section">
|
220
|
+
<h3>❌ Failed Tests Details</h3>
|
221
|
+
<ul>
|
222
|
+
<% @failed_tests.each do |test| %>
|
223
|
+
<li>
|
224
|
+
<%= test.description %>
|
225
|
+
(File: <%= test.file_path %>,
|
226
|
+
Location: <%= test.location %>)
|
227
|
+
</li>
|
228
|
+
<% end %>
|
229
|
+
</ul>
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
<div class="section">
|
234
|
+
<h3>📊 Detailed Test Metrics</h3>
|
235
|
+
<table>
|
236
|
+
<thead>
|
237
|
+
<tr>
|
238
|
+
<th>Description</th>
|
239
|
+
<th>File</th>
|
240
|
+
<th>Location</th>
|
241
|
+
<th>Execution Time (s)</th>
|
242
|
+
</tr>
|
243
|
+
</thead>
|
244
|
+
<tbody>
|
245
|
+
<% @metrics.each do |metric| %>
|
246
|
+
<tr>
|
247
|
+
<td><%= metric.description %></td>
|
248
|
+
<td><%= metric.file_path %></td>
|
249
|
+
<td><%= metric.location %></td>
|
250
|
+
<td><%= sprintf('%.4f', metric.run_time) %></td>
|
251
|
+
</tr>
|
252
|
+
<% end %>
|
253
|
+
</tbody>
|
254
|
+
</table>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
<div class="footer">
|
258
|
+
<p>Dashboard <span class="version">v<%= Watchdog::Dashboard::VERSION %>-alpha</span> | Data refreshed every 6 hours |
|
259
|
+
<a href="#">Configure alerts</a> |
|
260
|
+
<a href="#">Export data</a>
|
261
|
+
</p>
|
262
|
+
</div>
|
263
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile += %w( watchdog/dashboard/application.css watchdog/dashboard/application.js )
|
data/config/routes.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
Watchdog::Dashboard::Engine.routes.draw do
|
2
|
+
get "dashboard/index"
|
3
|
+
get "metrics", to: "dashboard#metrics"
|
4
|
+
get "flakies", to: "dashboard#flakies"
|
5
|
+
get "historic", to: "dashboard#historic"
|
6
|
+
|
7
|
+
root to: "dashboard#index"
|
8
|
+
|
9
|
+
post "/analytics", to: "metrics#analytics"
|
10
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateWatchdogDashboardMetrics < ActiveRecord::Migration[7.2]
|
2
|
+
def change
|
3
|
+
create_table :watchdog_dashboard_metrics do |t|
|
4
|
+
t.string :description
|
5
|
+
t.string :file_path
|
6
|
+
t.string :location
|
7
|
+
t.float :run_time
|
8
|
+
t.string :status
|
9
|
+
t.text :error_message
|
10
|
+
t.boolean :flaky
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "watchdog/dashboard/version"
|
2
|
+
require "watchdog/dashboard/engine"
|
3
|
+
|
4
|
+
module Watchdog
|
5
|
+
module Dashboard
|
6
|
+
class << self
|
7
|
+
attr_accessor :config
|
8
|
+
|
9
|
+
def configure
|
10
|
+
self.config ||= Configuration.new
|
11
|
+
yield(config) if block_given?
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Configuration
|
16
|
+
attr_accessor :watchdog_api_url, :watchdog_api_token
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: watchdog-dashboard
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Federico Aldunate
|
8
|
+
- Agustin Fornio
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2025-04-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 7.2.2.1
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 7.2.2.1
|
28
|
+
description: 'Dashboard: Track RSpec test performance, identify slow tests, and generate
|
29
|
+
metrics'
|
30
|
+
email:
|
31
|
+
- agus16.7@hotmail.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- MIT-LICENSE
|
37
|
+
- README.md
|
38
|
+
- Rakefile
|
39
|
+
- app/assets/config/watchdog_dashboard_manifest.js
|
40
|
+
- app/assets/stylesheets/watchdog/dashboard/application.css
|
41
|
+
- app/controllers/concerns/flaky_stats.rb
|
42
|
+
- app/controllers/concerns/metric_stats.rb
|
43
|
+
- app/controllers/watchdog/dashboard/application_controller.rb
|
44
|
+
- app/controllers/watchdog/dashboard/dashboard_controller.rb
|
45
|
+
- app/controllers/watchdog/dashboard/metrics_controller.rb
|
46
|
+
- app/helpers/watchdog/dashboard/application_helper.rb
|
47
|
+
- app/helpers/watchdog/dashboard/dashboard_helper.rb
|
48
|
+
- app/helpers/watchdog/dashboard/metrics_helper.rb
|
49
|
+
- app/jobs/watchdog/dashboard/application_job.rb
|
50
|
+
- app/mailers/watchdog/dashboard/application_mailer.rb
|
51
|
+
- app/models/watchdog/dashboard/application_record.rb
|
52
|
+
- app/models/watchdog/dashboard/metric.rb
|
53
|
+
- app/views/layouts/watchdog/dashboard/application.html.erb
|
54
|
+
- app/views/watchdog/dashboard/dashboard/_sidebar.html.erb
|
55
|
+
- app/views/watchdog/dashboard/dashboard/flakies.html.erb
|
56
|
+
- app/views/watchdog/dashboard/dashboard/historic.html.erb
|
57
|
+
- app/views/watchdog/dashboard/dashboard/index.html.erb
|
58
|
+
- app/views/watchdog/dashboard/dashboard/metrics.html.erb
|
59
|
+
- config/initializers/assets.rb
|
60
|
+
- config/routes.rb
|
61
|
+
- db/migrate/20250331204354_create_watchdog_dashboard_metrics.rb
|
62
|
+
- lib/tasks/watchdog/dashboard_tasks.rake
|
63
|
+
- lib/watchdog/dashboard.rb
|
64
|
+
- lib/watchdog/dashboard/engine.rb
|
65
|
+
- lib/watchdog/dashboard/version.rb
|
66
|
+
homepage: https://github.com/windmotion-io/watchdog-dashboard
|
67
|
+
licenses:
|
68
|
+
- MIT
|
69
|
+
metadata:
|
70
|
+
homepage_uri: https://github.com/windmotion-io/watchdog-dashboard
|
71
|
+
source_code_uri: https://github.com/windmotion-io/rspec-watchdog.
|
72
|
+
changelog_uri: https://github.com/windmotion-io/rspec-watchdog.
|
73
|
+
post_install_message:
|
74
|
+
rdoc_options: []
|
75
|
+
require_paths:
|
76
|
+
- lib
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
requirements: []
|
88
|
+
rubygems_version: 3.3.7
|
89
|
+
signing_key:
|
90
|
+
specification_version: 4
|
91
|
+
summary: Dashboard for RSpec performance tracking and metrics
|
92
|
+
test_files: []
|