smartkiosk-server 0.10.9 → 0.10.10
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.
- data/app/admin/agents.rb +7 -4
- data/app/admin/gateways.rb +7 -1
- data/app/admin/providers.rb +17 -8
- data/app/admin/terminals.rb +14 -8
- data/app/assets/stylesheets/active_admin.css.scss +8 -0
- data/app/views/admin/terminals/pings.html.arb +46 -44
- data/config/deploy.rb +1 -1
- data/config/initializers/active_admin.rb +1 -0
- data/config/locales/active_admin.ru.yml +2 -0
- data/config/locales/activerecord.ru.yml +5 -0
- data/lib/kaminari/array_extension_fix.rb +10 -0
- data/lib/smartkiosk/server/version.rb +1 -1
- data/lib/smartkiosk/server.rb +3 -3
- metadata +5 -4
data/app/admin/agents.rb
CHANGED
@@ -71,10 +71,13 @@ ActiveAdmin.register Agent do
|
|
71
71
|
t.column :provider
|
72
72
|
t.column :created_at
|
73
73
|
end
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
74
|
+
|
75
|
+
div(:class => 'more') do
|
76
|
+
text_node link_to(
|
77
|
+
link_to I18n.t('smartkiosk.full_list'),
|
78
|
+
admin_payments_path(:q => {:agent_id_eq => agent.id})
|
79
|
+
)
|
80
|
+
end
|
78
81
|
end
|
79
82
|
end
|
80
83
|
|
data/app/admin/gateways.rb
CHANGED
@@ -137,7 +137,13 @@ ActiveAdmin.register Gateway do
|
|
137
137
|
t.column :provider
|
138
138
|
t.column :created_at
|
139
139
|
end
|
140
|
-
|
140
|
+
|
141
|
+
div(:class => 'more') do
|
142
|
+
text_node link_to(
|
143
|
+
I18n.t('smartkiosk.full_list'),
|
144
|
+
admin_payments_path(:q => {:gateway_id_eq => gateway.id})
|
145
|
+
)
|
146
|
+
end
|
141
147
|
end
|
142
148
|
|
143
149
|
active_admin_comments
|
data/app/admin/providers.rb
CHANGED
@@ -7,7 +7,7 @@ ActiveAdmin.register Provider do
|
|
7
7
|
|
8
8
|
controller do
|
9
9
|
def scoped_collection
|
10
|
-
Provider.includes(:provider_profile)
|
10
|
+
Provider.includes(:provider_profile, :gateways)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -34,10 +34,16 @@ ActiveAdmin.register Provider do
|
|
34
34
|
column :icon do |x|
|
35
35
|
image_tag(x.icon.url(:thumb)) unless x.icon.blank?
|
36
36
|
end
|
37
|
-
column :
|
37
|
+
column :title, :sortable => :title do |x|
|
38
|
+
link_to x.title, [:admin, x]
|
39
|
+
end
|
38
40
|
column :keyword
|
39
|
-
column :
|
40
|
-
column :provider_gateways_count
|
41
|
+
column :provider_profile
|
42
|
+
column :provider_gateways_count, :sortable => :provider_gateways_count do |x|
|
43
|
+
x.gateways.map do |g|
|
44
|
+
link_to g.title, [:admin, g]
|
45
|
+
end.join(', ').html_safe
|
46
|
+
end
|
41
47
|
column :updated_at
|
42
48
|
default_actions
|
43
49
|
end
|
@@ -115,10 +121,13 @@ ActiveAdmin.register Provider do
|
|
115
121
|
t.column :provider
|
116
122
|
t.column :created_at
|
117
123
|
end
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
124
|
+
|
125
|
+
div(:class => 'more') do
|
126
|
+
text_node link_to(
|
127
|
+
link_to I18n.t('smartkiosk.full_list'),
|
128
|
+
admin_payments_path(:q => {:provider_id_eq => provider.id})
|
129
|
+
)
|
130
|
+
end
|
122
131
|
end
|
123
132
|
|
124
133
|
active_admin_comments
|
data/app/admin/terminals.rb
CHANGED
@@ -340,10 +340,13 @@ ActiveAdmin.register Terminal do
|
|
340
340
|
t.column :modem_balance
|
341
341
|
t.column :modem_signal_level
|
342
342
|
end
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
343
|
+
|
344
|
+
div(:class => 'more') do
|
345
|
+
text_node link_to(
|
346
|
+
I18n.t('smartkiosk.admin.panels.terminals.all_pings'),
|
347
|
+
pings_admin_terminal_path(terminal.id)
|
348
|
+
)
|
349
|
+
end
|
347
350
|
end
|
348
351
|
|
349
352
|
panel I18n.t('activerecord.models.collection.other') do
|
@@ -353,10 +356,13 @@ ActiveAdmin.register Terminal do
|
|
353
356
|
t.column :approved_payments_sum
|
354
357
|
t.column :collected_at
|
355
358
|
end
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
359
|
+
|
360
|
+
div(:class => 'more') do
|
361
|
+
text_node link_to(
|
362
|
+
link_to I18n.t('smartkiosk.full_list'),
|
363
|
+
admin_collections_path(:q => {:terminal_id_eq => terminal.id})
|
364
|
+
)
|
365
|
+
end
|
360
366
|
end
|
361
367
|
|
362
368
|
active_admin_comments
|
@@ -1,55 +1,57 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
paginated_collection(Kaminari.paginate_array(terminal.pings).page(params[:page]).per(15), download_links: false) do
|
2
|
+
table_for(collection, :class => 'index_table index', :i18n => TerminalPing) do |t|
|
3
|
+
t.column :created_at
|
4
|
+
t.column :condition do |x|
|
5
|
+
status_tag I18n.t("smartkiosk.terminal_conditions.#{x.condition}"), x.condition.to_sym
|
6
|
+
end
|
7
|
+
t.column :state do |x|
|
8
|
+
I18n.t "smartkiosk.terminal_states.#{x.state}"
|
9
|
+
end
|
10
|
+
t.column :version
|
11
|
+
t.column :ip
|
12
|
+
t.column :queues do |x|
|
13
|
+
ul do
|
14
|
+
x.queues.each do |queue, count|
|
15
|
+
li :style => 'white-space: nowrap' do
|
16
|
+
b queue+':'
|
17
|
+
span count
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
t.column :banknotes do |x|
|
23
|
+
ul do
|
24
|
+
x.banknotes.each do |banknote, count|
|
25
|
+
li :style => 'white-space: nowrap' do
|
26
|
+
b banknote+':'
|
27
|
+
span count
|
28
|
+
end
|
27
29
|
end
|
28
30
|
end
|
29
31
|
end
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
32
|
+
Terminal::HARDWARE.each do |hardware|
|
33
|
+
t.column :"#{hardware}_error" do |x|
|
34
|
+
div :style => 'white-space: nowrap' do
|
35
|
+
if x.error(hardware).blank?
|
36
|
+
status_tag I18n.t('formtastic.no'), :ok
|
37
|
+
else
|
38
|
+
status_tag(
|
39
|
+
(
|
40
|
+
I18n.t("smartkiosk.hardware.#{hardware}.errors")[x.error(hardware)] ||
|
41
|
+
I18n.t('smartkiosk.unlocalized') + " (#{x.error(hardware)})"
|
42
|
+
),
|
43
|
+
:error
|
44
|
+
)
|
45
|
+
end
|
44
46
|
end
|
45
47
|
end
|
46
48
|
end
|
49
|
+
t.column :cash_sum
|
50
|
+
t.column :cash_count
|
51
|
+
t.column :cash_acceptor_version
|
52
|
+
t.column :printer_version
|
53
|
+
t.column :modem_balance
|
54
|
+
t.column :modem_signal_level
|
55
|
+
t.column :modem_version
|
47
56
|
end
|
48
|
-
t.column :cash_sum
|
49
|
-
t.column :cash_count
|
50
|
-
t.column :cash_acceptor_version
|
51
|
-
t.column :printer_version
|
52
|
-
t.column :modem_balance
|
53
|
-
t.column :modem_signal_level
|
54
|
-
t.column :modem_version
|
55
57
|
end
|
data/config/deploy.rb
CHANGED
@@ -20,7 +20,7 @@ set :user, "deployer"
|
|
20
20
|
set :deploy_to, "/home/deployer/www/#{application}"
|
21
21
|
|
22
22
|
after 'deploy:update_code', 'deploy:configure'
|
23
|
-
before 'deploy:create_symlink', 'deploy:install'
|
23
|
+
before 'deploy:create_symlink', 'deploy:install' if ENV['DEPLOY_DB']
|
24
24
|
|
25
25
|
namespace :deploy do
|
26
26
|
task :configure do
|
@@ -8,6 +8,7 @@ require 'active_admin/inputs/filter_date_range_input_fix'
|
|
8
8
|
require 'paper_trail/version_fix'
|
9
9
|
require 'formtastic/inputs/selectable_check_boxes'
|
10
10
|
require 'dav4rack/build_resource'
|
11
|
+
require 'kaminari/array_extension_fix'
|
11
12
|
|
12
13
|
ActiveAdmin.setup do |config|
|
13
14
|
# TODO: Remove this as soon as AA fixed
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Kaminari
|
2
|
+
class PaginatableArray < Array
|
3
|
+
# AA tries to reorder selection to ease SQL count query
|
4
|
+
# In cases when we use array as a collection source we
|
5
|
+
# need this method to do nothing and be chainable
|
6
|
+
def reorder(*args)
|
7
|
+
self
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/smartkiosk/server.rb
CHANGED
@@ -21,9 +21,9 @@ module Smartkiosk
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# ActiveAdmin
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
aa_load_path = Smartkiosk::Server::Engine.root.join('app/admin').to_s
|
25
|
+
ActiveAdmin.application.load_paths << aa_load_path
|
26
|
+
config.eager_load_paths.reject!{|x| x == aa_load_path}
|
27
27
|
|
28
28
|
# TODO: Remove this as soon as AA fixed
|
29
29
|
config.after_initialize do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartkiosk-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -272,6 +272,7 @@ files:
|
|
272
272
|
- lib/dav4rack/build_resource.rb
|
273
273
|
- lib/formtastic/inputs/selectable_check_boxes.rb
|
274
274
|
- lib/gem_stasher.rb
|
275
|
+
- lib/kaminari/array_extension_fix.rb
|
275
276
|
- lib/paper_trail/version_fix.rb
|
276
277
|
- lib/report_builder.rb
|
277
278
|
- lib/seeder.rb
|
@@ -321,7 +322,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
321
322
|
version: '0'
|
322
323
|
segments:
|
323
324
|
- 0
|
324
|
-
hash: -
|
325
|
+
hash: -3287935658302651935
|
325
326
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
326
327
|
none: false
|
327
328
|
requirements:
|
@@ -330,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
331
|
version: '0'
|
331
332
|
segments:
|
332
333
|
- 0
|
333
|
-
hash: -
|
334
|
+
hash: -3287935658302651935
|
334
335
|
requirements: []
|
335
336
|
rubyforge_project:
|
336
337
|
rubygems_version: 1.8.23
|