thecore_ui_rails_admin 2.7.7 → 3.0.3

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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/rails_admin/custom/thecore/ui.js +1 -0
  3. data/app/assets/javascripts/rails_admin/custom/ui.js +6 -9
  4. data/app/assets/stylesheets/rails_admin/custom/mixins.scss +15 -0
  5. data/app/assets/stylesheets/rails_admin/custom/thecore/mixins.scss +1 -0
  6. data/app/assets/stylesheets/rails_admin/custom/thecore/theming.scss +23 -0
  7. data/app/assets/stylesheets/rails_admin/custom/thecore/variables.scss +1 -0
  8. data/app/assets/stylesheets/rails_admin/custom/theming.scss +11 -147
  9. data/app/assets/stylesheets/rails_admin/custom/variables.scss.erb +85 -0
  10. data/app/views/layouts/_navigation.html.erb +20 -0
  11. data/app/views/layouts/_navigation_links.html.erb +7 -0
  12. data/app/views/rails_admin/main/{thecore_sidekiq_monitor.html.erb → active_job_monitor.html.erb} +1 -1
  13. data/{lib/concerns → config/initializers}/thecore_rails_admin_bulk_delete_concern.rb +0 -0
  14. data/{lib/concerns → config/initializers}/thecore_rails_admin_export_concern.rb +0 -0
  15. data/{lib/abilities/thecore_ui_rails_admin.rb → config/initializers/thecore_ui_rails_admin_abilities.rb} +0 -0
  16. data/config/initializers/thecore_ui_rails_admin_after_initialize.rb +71 -0
  17. data/config/initializers/thecore_ui_rails_admin_app_configs.rb +0 -12
  18. data/config/initializers/thecore_ui_rails_admin_assets.rb +9 -0
  19. data/config/initializers/{thecore_concern.rb → thecore_ui_rails_admin_concern.rb} +3 -3
  20. data/{lib/concerns/thecore_ui_rails_admin_used_token.rb → config/initializers/thecore_ui_rails_admin_invisible_models_concern.rb} +2 -2
  21. data/{lib/concerns → config/initializers}/thecore_ui_rails_admin_role.rb +2 -2
  22. data/config/initializers/thecore_ui_rails_admin_settings_concern.rb +14 -0
  23. data/{lib/concerns/thecore_ui_rails_admin_user.rb → config/initializers/thecore_ui_rails_admin_user_concern.rb} +2 -1
  24. data/config/locales/en.index_cards.custom.yml +8 -0
  25. data/config/locales/en.main.yml +5 -40
  26. data/config/locales/en.rails_admin.yml +6 -0
  27. data/config/locales/it.index_cards.custom.yml +20 -0
  28. data/config/locales/it.main.yml +0 -4
  29. data/config/locales/it.rails_admin.yml +9 -30
  30. data/config/routes.rb +3 -4
  31. data/lib/thecore_ui_rails_admin/engine.rb +1 -0
  32. data/lib/thecore_ui_rails_admin.rb +0 -27
  33. metadata +34 -94
  34. data/app/assets/javascripts/rails_admin/custom/thecore-custom-1.js +0 -1
  35. data/app/assets/javascripts/rails_admin/custom/thecore-custom-2.js +0 -1
  36. data/app/assets/javascripts/rails_admin/custom/thecore-custom-3.js +0 -1
  37. data/app/assets/javascripts/rails_admin/custom/thecore-custom-4.js +0 -1
  38. data/app/assets/javascripts/rails_admin/custom/thecore-custom-5.js +0 -1
  39. data/app/assets/javascripts/rails_admin/custom/thecore.js +0 -1
  40. data/app/assets/javascripts/thecore_ui_rails_admin/thecore_rails_admin.js +0 -77
  41. data/app/assets/stylesheets/rails_admin/custom/theming-custom-1.scss +0 -1
  42. data/app/assets/stylesheets/rails_admin/custom/theming-custom-2.scss +0 -1
  43. data/app/assets/stylesheets/rails_admin/custom/theming-custom-3.scss +0 -1
  44. data/app/assets/stylesheets/rails_admin/custom/theming-custom-4.scss +0 -1
  45. data/app/assets/stylesheets/rails_admin/custom/theming-custom-5.scss +0 -1
  46. data/app/assets/stylesheets/rails_admin/custom/variables.scss +0 -21
  47. data/app/assets/stylesheets/thecore_ui_rails_admin/animate.css +0 -3458
  48. data/app/assets/stylesheets/thecore_ui_rails_admin/apexcharts.scss +0 -7
  49. data/app/assets/stylesheets/thecore_ui_rails_admin/common.scss +0 -43
  50. data/app/assets/stylesheets/thecore_ui_rails_admin/devise.scss +0 -241
  51. data/app/assets/stylesheets/thecore_ui_rails_admin/flashing.scss +0 -28
  52. data/app/assets/stylesheets/thecore_ui_rails_admin/mixins.scss +0 -18
  53. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore.scss +0 -45
  54. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore_rails_admin.scss +0 -243
  55. data/app/assets/stylesheets/thecore_ui_rails_admin/togglable-sidebar.scss +0 -89
  56. data/app/views/rails_admin/main/thecore_blazer_bi.html.erb +0 -5
  57. data/app/views/shared/_flash.html.erb +0 -10
  58. data/config/blazer.yml +0 -79
  59. data/config/initializers/rails_admin.rb +0 -105
  60. data/config/initializers/thecore_ui_rails_admin_load_root_actions_for.rb +0 -6
  61. data/lib/concerns/rails_admin_requirements.rb +0 -19
  62. data/lib/concerns/thecore_ui_rails_admin_permission.rb +0 -33
  63. data/lib/iframes/blazer_bi.rb +0 -59
  64. data/lib/iframes/sidekiq_monitor.rb +0 -59
@@ -1,10 +0,0 @@
1
- <% flash.each do |type, message| %>
2
- <%-unless [true, "true", :true].include? message%>
3
- <div class="alert <%= bootstrap_class_for(type) %> fade in" role='alert'>
4
- <button class="close" data-dismiss="alert">×</button>
5
- <span class="glyphicon <%= bootstrap_glyphs_icon(type)%>" aria-hidden="true"></span>
6
- <span class="sr-only"><%= type.capitalize%>:</span>
7
- <%= message %>
8
- </div>
9
- <%-end%>
10
- <% end %>
data/config/blazer.yml DELETED
@@ -1,79 +0,0 @@
1
- # see https://github.com/ankane/blazer for more info
2
-
3
- data_sources:
4
- main:
5
- url: <%= ENV["BLAZER_DATABASE_URL"] %>
6
-
7
- # statement timeout, in seconds
8
- # none by default
9
- # timeout: 15
10
-
11
- # caching settings
12
- # can greatly improve speed
13
- # off by default
14
- # cache:
15
- # mode: slow # or all
16
- # expires_in: 60 # min
17
- # slow_threshold: 15 # sec, only used in slow mode
18
-
19
- # wrap queries in a transaction for safety
20
- # not necessary if you use a read-only user
21
- # true by default
22
- # use_transaction: false
23
-
24
- smart_variables:
25
- # zone_id: "SELECT id, name FROM zones ORDER BY name ASC"
26
- # period: ["day", "week", "month"]
27
- # status: {0: "Active", 1: "Archived"}
28
-
29
- linked_columns:
30
- # user_id: "/admin/users/{value}"
31
-
32
- smart_columns:
33
- # user_id: "SELECT id, name FROM users WHERE id IN {value}"
34
-
35
- # create audits
36
- audit: true
37
-
38
- # change the time zone
39
- # time_zone: "Pacific Time (US & Canada)"
40
-
41
- # class name of the user model
42
- # user_class: User
43
-
44
- # method name for the current user
45
- # user_method: current_user
46
-
47
- # method name for the display name
48
- # user_name: name
49
-
50
- # custom before_action to use for auth
51
- # before_action_method: require_admin
52
-
53
- # email to send checks from
54
- # from_email: blazer@example.org
55
-
56
- # webhook for Slack
57
- # slack_webhook_url: <%= ENV["BLAZER_SLACK_WEBHOOK_URL"] %>
58
-
59
- check_schedules:
60
- - "1 day"
61
- - "1 hour"
62
- - "5 minutes"
63
-
64
- # enable anomaly detection
65
- # note: with trend, time series are sent to https://trendapi.org
66
- # anomaly_checks: prophet / trend / anomaly_detection
67
-
68
- # enable forecasting
69
- # note: with trend, time series are sent to https://trendapi.org
70
- # forecasting: prophet / trend
71
-
72
- # enable map
73
- # mapbox_access_token: <%= ENV["MAPBOX_ACCESS_TOKEN"] %>
74
-
75
- # enable uploads
76
- # uploads:
77
- # url: <%= ENV["BLAZER_UPLOADS_URL"] %>
78
- # schema: uploads
79
- # data_source: main
@@ -1,105 +0,0 @@
1
- require 'rails_admin'
2
- require 'nested_form/builder_mixin'
3
-
4
- RailsAdmin.config do |config|
5
- # Freeze more or fewer columns (col 1 = checkboxes, 2 = links/actions) for horizontal scrolling:
6
- config.sidescroll = {num_frozen_columns: 2}
7
-
8
- config.main_app_name = Proc.new { |controller| [ ((ENV["APP_NAME"].presence || Settings.app_name.presence) rescue "Thecore"), "" ] }
9
- # Link for background Job
10
- # (config.navigation_static_links ||= {}).merge! "Background Monitor" => "#{ENV["BACKEND_URL"].presence || "http://localhost:3000"}/sidekiq"
11
-
12
- ### Popular gems integration
13
- config.model "Blazer::Audit" do
14
- visible false
15
- end
16
- config.model "Blazer::Check" do
17
- visible false
18
- end
19
- config.model "Blazer::Dashboard" do
20
- visible false
21
- end
22
- config.model "Blazer::DashboardQuery" do
23
- visible false
24
- end
25
- config.model "Blazer::Query" do
26
- visible false
27
- end
28
-
29
- config.model "RoleUser" do
30
- visible false
31
- end
32
-
33
- config.model "Predicate" do
34
- visible false
35
- end
36
-
37
- config.model "Target" do
38
- visible false
39
- end
40
-
41
- config.model "Action" do
42
- visible false
43
- end
44
-
45
- config.model "PermissionRole" do
46
- visible false
47
- end
48
-
49
- config.model "Permission" do
50
- visible false
51
- end
52
-
53
- config.model "ActionText::RichText" do
54
- visible false
55
- end
56
-
57
- config.model "ActiveStorage::Blob" do
58
- visible false
59
- end
60
-
61
- config.model "ActiveStorage::Attachment" do
62
- visible false
63
- end
64
-
65
- config.model "ActiveStorage::VariantRecord" do
66
- visible false
67
- end
68
-
69
- # action_mailbox~inbound_email
70
- config.model "ActionMailbox::InboundEmail" do
71
- visible false
72
- end
73
-
74
- ## == Devise ==
75
- config.authenticate_with do
76
- warden.authenticate! scope: :user
77
- end
78
- config.current_user_method(&:current_user)
79
-
80
- ## == Cancan ==
81
- config.authorize_with :cancancan
82
-
83
- ## == PaperTrail ==
84
- # config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
85
- config.show_gravatar = false
86
- ### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
87
- config.label_methods.unshift(:display_name)
88
-
89
- config.actions do
90
- # show_in_app
91
- dashboard do
92
- show_in_sidebar true
93
- end# mandatory
94
- index # mandatory
95
- new
96
- export
97
- bulk_delete
98
- show
99
- edit
100
- delete
101
- toggle
102
- end
103
- end
104
-
105
- # require "thecore_rails_admin_main_controller_concern"
@@ -1,6 +0,0 @@
1
- RailsAdmin.config do |config|
2
- config.actions do
3
- thecore_sidekiq_monitor
4
- # thecore_blazer_bi
5
- end
6
- end
@@ -1,19 +0,0 @@
1
- module ThecoreSettings
2
- module RailsAdminExtensionConfig
3
- def self.included(base)
4
- # IMPORTANT: To extend rails admin section in model, directly, instead of using concerns, I can
5
- # extend the included method. Be sure to use a different module name, otherwis it will be overwritten
6
- # See thecore_settings_rails_admin_model_extensions.rb initializer for a reference
7
- # on how to extend rails_admin section of a model previously defined (say it's defined in another gem)
8
- if base.respond_to?(:rails_admin)
9
- base.rails_admin do
10
- navigation_icon 'fa fa-cogs'
11
- end
12
- end
13
-
14
- def display_name
15
- "#{I18n.t "settings.namespaces.#{ns}", default: ns.titleize}: #{I18n.t "settings.names.#{name}", default: name.titleize}"
16
- end
17
- end
18
- end
19
- end
@@ -1,33 +0,0 @@
1
- require 'active_support/concern'
2
-
3
- module ThecoreUiRailsAdminPermission
4
- extend ActiveSupport::Concern
5
-
6
- included do
7
-
8
- rails_admin do
9
- field :predicate
10
- field :action
11
- field :target
12
- field :lock_version
13
- list do
14
- field :created_at
15
- # exclude_fields :lock_version
16
- end
17
- show do
18
- exclude_fields :id
19
- # exclude_fields :lock_version
20
- end
21
- # create do
22
- # field :lock_version, :hidden do
23
- # visible true
24
- # end
25
- # end
26
- # edit do
27
- # field :lock_version, :hidden do
28
- # visible true
29
- # end
30
- # end
31
- end
32
- end
33
- end
@@ -1,59 +0,0 @@
1
- puts "Loading Blazer BI File"
2
- require 'rails_admin/config/actions'
3
-
4
- module RailsAdmin
5
- module Config
6
- module Actions
7
- class ThecoreBlazerBi < Base
8
- RailsAdmin::Config::Actions.register(self)
9
- register_instance_option :object_level do
10
- false
11
- end
12
- # This ensures the action only shows up for Users
13
- register_instance_option :visible? do
14
- # visible only if authorized and if the object has a defined method
15
- authorized? #&& bindings[:abstract_model].model == ThecoreSpotItemsImporterXl && bindings[:abstract_model].model.column_names.include?('barcode')
16
- end
17
- # We want the action on members, not the Users collection
18
- register_instance_option :member do
19
- false
20
- end
21
-
22
- register_instance_option :collection do
23
- false
24
- end
25
- register_instance_option :root? do
26
- true
27
- end
28
-
29
- register_instance_option :breadcrumb_parent do
30
- [nil]
31
- end
32
-
33
- register_instance_option :link_icon do
34
- 'fa fa-line-chart'
35
- end
36
-
37
- register_instance_option :show_in_sidebar do
38
- true
39
- end
40
-
41
- # You may or may not want pjax for your action
42
- register_instance_option :pjax? do
43
- true
44
- end
45
-
46
- register_instance_option :http_methods do
47
- [:get]
48
- end
49
- # Adding the controller which is needed to compute calls from the ui
50
- register_instance_option :controller do
51
- proc do # This is needed because we need that this code is re-evaluated each time is called
52
-
53
- puts "Loading Blazer BI Controller"
54
- end
55
- end
56
- end
57
- end
58
- end
59
- end
@@ -1,59 +0,0 @@
1
- puts "Loading Sidekiq Monitor File"
2
- require 'rails_admin/config/actions'
3
-
4
- module RailsAdmin
5
- module Config
6
- module Actions
7
- class ThecoreSidekiqMonitor < Base
8
- RailsAdmin::Config::Actions.register(self)
9
- register_instance_option :object_level do
10
- false
11
- end
12
- # This ensures the action only shows up for Users
13
- register_instance_option :visible? do
14
- # visible only if authorized and if the object has a defined method
15
- authorized? #&& bindings[:abstract_model].model == ThecoreSpotItemsImporterXl && bindings[:abstract_model].model.column_names.include?('barcode')
16
- end
17
- # We want the action on members, not the Users collection
18
- register_instance_option :member do
19
- false
20
- end
21
-
22
- register_instance_option :collection do
23
- false
24
- end
25
- register_instance_option :root? do
26
- true
27
- end
28
-
29
- register_instance_option :breadcrumb_parent do
30
- [nil]
31
- end
32
-
33
- register_instance_option :link_icon do
34
- 'fa fa-caret-square-o-right'
35
- end
36
-
37
- register_instance_option :show_in_sidebar do
38
- true
39
- end
40
-
41
- # You may or may not want pjax for your action
42
- register_instance_option :pjax? do
43
- true
44
- end
45
-
46
- register_instance_option :http_methods do
47
- [:get]
48
- end
49
- # Adding the controller which is needed to compute calls from the ui
50
- register_instance_option :controller do
51
- proc do # This is needed because we need that this code is re-evaluated each time is called
52
-
53
- puts "Loading Sidekiq Monitor Controller"
54
- end
55
- end
56
- end
57
- end
58
- end
59
- end