notable_web 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83db2dcf6fc00691e60ca86c55c4b03e5817360d413ecc3220dd23719e2b2ed4
|
4
|
+
data.tar.gz: 93f464e993be043de1b36928e9607dd192c17ce464dfe21f67092e2e790e2ac4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fae7b69eb9cace5dc38a9df81364b8b6728c41e4468e7b72f1fbc9d8be5a62aa6a2dac258ba83a77ba9872ae8ac06bd850aff16c64ebd6ab60f28f9900bf073d
|
7
|
+
data.tar.gz: b701d080fef88f746e613a4416e1712904d3edd7704d1778e2823b1e30c258b3f48139b8eaa7ac6cddb4582472665c7225c0c15a5904c4ea7d552147fe007a64
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,16 @@
|
|
1
|
-
## 0.1.
|
1
|
+
## 0.1.2 (2019-12-23)
|
2
|
+
|
3
|
+
- Fixed error with Rails 6
|
4
|
+
|
5
|
+
## 0.1.1 (2019-10-27)
|
2
6
|
|
3
7
|
- Added support for Sprockets 4
|
4
8
|
|
5
|
-
## 0.1.0
|
9
|
+
## 0.1.0 (2019-05-28)
|
6
10
|
|
7
11
|
- Fixed errors with Rails 5 and 6
|
8
12
|
- Dropped support for Rails < 5
|
9
13
|
|
10
|
-
## 0.0.1
|
14
|
+
## 0.0.1 (2014-12-22)
|
11
15
|
|
12
16
|
- First release
|
@@ -7,9 +7,7 @@ module NotableWeb
|
|
7
7
|
http_basic_authenticate_with name: ENV["NOTABLE_USERNAME"], password: ENV["NOTABLE_PASSWORD"] if ENV["NOTABLE_PASSWORD"]
|
8
8
|
|
9
9
|
def index
|
10
|
-
|
11
|
-
|
12
|
-
where = @safe_params.slice(:status, :note_type, :note, :user_id, :user_type)
|
10
|
+
where = safe_params.slice(:status, :note_type, :note, :user_id, :user_type)
|
13
11
|
where = {notable_requests: where} if where.any?
|
14
12
|
|
15
13
|
page_method_name = Kaminari.config.page_method_name
|
@@ -71,5 +69,9 @@ module NotableWeb
|
|
71
69
|
Notable::Request.where("action IS NOT NULL AND (status = 503 OR note_type = 'Slow Request')")
|
72
70
|
end
|
73
71
|
|
72
|
+
def safe_params
|
73
|
+
params.slice(:status, :note_type, :note, :user_id, :user_type, :action_name, :status, :scope).permit!.to_h
|
74
|
+
end
|
75
|
+
helper_method :safe_params
|
74
76
|
end
|
75
77
|
end
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<%= request.note %>
|
12
12
|
<span style="color: #999;"><%= request.action %></span>
|
13
13
|
<% if request.user and show_user %>
|
14
|
-
<%= link_to NotableWeb.user_name_method.call(request.user),
|
14
|
+
<%= link_to NotableWeb.user_name_method.call(request.user), safe_params.slice(:status, :note_type, :scope).merge(user_id: request.user_id, user_type: request.user_type) %>
|
15
15
|
<% end %>
|
16
16
|
<% if params[:scope] == "referrer" %>
|
17
17
|
<br /><%= link_to nil, request.referrer, target: "_blank" %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<tr>
|
15
15
|
<td>
|
16
16
|
<%= agg.note %> <span style="color: #999;"><%= agg.action %></span>
|
17
|
-
<%= link_to "view",
|
17
|
+
<%= link_to "view", safe_params.merge(note: agg.note, action_name: agg.action) %>
|
18
18
|
</td>
|
19
19
|
<td style="text-align: right;"><%= agg.count_user %></td>
|
20
20
|
<td style="text-align: right;"><%= agg.count_all %></td>
|
@@ -31,8 +31,8 @@
|
|
31
31
|
<%= render partial: "stream", locals: {requests: @requests, show_user: !(params[:user_id] && params[:user_type])} %>
|
32
32
|
|
33
33
|
<% if @requests.current_page != 1 %>
|
34
|
-
<%= link_to "Prev",
|
34
|
+
<%= link_to "Prev", safe_params.merge(page: @requests.current_page - 1), style: "margin-right: 20px;" %>
|
35
35
|
<% end %>
|
36
36
|
<% if @requests.size == @requests.limit_value %>
|
37
|
-
<%= link_to "Next",
|
37
|
+
<%= link_to "Next", safe_params.merge(page: @requests.current_page + 1) %>
|
38
38
|
<% end %>
|
data/lib/notable_web/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notable_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|