effective_logging 3.5.0 → 3.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/datatables/effective_logs_datatable.rb +13 -9
- data/app/views/admin/logs/_layout.html.haml +2 -0
- data/app/views/admin/logs/index.html.haml +3 -2
- data/app/views/admin/logs/show.html.haml +3 -3
- data/app/views/effective/logs/_layout.html.haml +2 -0
- data/app/views/effective/logs/index.html.haml +3 -2
- data/app/views/effective/logs/show.html.haml +3 -2
- data/lib/effective_logging/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b81776db6f7702a3fedb2be7363c9a1ffd97ccc5656a3f5dd57c1c35801c7150
|
4
|
+
data.tar.gz: 6446b273934c9c481bb537e68381c61bb4751c46433b726f0666f5cc5fbbd1ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05f8f12e77b0b430e78a8d2345e99e458bd298b48fb3aa43043aead349d3cc61a012a54f0d29a303fa4fb3a1e8f80a5c7b52a01b4432db94e46f9210bbaf938a
|
7
|
+
data.tar.gz: ea74b3b8b19c3539ea73c966df52d677a768e552ff468e7cf8fcb049a22c9a3d24df2bdee4c0a5ad8d65b1e08e11a99652f46d1007295c392e41337122334348
|
@@ -8,26 +8,30 @@ class EffectiveLogsDatatable < Effective::Datatable
|
|
8
8
|
if attributes[:user] == false
|
9
9
|
# Do not include
|
10
10
|
else
|
11
|
-
col
|
11
|
+
col(:user, search: :string).search do |collection, term, column, sql_column|
|
12
|
+
klass = current_user.class
|
13
|
+
users = Effective::Resource.new(klass).search_any(term, columns: [:first_name, :middle_name, :last_name, :name, :email])
|
14
|
+
collection.where(user_type: klass.name, user_id: users)
|
15
|
+
end.sort do |collection, direction, column, sql_column|
|
16
|
+
collection.order(user_id: direction)
|
17
|
+
end
|
12
18
|
end
|
13
19
|
|
14
20
|
unless attributes[:status] == false
|
15
|
-
col :status, search: { collection: EffectiveLogging.statuses }
|
21
|
+
col :status, search: { collection: EffectiveLogging.statuses, fuzzy: false }
|
16
22
|
end
|
17
23
|
|
18
|
-
col :changes_to_type, visible: false
|
19
|
-
col :changes_to_id, visible: false
|
24
|
+
col :changes_to_type, visible: false, sort: false
|
25
|
+
col :changes_to_id, visible: false, sort: false
|
20
26
|
|
21
|
-
col :associated_type, visible: false
|
22
|
-
col :associated_id, visible: false, label: 'Associated Id'
|
27
|
+
col :associated_type, visible: false, sort: false
|
28
|
+
col :associated_id, visible: false, label: 'Associated Id', sort: false
|
23
29
|
col :associated_to_s, label: 'Associated'
|
24
30
|
|
25
|
-
col :message do |log|
|
31
|
+
col :message, sort: false do |log|
|
26
32
|
(log.message || '').gsub("\n", '<br>')
|
27
33
|
end
|
28
34
|
|
29
|
-
col :logs_count, visible: false
|
30
|
-
|
31
35
|
col :details, visible: false, sort: false do |log|
|
32
36
|
tableize_hash(log.details.except(:email))
|
33
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -100,8 +100,10 @@ files:
|
|
100
100
|
- app/models/concerns/acts_as_loggable.rb
|
101
101
|
- app/models/effective/log.rb
|
102
102
|
- app/models/effective_logger.rb
|
103
|
+
- app/views/admin/logs/_layout.html.haml
|
103
104
|
- app/views/admin/logs/index.html.haml
|
104
105
|
- app/views/admin/logs/show.html.haml
|
106
|
+
- app/views/effective/logs/_layout.html.haml
|
105
107
|
- app/views/effective/logs/_log.html.haml
|
106
108
|
- app/views/effective/logs/index.html.haml
|
107
109
|
- app/views/effective/logs/show.html.haml
|