motor-admin 0.2.39 → 0.2.41
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 +4 -4
- data/config/locales/en.yml +3 -0
- data/config/locales/es.yml +3 -0
- data/config/locales/pt.yml +3 -0
- data/lib/motor/api_query/apply_scope.rb +11 -1
- data/lib/motor/queries/run_query.rb +3 -1
- data/lib/motor/resources/fetch_configured_model.rb +1 -1
- data/lib/motor/version.rb +1 -1
- data/ui/dist/main-f7a83db6d8381e2638a1.css.gz +0 -0
- data/ui/dist/main-f7a83db6d8381e2638a1.js.gz +0 -0
- data/ui/dist/manifest.json +5 -5
- metadata +4 -4
- data/ui/dist/main-01a5fc164f7a205535b6.css.gz +0 -0
- data/ui/dist/main-01a5fc164f7a205535b6.js.gz +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a51c13e10df9707cb2130c580660133d07a543c55e97157ebe8660099ff602e6
|
|
4
|
+
data.tar.gz: 81a887350a6fec48cae6fa7c0d74d1efaae29456685e7d2bb63d8347d6aab7e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9d5172d6d3014145c39f3640def2f7dbedf4b79dd0c2021562933d6da5caff0430f95334a30cb8c3fed6afa884753d1bd268cf28f8171fe9e03fc3d755d1049
|
|
7
|
+
data.tar.gz: 8a56bce2407c3314d41ecb5d977e275da6b36fd40ac41468912ded8d02b386f3af27b4410e1be0e6c4b4c6b99736239326c663f4aadac4b9f5e30c5bcf30c2f3
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/pt.yml
CHANGED
|
@@ -26,7 +26,17 @@ module Motor
|
|
|
26
26
|
|
|
27
27
|
return rel unless scope_configs
|
|
28
28
|
|
|
29
|
-
ApiQuery::Filter.call(rel, scope_configs[:preferences][:filter])
|
|
29
|
+
rel = ApiQuery::Filter.call(rel, scope_configs[:preferences][:filter])
|
|
30
|
+
|
|
31
|
+
apply_order(rel, scope_configs[:preferences][:sort])
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def apply_order(rel, params)
|
|
35
|
+
return rel if params.blank?
|
|
36
|
+
|
|
37
|
+
sort_key, sort_order = params.values_at(:key, :order)
|
|
38
|
+
|
|
39
|
+
rel.order(sort_key => sort_order)
|
|
30
40
|
end
|
|
31
41
|
end
|
|
32
42
|
end
|
|
@@ -194,7 +194,9 @@ module Motor
|
|
|
194
194
|
def normalize_statement_for_sql(statement)
|
|
195
195
|
sql, _, attributes = statement
|
|
196
196
|
|
|
197
|
-
sql = ActiveRecord::Base.
|
|
197
|
+
sql = ActiveRecord::Base.send(:replace_bind_variables,
|
|
198
|
+
sql.gsub(STATEMENT_VARIABLE_REGEXP, '?'),
|
|
199
|
+
attributes.map(&:value))
|
|
198
200
|
|
|
199
201
|
[sql, 'SQL', attributes]
|
|
200
202
|
end
|
|
@@ -41,7 +41,7 @@ module Motor
|
|
|
41
41
|
def define_default_scope(klass, config)
|
|
42
42
|
return klass if config[:custom_sql].blank?
|
|
43
43
|
|
|
44
|
-
klass.instance_variable_set(:@__motor_custom_sql, config[:custom_sql].squish)
|
|
44
|
+
klass.instance_variable_set(:@__motor_custom_sql, config[:custom_sql].squish.delete_suffix(';'))
|
|
45
45
|
|
|
46
46
|
klass.instance_eval do
|
|
47
47
|
default_scope do
|
data/lib/motor/version.rb
CHANGED
|
Binary file
|
|
Binary file
|
data/ui/dist/manifest.json
CHANGED
|
@@ -2601,9 +2601,9 @@
|
|
|
2601
2601
|
"icons/zoom-out.svg.gz": "icons/zoom-out.svg.gz",
|
|
2602
2602
|
"icons/zoom-question.svg": "icons/zoom-question.svg",
|
|
2603
2603
|
"icons/zoom-question.svg.gz": "icons/zoom-question.svg.gz",
|
|
2604
|
-
"main-
|
|
2605
|
-
"main-
|
|
2606
|
-
"main-
|
|
2607
|
-
"main.css": "main-
|
|
2608
|
-
"main.js": "main-
|
|
2604
|
+
"main-f7a83db6d8381e2638a1.css.gz": "main-f7a83db6d8381e2638a1.css.gz",
|
|
2605
|
+
"main-f7a83db6d8381e2638a1.js.LICENSE.txt": "main-f7a83db6d8381e2638a1.js.LICENSE.txt",
|
|
2606
|
+
"main-f7a83db6d8381e2638a1.js.gz": "main-f7a83db6d8381e2638a1.js.gz",
|
|
2607
|
+
"main.css": "main-f7a83db6d8381e2638a1.css",
|
|
2608
|
+
"main.js": "main-f7a83db6d8381e2638a1.js"
|
|
2609
2609
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: motor-admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.41
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pete Matsyburka
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-12-
|
|
11
|
+
date: 2021-12-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord-filter
|
|
@@ -1526,8 +1526,8 @@ files:
|
|
|
1526
1526
|
- ui/dist/icons/zoom-money.svg.gz
|
|
1527
1527
|
- ui/dist/icons/zoom-out.svg.gz
|
|
1528
1528
|
- ui/dist/icons/zoom-question.svg.gz
|
|
1529
|
-
- ui/dist/main-
|
|
1530
|
-
- ui/dist/main-
|
|
1529
|
+
- ui/dist/main-f7a83db6d8381e2638a1.css.gz
|
|
1530
|
+
- ui/dist/main-f7a83db6d8381e2638a1.js.gz
|
|
1531
1531
|
- ui/dist/manifest.json
|
|
1532
1532
|
homepage:
|
|
1533
1533
|
licenses:
|
|
Binary file
|
|
Binary file
|