motor-admin 0.1.32 → 0.1.33
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/app/controllers/motor/data_controller.rb +4 -0
- data/app/models/motor/query.rb +8 -0
- data/lib/motor.rb +0 -1
- data/lib/motor/admin.rb +8 -1
- data/lib/motor/build_schema.rb +2 -2
- data/lib/motor/version.rb +1 -1
- data/ui/dist/{main-eea896c6f0ede15495f0.css.gz → main-b3096c53c77bd4641e52.css.gz} +0 -0
- data/ui/dist/main-b3096c53c77bd4641e52.js.gz +0 -0
- data/ui/dist/manifest.json +5 -5
- metadata +3 -3
- data/ui/dist/main-eea896c6f0ede15495f0.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: 51ebe00c16e1c384a460c6a6b11339c967fbff8b80c0096cb9471abb9082d43c
|
4
|
+
data.tar.gz: 16324c84044ff120d90a5b6955fd7d5cc165e1ec547fe06a69315efc228e17be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29a38abca31cf14b81ea6cedbfdb62bf0e7a6c04e6890c32dd28c3be6a17033b24e4d9fc69f265f4abd816a7660907cde10b5fae0d6e5098d6f7e9c385190440
|
7
|
+
data.tar.gz: c03e22ec45ded369d732b0a59f6035dc8579764d75016161eb294f517b9d714db4485057fae41f54309b2ca03f81daa684147c125ba5c3fb35696e52f91eb4ce
|
@@ -86,6 +86,8 @@ module Motor
|
|
86
86
|
self,
|
87
87
|
options
|
88
88
|
).load_and_authorize_resource
|
89
|
+
rescue ActiveRecord::RecordNotFound
|
90
|
+
head :not_found
|
89
91
|
rescue StandardError => e
|
90
92
|
render json: { errors: [e.message] }, status: :unprocessable_entity
|
91
93
|
end
|
@@ -107,6 +109,8 @@ module Motor
|
|
107
109
|
else
|
108
110
|
render json: { message: 'Unknown association' }, status: :not_found
|
109
111
|
end
|
112
|
+
rescue ActiveRecord::RecordNotFound
|
113
|
+
head :not_found
|
110
114
|
rescue StandardError => e
|
111
115
|
render json: { errors: [e.message] }, status: :unprocessable_entity
|
112
116
|
end
|
data/app/models/motor/query.rb
CHANGED
@@ -10,5 +10,13 @@ module Motor
|
|
10
10
|
serialize :preferences, HashSerializer
|
11
11
|
|
12
12
|
scope :active, -> { where(deleted_at: nil) }
|
13
|
+
|
14
|
+
def result(variables_hash = {})
|
15
|
+
result = Motor::Queries::RunQuery.call(self, variables_hash: variables_hash)
|
16
|
+
column_names = result.columns.pluck(:name)
|
17
|
+
|
18
|
+
result.data.map { |row| column_names.zip(row).to_h }
|
19
|
+
end
|
20
|
+
alias run result
|
13
21
|
end
|
14
22
|
end
|
data/lib/motor.rb
CHANGED
data/lib/motor/admin.rb
CHANGED
@@ -15,9 +15,16 @@ module Motor
|
|
15
15
|
end
|
16
16
|
|
17
17
|
puts
|
18
|
-
puts "⚡ Motor
|
18
|
+
puts "⚡ Motor::Admin is starting under #{url}"
|
19
|
+
else
|
19
20
|
puts
|
21
|
+
puts '⚠️ Motor::Admin is not mounted.'
|
22
|
+
puts 'Add the following line to your config/routes.rb:'
|
23
|
+
puts
|
24
|
+
puts " mount Motor::Admin => '/admin'"
|
20
25
|
end
|
26
|
+
|
27
|
+
puts
|
21
28
|
end
|
22
29
|
end
|
23
30
|
|
data/lib/motor/build_schema.rb
CHANGED
data/lib/motor/version.rb
CHANGED
Binary file
|
Binary file
|
data/ui/dist/manifest.json
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
"fonts/ionicons.ttf?v=3.0.0-alpha.3": "fonts/ionicons.ttf",
|
6
6
|
"fonts/ionicons.woff2?v=3.0.0-alpha.3": "fonts/ionicons.woff2",
|
7
7
|
"fonts/ionicons.woff?v=3.0.0-alpha.3": "fonts/ionicons.woff",
|
8
|
-
"main-
|
9
|
-
"main-
|
10
|
-
"main-
|
11
|
-
"main.css": "main-
|
12
|
-
"main.js": "main-
|
8
|
+
"main-b3096c53c77bd4641e52.css.gz": "main-b3096c53c77bd4641e52.css.gz",
|
9
|
+
"main-b3096c53c77bd4641e52.js.LICENSE.txt": "main-b3096c53c77bd4641e52.js.LICENSE.txt",
|
10
|
+
"main-b3096c53c77bd4641e52.js.gz": "main-b3096c53c77bd4641e52.js.gz",
|
11
|
+
"main.css": "main-b3096c53c77bd4641e52.css",
|
12
|
+
"main.js": "main-b3096c53c77bd4641e52.js"
|
13
13
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motor-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Matsyburka
|
@@ -214,8 +214,8 @@ files:
|
|
214
214
|
- lib/motor/ui_configs.rb
|
215
215
|
- lib/motor/version.rb
|
216
216
|
- ui/dist/fonts/ionicons.woff2
|
217
|
-
- ui/dist/main-
|
218
|
-
- ui/dist/main-
|
217
|
+
- ui/dist/main-b3096c53c77bd4641e52.css.gz
|
218
|
+
- ui/dist/main-b3096c53c77bd4641e52.js.gz
|
219
219
|
- ui/dist/manifest.json
|
220
220
|
homepage:
|
221
221
|
licenses:
|
Binary file
|