thecore_ui_rails_admin 3.3.1 → 3.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2f195fc874210b82556066d24c732648f2e773f655d43d7820c2b2241113cf7
4
- data.tar.gz: 0a5944a61758a28097acac21b0f57adf1f70d8b67951a39cba5e9c893f78cc9b
3
+ metadata.gz: a073c777f562484f3aa818f57c12006b3e99142a2eecaa46780f2fa602831bb8
4
+ data.tar.gz: f485bceec0d8bd9ed88a103dab4489e5af6d878a5dc56b979e55c3de507fc212
5
5
  SHA512:
6
- metadata.gz: 04d5bf83f4a959e347e7eb83a6df9a034815a3520978db3ad5a141684ff05df2bec7e64b5b02ad1d729b0c9fdf701238eb95218dd19191c5e9357449c8241e9b
7
- data.tar.gz: 9f42d6b3ee985dfd4b64be2ba7100aee27d9630ee8c08d5aef71215767a119167a67e10572835e598b628e838c95efd657872894b9c37e90f73669838f9bb46f
6
+ metadata.gz: ec31012d3d4e1d9886a093b9dd138285ddde778bbc31404c520e3233e5fdfa07665f86990c152b79ae47d50675d53127f7ceadc7b1374e0887a5af3c1290f25c
7
+ data.tar.gz: bd9e19ca43ec411586e7403abc927a5d9bfa49cb3725c75619c08d2a45f72c4af10155e8d029c59b244fd9e35594c8a4f851463101bbed7ca9a66c67673da08c
@@ -0,0 +1,10 @@
1
+ <!-- Logic to test LDAP server connection -->
2
+ <% if @ldap_server_test %>
3
+ <div class="alert alert-success">
4
+ <%=@message%>
5
+ </div>
6
+ <% else %>
7
+ <div class="alert alert-danger">
8
+ <%=@message%>
9
+ </div>
10
+ <% end %>
@@ -47,6 +47,8 @@ Rails.application.configure do
47
47
 
48
48
  require 'root_actions/active_job_monitor'
49
49
  require 'member_actions/change_password'
50
+ require 'member_actions/test_ldap_server'
51
+ require 'member_actions/import_users_from_ldap'
50
52
  require 'collection_actions/save_filters'
51
53
  require 'collection_actions/load_filters'
52
54
  end
@@ -0,0 +1,93 @@
1
+ en:
2
+ export: Export
3
+ export_all: Export All
4
+ export_found: Export Filtered
5
+ export_selected: Export Selected
6
+ delete_selected: Delete Selected
7
+ yes: "Yes"
8
+ no: "No"
9
+ error: Error
10
+ question: Question
11
+ root_actions: "Operations"
12
+ admin:
13
+ rollincode:
14
+ number: Quantity
15
+ show: "Show items"
16
+ misc:
17
+ root_navigation: Operations
18
+ reset_filters: Remove Filters
19
+ actions:
20
+ test_ldap_server:
21
+ title: Test LDAP Server
22
+ success: "The LDAP server is reachable"
23
+ error: "The LDAP server is not reachable"
24
+ menu: Test LDAP Server
25
+ breadcrumb: Test LDAP Server
26
+ thecore_blazer_bi:
27
+ menu: Business Intelligence
28
+ breadcrumb: Business Intelligence
29
+ title: Business Intelligence
30
+ index:
31
+ link: Show All Items
32
+ no_records: No records to display
33
+ active_job_monitor:
34
+ menu: Service Monitoring
35
+ title: Service Monitoring
36
+ breadcrumb: Service Monitoring
37
+ change_password:
38
+ title: Change Password
39
+ breadcrumb: Change Password
40
+ menu: Change Password
41
+ success: Your password was changed successfully
42
+ error: Warning! %{errors}
43
+ save_filters:
44
+ success: Filters saved successfully
45
+ error: Error while saving filters
46
+ title: Save Filters
47
+ breadcrumb: Save Filters
48
+ menu: Save Filters
49
+ load_filters:
50
+ success: Filters loaded successfully
51
+ error: Error while loading filters
52
+ title: Load Filters
53
+ breadcrumb: Load Filters
54
+ menu: Load Filters
55
+ scopes:
56
+ _all: All
57
+ flash:
58
+ error: "Unable to perform action %{action} (%{name})"
59
+ model_not_found: Cannot find model '%{model}'
60
+ noaction: Unable to perform action
61
+ object_not_found: "Cannot find model %{model} with id '%{id}'"
62
+ successful: "Action performed successfully: %{action} (%{name})"
63
+ label: "Settings"
64
+ advanced:
65
+ label: Advanced
66
+ logs:
67
+ label: Logs
68
+ registries:
69
+ label: Registries
70
+ operations:
71
+ label: Operations
72
+ master_data_set:
73
+ label: Data
74
+ js:
75
+ true: True
76
+ false: False
77
+ is_present: Is present
78
+ is_blank: Is blank
79
+ date: Date ...
80
+ between_and_: Between ... and ...
81
+ today: Today
82
+ yesterday: Yesterday
83
+ this_week: This week
84
+ last_week: Last week
85
+ number: Number ...
86
+ contains: Contains
87
+ is_exactly: Is exactly
88
+ starts_with: Starts with
89
+ ends_with: Ends with
90
+ too_many_objects: "Too many objects, use search box above"
91
+ no_objects: "No objects found"
92
+ loading: "Loading..."
93
+ toggle_navigation: Toggle navigation
@@ -10,21 +10,56 @@ it:
10
10
  question: Domanda
11
11
  root_actions: "Operazioni"
12
12
  admin:
13
+ rollincode:
14
+ number: Quantità
15
+ show: "Mostra gli elementi"
13
16
  misc:
14
17
  root_navigation: Operazioni
15
- flash:
16
- error: "Impossibile eseguire l'azione %{action} (%{name})"
17
- model_not_found: Impossibile trovare il modello '%{model}'
18
- noaction: Impossibile eseguire l'azione
19
- object_not_found: "Impossibile trovare il modello %{model} con id '%{id}'"
20
- successful: "Azione eseguita con successo: %{action} (%{name})"
18
+ reset_filters: Rimuovi i Filtri
21
19
  actions:
20
+ test_ldap_server:
21
+ title: Testa il Server LDAP
22
+ success: "Il server LDAP è raggiungibile"
23
+ error: "Il server LDAP non è raggiungibile"
24
+ menu: Testa il Server LDAP
25
+ breadcrumb: Testa il Server LDAP
22
26
  thecore_blazer_bi:
23
27
  menu: Business Intelligence
24
28
  breadcrumb: Business Intelligence
25
29
  title: Business Intelligence
26
30
  index:
27
31
  link: Mostra tutti gli Elementi
32
+ no_records: Nessun record da mostrare
33
+ active_job_monitor:
34
+ menu: Monitoraggio Servizi
35
+ title: Monitoraggio Servizi
36
+ breadcrumb: Monitoraggio Servizi
37
+ change_password:
38
+ title: Cambia Password
39
+ breadcrumb: Cambia Password
40
+ menu: Cambia Password
41
+ success: La tua password è stata cambiata con successo
42
+ error: Attenzione! %{errors}
43
+ save_filters:
44
+ success: Filtri salvati con successo
45
+ error: Errore durante il salvataggio dei filtri
46
+ title: Salva Filtri
47
+ breadcrumb: Salva Filtri
48
+ menu: Salva Filtri
49
+ load_filters:
50
+ success: Filtri caricati con successo
51
+ error: Errore durante il caricamento dei filtri
52
+ title: Carica Filtri
53
+ breadcrumb: Carica Filtri
54
+ menu: Carica Filtri
55
+ scopes:
56
+ _all: Tutti
57
+ flash:
58
+ error: "Impossibile eseguire l'azione %{action} (%{name})"
59
+ model_not_found: Impossibile trovare il modello '%{model}'
60
+ noaction: Impossibile eseguire l'azione
61
+ object_not_found: "Impossibile trovare il modello %{model} con id '%{id}'"
62
+ successful: "Azione eseguita con successo: %{action} (%{name})"
28
63
  label: "Impostazioni"
29
64
  advanced:
30
65
  label: Avanzate
@@ -0,0 +1,21 @@
1
+ RailsAdmin::Config::Actions.add_action "import_users_from_ldap", :base, :member do
2
+
3
+ link_icon 'fas fa-file-import'
4
+
5
+ http_methods [:get]
6
+
7
+ # Visible only for the User model
8
+ visible do
9
+ bindings[:object].is_a?(::LdapServer)
10
+ end
11
+ # Adding the controller which is needed to compute calls from the ui
12
+ controller do
13
+ proc do
14
+ # call the background job
15
+ BackgroundLdapImportJob.perform_later
16
+ # flash message
17
+ flash[:success] = "✅ Avviato l'import in background degli utenti da #{@object.host}"
18
+ redirect_to back_or_index
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,30 @@
1
+ RailsAdmin::Config::Actions.add_action "test_ldap_server", :base, :member do
2
+
3
+ link_icon 'fas fa-circle-check'
4
+
5
+ http_methods [:get]
6
+
7
+ # Visible only for the User model
8
+ visible do
9
+ bindings[:object].is_a?(::LdapServer)
10
+ end
11
+ # Adding the controller which is needed to compute calls from the ui
12
+ controller do
13
+ proc do
14
+ # From the UI the user can test if the ldap server is reachable and receive a response
15
+ if request.get?
16
+ ldap = ::LdapServer.find(@object.id)
17
+ begin
18
+ ldap.test_connection
19
+
20
+ flash[:success] = @message = I18n.t("admin.actions.test_ldap_server.success")
21
+ rescue => e
22
+ flash[:error] = @message = I18n.t("admin.actions.test_ldap_server.error", error: e.message)
23
+ end
24
+ # Redirect to the object
25
+ redirect_to index_path(model_name: @abstract_model.to_param)
26
+ end
27
+
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module ThecoreUiRailsAdmin
2
- VERSION = "3.3.1".freeze
2
+ VERSION = "3.4.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_rails_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -85,8 +85,10 @@ files:
85
85
  - app/views/rails_admin/main/active_job_monitor.html.erb
86
86
  - app/views/rails_admin/main/change_password.html.erb
87
87
  - app/views/rails_admin/main/dashboard.html.erb
88
+ - app/views/rails_admin/main/import_users_from_ldap.html.erb
88
89
  - app/views/rails_admin/main/load_filters.html.erb
89
90
  - app/views/rails_admin/main/save_filter.html.erb
91
+ - app/views/rails_admin/main/test_ldap_server.html.erb
90
92
  - config/initializers/abilities.rb
91
93
  - config/initializers/add_to_db_migrations.rb
92
94
  - config/initializers/after_initialize.rb
@@ -103,12 +105,8 @@ files:
103
105
  - config/initializers/concern_settings.rb
104
106
  - config/initializers/concern_target.rb
105
107
  - config/initializers/concern_user.rb
106
- - config/locales/en.main.yml
107
- - config/locales/en.rails_admin.yml
108
- - config/locales/en.rollincode.yml
109
- - config/locales/it.main.yml
110
- - config/locales/it.rails_admin.yml
111
- - config/locales/it.rollincode.yml
108
+ - config/locales/en.thecore_ui_ra.yml
109
+ - config/locales/it.thecore_ui_ra.yml
112
110
  - config/routes.rb
113
111
  - db/migrate/20250206222412_add_locale_to_user.rb
114
112
  - db/migrate/20250429155934_create_saved_filters.rb
@@ -117,6 +115,8 @@ files:
117
115
  - lib/collection_actions/load_filters.rb
118
116
  - lib/collection_actions/save_filters.rb
119
117
  - lib/member_actions/change_password.rb
118
+ - lib/member_actions/import_users_from_ldap.rb
119
+ - lib/member_actions/test_ldap_server.rb
120
120
  - lib/rails_admin_abstract_controller.rb
121
121
  - lib/rails_admin_filter_controller_helper.rb
122
122
  - lib/root_actions/active_job_monitor.rb
@@ -1,58 +0,0 @@
1
- en:
2
- export: Export
3
- export_all: Export All
4
- export_found: Export Filtered
5
- export_selected: Export Selected
6
- delete_selected: Delete Selected
7
- yes: "Yes"
8
- no: "No"
9
- error: Error
10
- question: Question
11
- root_actions: Actions
12
- admin:
13
- misc:
14
- root_navigation: Actions
15
- flash:
16
- error: "Unable to perform action %{action} (%{name})"
17
- model_not_found: Unable to find model '%{model}'
18
- noaction: Unable to perform action
19
- object_not_found: "Unable to find model %{model} with id '%{id}'"
20
- successful: "Action executed successfully: %{action} (%{name})"
21
- actions:
22
- thecore_blazer_bi:
23
- menu: Business Intelligence
24
- breadcrumb: Business Intelligence
25
- title: Business Intelligence
26
- index:
27
- link: Show All Items
28
- label: Settings
29
- advanced:
30
- label: Advanced
31
- logs:
32
- label: Logs
33
- registries:
34
- label: Registries
35
- operations:
36
- label: Operations
37
- master_data_set:
38
- label: Data
39
- js:
40
- true: True
41
- false: False
42
- is_present: Is present
43
- is_blank: Is blank
44
- date: Date ...
45
- between_and_: Between ... and ...
46
- today: Today
47
- yesterday: Yesterday
48
- this_week: This week
49
- last_week: Last week
50
- number: Number ...
51
- contains: Contains
52
- is_exactly: Is exactly
53
- starts_with: Starts with
54
- ends_with: Ends with
55
- too_many_objects: "Too many objects, use search box above"
56
- no_objects: "No objects found"
57
- loading: "Loading..."
58
- toggle_navigation: Toggle navigation
@@ -1,31 +0,0 @@
1
- en:
2
- admin:
3
- misc:
4
- reset_filters: Remove Filters
5
- actions:
6
- index:
7
- no_records: No records to show
8
- active_job_monitor:
9
- menu: Async Worker Monitor
10
- title: Async Worker Monitor
11
- breadcrumb: Async Worker Monitor
12
- change_password:
13
- title: Change Password
14
- breadcrumb: Change Password
15
- menu: Change Password
16
- success: Your password has been changed successfully
17
- error: Error! %{errors}
18
- save_filters:
19
- success: Filters saved successfully
20
- error: Error saving filters
21
- title: Save Filters
22
- breadcrumb: Save Filters
23
- menu: Save Filters
24
- load_filters:
25
- success: Filters loaded successfully
26
- error: Error loading filters
27
- title: Load Filters
28
- breadcrumb: Load Filters
29
- menu: Load Filters
30
- scopes:
31
- _all: All
@@ -1,5 +0,0 @@
1
- en:
2
- admin:
3
- rollincode:
4
- number: "Number"
5
- show: "Show"
@@ -1,31 +0,0 @@
1
- it:
2
- admin:
3
- misc:
4
- reset_filters: Rimuovi i Filtri
5
- actions:
6
- index:
7
- no_records: Nessun record da mostrare
8
- active_job_monitor:
9
- menu: Monitoraggio Servizi
10
- title: Monitoraggio Servizi
11
- breadcrumb: Monitoraggio Servizi
12
- change_password:
13
- title: Cambia Password
14
- breadcrumb: Cambia Password
15
- menu: Cambia Password
16
- success: La tua password è stata cambiata con successo
17
- error: Attenzione! %{errors}
18
- save_filters:
19
- success: Filtri salvati con successo
20
- error: Errore durante il salvataggio dei filtri
21
- title: Salva Filtri
22
- breadcrumb: Salva Filtri
23
- menu: Salva Filtri
24
- load_filters:
25
- success: Filtri caricati con successo
26
- error: Errore durante il caricamento dei filtri
27
- title: Carica Filtri
28
- breadcrumb: Carica Filtri
29
- menu: Carica Filtri
30
- scopes:
31
- _all: Tutti
@@ -1,5 +0,0 @@
1
- it:
2
- admin:
3
- rollincode:
4
- number: Quantità
5
- show: "Mostra gli elementi"