Skip to content

Commit 35270a4

Browse files
small ui improvements
1 parent 07c7b1b commit 35270a4

File tree

15 files changed

+125
-15
lines changed

15 files changed

+125
-15
lines changed

.github/workflows/ruby.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
4646
# change this to (see https://github.com/ruby/setup-ruby#versioning):
4747
# uses: ruby/setup-ruby@v1
48-
uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f
48+
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc
4949
with:
5050
ruby-version: ${{ matrix.ruby-version }}
5151
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
- Unreleased
22

3+
- 1.4.3
4+
- Parameterize resources charts https://github.com/igorkasyanchuk/rails_performance/pull/134
5+
- added more icons
6+
- wider summary panel
7+
38
- 1.4.2
49
- Filter out slow requests with no duration set https://github.com/igorkasyanchuk/rails_performance/pull/138
510
- fix: handle Hash input in extract_duration to prevent =~ error on traces https://github.com/igorkasyanchuk/rails_performance/pull/137

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
rails_performance (1.4.2)
4+
rails_performance (1.4.3)
55
browser
66
railties
77
redis
@@ -270,7 +270,7 @@ GEM
270270
docile (~> 1.1)
271271
simplecov-html (~> 0.11)
272272
simplecov_json_formatter (~> 0.1)
273-
simplecov-html (0.13.1)
273+
simplecov-html (0.13.2)
274274
simplecov_json_formatter (0.1.4)
275275
sprockets (4.2.1)
276276
concurrent-ruby (~> 1.0)

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,15 @@ The idea of this gem grew from curiosity how many RPM my app receiving per day.
324324
- sinatra?
325325
- tests to check what is actually stored in redis db after request
326326
- upgrade bulma
327+
- optimize svg icons, remove inline svg (switch to base64 or assets)
328+
329+
## Development
330+
331+
1. Clone the repo
332+
2. Run `bundle install`
333+
3. Setup dummy app `cd test/dummy && bundle install && rails db:create && rails db:migrate`
334+
4. Run `rails s` in the root folder
335+
5. Run `rails test` to run tests
327336

328337
## Contributing
329338

app/assets/images/details.svg

Lines changed: 3 additions & 0 deletions
Loading

app/assets/images/external.svg

Lines changed: 1 addition & 0 deletions
Loading

app/views/rails_performance/javascripts/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ function showChart(element_id, type, title, options) {
66
chart: {
77
type: type,
88
height: 300,
9+
width: '100%',
910
zoom: {
1011
type: 'x',
1112
},

app/views/rails_performance/rails_performance/_recent_row.html.erb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,24 @@
99
<td><%= format_datetime e[:datetime] %></td>
1010
<td>
1111
<% controller_action_info = e[:controller] + '#' + e[:action]%>
12-
<%= link_to truncate(controller_action_info, length: 40), rails_performance.rails_performance_summary_path({controller_eq: e[:controller], action_eq: e[:action]}), remote: true, title: controller_action_info %>
12+
<%= link_to rails_performance.rails_performance_summary_path({controller_eq: e[:controller], action_eq: e[:action]}), remote: true, title: controller_action_info do %>
13+
<span class="details_icon">
14+
<%= icon 'details' %>
15+
</span>
16+
<%= truncate(controller_action_info, length: 40) %>
17+
<% end %>
1318
</td>
1419
<td><%= e[:method] %></td>
1520
<td><%= e[:format] %></td>
1621
<td><%= bot_icon e["user_agent"] %></td>
17-
<td><%= link_to_path(e) %></td>
22+
<td>
23+
<span class="with_external_icon">
24+
<%= link_to_path(e) %>
25+
<span class="icon external_icon">
26+
<%= icon('external') %>
27+
</span>
28+
</span>
29+
</td>
1830
<td><%= status_tag e[:status] %></td>
1931
<td class="nowrap"><%= ms e[:duration] %></td>
2032
<td class="nowrap"><%= ms e[:view_runtime] %></td>

app/views/rails_performance/rails_performance/_summary.html.erb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div id="response_time_report_chart_mini" class="chart_mini"></div>
66

77
<h2 class="subtitle"><%= title %></h2>
8-
<table class="table is-fullwidth is-hoverable is-narrow is-size-9">
8+
<table class="table is-fullwidth is-hoverable is-narrow is-size-8">
99
<thead>
1010
<tr>
1111
<th data-sort="string">Datetime</th>
@@ -25,7 +25,14 @@
2525
<td><%= format_datetime e[:datetime] %></td>
2626
<td><%= e[:method] %></td>
2727
<td><%= bot_icon e["user_agent"] %></td>
28-
<td><%= link_to_path(e) %></td>
28+
<td>
29+
<span class="with_external_icon">
30+
<%= link_to_path(e) %>
31+
<span class="icon external_icon">
32+
<%= icon('external') %>
33+
</span>
34+
</span>
35+
</td>
2936
<td><%= e[:format] %></td>
3037
<td><%= status_tag e[:status] %></td>
3138
<td class="nowrap"><%= ms e[:duration] %></td>

app/views/rails_performance/rails_performance/crashes.html.erb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,25 @@
3535
<% @data.each do |e| %>
3636
<tr>
3737
<td><%= format_datetime e[:datetime] %></td>
38-
<td><%= link_to e[:controller] + '#' + e[:action], rails_performance.rails_performance_summary_path({controller_eq: e[:controller], action_eq: e[:action]}), remote: true %></td>
38+
<td>
39+
<%= link_to rails_performance.rails_performance_summary_path({controller_eq: e[:controller], action_eq: e[:action]}), remote: true do %>
40+
<span class="details_icon">
41+
<%= icon 'details' %>
42+
</span>
43+
<%= e[:controller] + '#' + e[:action] %>
44+
<% end %>
45+
</td>
3946
<td><%= e[:method] %></td>
4047
<td><%= e[:format] %></td>
4148
<td><%= bot_icon e["user_agent"] %></td>
42-
<td><%= link_to_path(e) %></td>
49+
<td>
50+
<span class="with_external_icon">
51+
<%= link_to_path(e) %>
52+
<span class="icon external_icon">
53+
<%= icon('external') %>
54+
</span>
55+
</span>
56+
</td>
4357
<td><%= e[:exception] %></td>
4458
<td class="very-small-text">
4559
<%= raw e[:backtrace]&.join("<br/>") %>

0 commit comments

Comments
 (0)