effective_logging 3.5.0 → 3.5.1
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/lib/effective_logging/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5019a8c1d47713eb61c59d6241d6c64517fdf512e80ec508048a9a87a27404a
|
4
|
+
data.tar.gz: 1145e529b40bf909ea60df6af22ded27459ce376c0b674cb3311d2d775901161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb500c434341914ce32bf2e39e0e977db957aaee656a0a7f4d8df7eb4d7f1fca30593ce6b85de1dbde23864846f3941f191e65b7b828fee2a2cd5cceb1882dc9
|
7
|
+
data.tar.gz: 3b84818babf85513db6260069e74f1cd7575888efc667070413083f80bbe7e7a2371a58d651f67f75785c85592c702f3db01e206edf7af7abfc252f6aadd881a
|
@@ -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.1
|
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-10-
|
11
|
+
date: 2022-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|