Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade activeadmin #674

Merged
merged 1 commit into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 35 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ GEM
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_admin_datetimepicker (0.6.3)
activeadmin (~> 1.1)
active_admin_datetimepicker (0.7.4)
activeadmin (>= 1.1, < 3.a)
coffee-rails
xdan-datetimepicker-rails (~> 2.5.4)
active_admin_import (4.1.2)
activeadmin (>= 1.0.0.pre2)
Expand All @@ -122,18 +123,17 @@ GEM
active_admin_sidebar (1.1.0)
activeadmin
active_admin_theme (1.0.3)
activeadmin (1.4.3)
arbre (>= 1.1.1)
coffee-rails
activeadmin (2.7.0)
arbre (~> 1.2, >= 1.2.1)
formtastic (~> 3.1)
formtastic_i18n
inherited_resources (>= 1.9.0)
jquery-rails (>= 4.2.0)
kaminari (>= 0.15)
railties (>= 4.2, < 5.3)
ransack (>= 1.8.7)
sass (~> 3.1)
sprockets (< 4.1)
formtastic_i18n (~> 0.4)
inherited_resources (~> 1.7)
jquery-rails (~> 4.2)
kaminari (~> 1.0, >= 1.0.1)
railties (>= 5.2, < 6.1)
ransack (~> 2.1, >= 2.1.1)
sassc-rails (~> 2.1)
sprockets (>= 3.0, < 4.1)
activejob (5.2.4.2)
activesupport (= 5.2.4.2)
globalid (>= 0.3.6)
Expand Down Expand Up @@ -173,7 +173,7 @@ GEM
kramdown
railties
rspec_api_documentation
arbre (1.1.1)
arbre (1.2.1)
activesupport (>= 3.0.0)
archive-zip (0.11.0)
io-like (~> 0.3.0)
Expand Down Expand Up @@ -299,11 +299,11 @@ GEM
hashdiff (0.3.8)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
inherited_resources (1.9.0)
actionpack (>= 4.2, < 5.3)
inherited_resources (1.11.0)
actionpack (>= 5.0, < 6.1)
has_scope (~> 0.6)
railties (>= 4.2, < 5.3)
responders
railties (>= 5.0, < 6.1)
responders (>= 2, < 4)
io-like (0.3.0)
jaro_winkler (1.5.2)
jquery-rails (4.3.3)
Expand All @@ -320,18 +320,18 @@ GEM
concurrent-ruby
railties (>= 4.1)
jwt (1.5.6)
kaminari (1.1.1)
kaminari (1.2.0)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
kaminari-actionview (= 1.2.0)
kaminari-activerecord (= 1.2.0)
kaminari-core (= 1.2.0)
kaminari-actionview (1.2.0)
actionview
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
kaminari-core (= 1.2.0)
kaminari-activerecord (1.2.0)
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
kaminari-core (= 1.2.0)
kaminari-core (1.2.0)
kramdown (1.16.2)
launchy (2.4.3)
addressable (~> 2.3)
Expand Down Expand Up @@ -477,6 +477,14 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.2.1)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
Expand Down
6 changes: 3 additions & 3 deletions app/admin/cdr/cdrs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def scoped_collection
column :rtt
column :early_media_present
column('Status') do |cdr|
status_tag(cdr.status_sym.to_s, cdr.status_sym, class: cdr.success? ? :ok : nil)
status_tag(cdr.status_sym.to_s, class: cdr.success? ? :ok : nil)
end
column :rateplan
column :destination
Expand Down Expand Up @@ -385,7 +385,7 @@ def scoped_collection
row :time_end
row :duration
row :status do
status_tag(cdr.status_sym.to_s, cdr.status_sym, class: cdr.success? ? :ok : nil)
status_tag(cdr.status_sym.to_s, class: cdr.success? ? :ok : nil)
end
row :disconnect_initiator do
"#{cdr.disconnect_initiator_id} - #{cdr.disconnect_initiator_name}"
Expand Down Expand Up @@ -660,7 +660,7 @@ def scoped_collection
column :rtt
column :early_media_present
column('Status', sortable: 'success') do |cdr|
status_tag(cdr.status_sym.to_s, cdr.status_sym, class: cdr.success? ? :ok : nil)
status_tag(cdr.status_sym.to_s, class: cdr.success? ? :ok : nil)
end
column :rateplan
column :destination
Expand Down
8 changes: 4 additions & 4 deletions app/admin/equipment/disconnect_policy_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def scoped_collection
column :code

column('Stop hunting', sortable: 'stop_hunting') do |r|
status_tag(r.stop_hunting.to_s, r.stop_hunting.to_s, class: r.stop_hunting? ? :ok : :red)
status_tag(r.stop_hunting.to_s, class: r.stop_hunting? ? :ok : :red)
end
column('Pass reason to originator', sortable: 'pass_reason_to_originator') do |r|
status_tag(r.pass_reason_to_originator.to_s, r.pass_reason_to_originator.to_s, class: r.pass_reason_to_originator? ? :ok : :red)
status_tag(r.pass_reason_to_originator.to_s, class: r.pass_reason_to_originator? ? :ok : :red)
end
column :rewrited_code
column :rewrited_reason
Expand All @@ -42,10 +42,10 @@ def scoped_collection
row :policy
row :code
row('Stop hunting') do |r|
status_tag(r.stop_hunting.to_s, r.stop_hunting.to_s, class: r.stop_hunting? ? :ok : :red)
status_tag(r.stop_hunting.to_s, class: r.stop_hunting? ? :ok : :red)
end
row('Pass reason to originator') do |r|
status_tag(r.pass_reason_to_originator.to_s, r.pass_reason_to_originator.to_s, class: r.pass_reason_to_originator? ? :ok : :red)
status_tag(r.pass_reason_to_originator.to_s, class: r.pass_reason_to_originator? ? :ok : :red)
end
row :rewrited_code
row :rewrited_reason
Expand Down
24 changes: 12 additions & 12 deletions app/admin/system/disconnect_codes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ def scoped_collection
column :reason

column('Success', sortable: 'success') do |r|
status_tag(r.success.to_s, r.success.to_s, class: r.success? ? :ok : :red)
status_tag(r.success.to_s, class: r.success? ? :ok : :red)
end

column('Success when non-zero length', sortable: 'successnozerolen') do |r|
status_tag(r.successnozerolen.to_s, r.successnozerolen.to_s, class: r.successnozerolen? ? :ok : :red)
status_tag(r.successnozerolen.to_s, class: r.successnozerolen? ? :ok : :red)
end

column('Stop hunting', sortable: 'stop_hunting') do |r|
status_tag(r.stop_hunting.to_s, r.stop_hunting.to_s, class: r.stop_hunting? ? :ok : :red)
status_tag(r.stop_hunting.to_s, class: r.stop_hunting? ? :ok : :red)
end
column('Pass reason to originator', sortable: 'pass_reason_to_originator') do |r|
status_tag(r.pass_reason_to_originator.to_s, r.pass_reason_to_originator.to_s, class: r.pass_reason_to_originator? ? :ok : :red)
status_tag(r.pass_reason_to_originator.to_s, class: r.pass_reason_to_originator? ? :ok : :red)
end
column :rewrited_code
column :rewrited_reason
column('Store CDR', sortable: 'store_cdr') do |r|
status_tag(r.store_cdr.to_s, r.store_cdr.to_s, class: r.store_cdr? ? :ok : :red)
status_tag(r.store_cdr.to_s, class: r.store_cdr? ? :ok : :red)
end
column('Silenly drop', sortable: 'silently_drop') do |r|
status_tag(r.silently_drop.to_s, r.silently_drop.to_s, class: r.silently_drop? ? :ok : :red)
status_tag(r.silently_drop.to_s, class: r.silently_drop? ? :ok : :red)
end
end

Expand All @@ -59,25 +59,25 @@ def scoped_collection
row :code
row :reason
row('Success') do |r|
status_tag(r.success.to_s, r.success.to_s, class: r.success? ? :ok : :red)
status_tag(r.success.to_s, class: r.success? ? :ok : :red)
end
row('Success when non-zero length') do |r|
status_tag(r.successnozerolen.to_s, r.successnozerolen.to_s, class: r.successnozerolen? ? :ok : :red)
status_tag(r.successnozerolen.to_s, class: r.successnozerolen? ? :ok : :red)
end

row('Stop hunting') do |r|
status_tag(r.stop_hunting.to_s, r.stop_hunting.to_s, class: r.stop_hunting? ? :ok : :red)
status_tag(r.stop_hunting.to_s, class: r.stop_hunting? ? :ok : :red)
end
row('Pass reason to originator') do |r|
status_tag(r.pass_reason_to_originator.to_s, r.pass_reason_to_originator.to_s, class: r.pass_reason_to_originator? ? :ok : :red)
status_tag(r.pass_reason_to_originator.to_s, class: r.pass_reason_to_originator? ? :ok : :red)
end
row :rewrited_code
row :rewrited_reason
row('Store CDR') do |r|
status_tag(r.store_cdr.to_s, r.store_cdr.to_s, class: r.store_cdr? ? :ok : :red)
status_tag(r.store_cdr.to_s, class: r.store_cdr? ? :ok : :red)
end
row('Silenly drop') do |r|
status_tag(r.silently_drop.to_s, r.silently_drop.to_s, class: r.silently_drop? ? :ok : :red)
status_tag(r.silently_drop.to_s, class: r.silently_drop? ? :ok : :red)
end
end
end
Expand Down