lesli_audit 0.6.0 → 1.0.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/lesli_audit_manifest.js +0 -1
  3. data/app/assets/javascripts/lesli_audit/application.js +1 -4910
  4. data/app/assets/stylesheets/lesli_audit/application.css +3 -3
  5. data/app/controllers/lesli_audit/analytics_controller.rb +3 -13
  6. data/app/controllers/lesli_audit/dashboards_controller.rb +2 -0
  7. data/app/controllers/lesli_audit/requests_controller.rb +1 -6
  8. data/app/controllers/lesli_audit/users_controller.rb +4 -11
  9. data/app/interfaces/lesli_audit/logger_interface.rb +132 -0
  10. data/app/models/lesli_audit/dashboard.rb +0 -25
  11. data/app/services/lesli_audit/analytic_service.rb +12 -7
  12. data/app/services/lesli_audit/analytics/visitor_service.rb +155 -153
  13. data/app/services/lesli_audit/user_service.rb +17 -9
  14. data/app/views/lesli_audit/analytics/index.html.erb +42 -1
  15. data/app/views/lesli_audit/dashboards/edit.html.erb +12 -1
  16. data/app/views/lesli_audit/dashboards/index.html.erb +2 -0
  17. data/app/views/lesli_audit/dashboards/new.html.erb +2 -0
  18. data/app/views/lesli_audit/dashboards/show.html.erb +33 -1
  19. data/app/views/lesli_audit/requests/index.html.erb +23 -1
  20. data/app/views/lesli_audit/users/index.html.erb +14 -1
  21. data/config/locales/translations.en.yml +1 -20
  22. data/config/locales/translations.es.yml +1 -20
  23. data/config/locales/translations.fr.yml +1 -20
  24. data/config/locales/translations.it.yml +1 -20
  25. data/config/locales/translations.pt.yml +1 -20
  26. data/config/routes.rb +1 -19
  27. data/db/migrate/v1.0/0503000110_create_lesli_audit_accounts.rb +1 -6
  28. data/db/migrate/v1.0/0503050110_create_lesli_audit_dashboards.rb +1 -15
  29. data/db/seeds.rb +7 -10
  30. data/lib/lesli_audit/engine.rb +2 -0
  31. data/lib/lesli_audit/version.rb +2 -2
  32. data/lib/vue/apps/users/registrations.vue +7 -9
  33. data/lib/vue/stores/translations.json +10 -0
  34. metadata +10 -12
  35. data/db/migrate/v1.0/0503050210_create_lesli_audit_dashboard_components.rb +0 -53
  36. data/db/seed/production.rb +0 -0
  37. data/db/seed/test.rb +0 -0
  38. /data/app/views/lesli_audit/partials/{_engine-navigation.html.erb → _navigation.html.erb} +0 -0
  39. /data/db/seed/{development.rb → requests.rb} +0 -0
@@ -35,25 +35,33 @@ module LesliAudit
35
35
 
36
36
  def registrations
37
37
 
38
- period = "month"
39
-
40
38
  #Get filters from the request
41
39
  group = query[:group]
40
+ group = "month"
42
41
 
43
42
  #Get period only if the request have filters
44
43
  period = group unless group.blank?
45
44
 
45
+ group_by = "DATE_TRUNC('month', created_at)" if group == 'month'
46
+ group_by = "DATE_TRUNC('week', created_at)" if group == 'week'
47
+ group_by = "DATE_TRUNC('day', created_at)" if group == 'day'
48
+
49
+ # compatibility for SQLite
50
+ if ActiveRecord::Base.connection.adapter_name == "SQLite"
51
+ group_by = "strftime('%Y-%m', created_at)"
52
+ end
53
+
46
54
  registrations = []
47
55
 
48
56
  if ["day", "week", "month", "year"].include?(period)
57
+
49
58
  registrations = current_user.account.users
50
- .group("DATE_TRUNC('#{period}', created_at)")
51
- .count
52
- .map do |request|
53
- {
54
- :date => Date2.new(request[0]).date.to_s,
55
- :count => request[1]
56
- }
59
+ .group(group_by)
60
+ .count.map do |request|
61
+ {
62
+ :date => request[0],
63
+ :count => request[1]
64
+ }
57
65
  end
58
66
  end
59
67
 
@@ -1 +1,42 @@
1
- <router-view></router-view>
1
+
2
+ <% @visitors = @visitors.reverse %>
3
+
4
+ <%= render(LesliView::Layout::Container.new("audit-analytics")) do %>
5
+ <%= render(LesliView::Components::Header.new("Analytics")) %>
6
+
7
+ <%= render(LesliView::Charts::Line.new(
8
+ title:"Visitors",
9
+ labels: @visitors.map { |visitor| visitor["date"] },
10
+ serie: @visitors.map { |visitor| visitor["requests"] }
11
+ ))%>
12
+ <br>
13
+ <div class="columns">
14
+ <div class="column">
15
+ <%= render(LesliView::Elements::Table.new(
16
+ columns: [{
17
+ label: "User",
18
+ field: "email"
19
+ },{
20
+ label:"Resources",
21
+ field:"resources"
22
+ },{
23
+ label:"Requests",
24
+ field:"requests"
25
+ }],
26
+ records: @users
27
+ )) %>
28
+ </div>
29
+ <div class="column">
30
+ <%= render(LesliView::Elements::Table.new(
31
+ columns: [{
32
+ label: "Controller",
33
+ field: "request_controller"
34
+ },{
35
+ label:"Requests",
36
+ field:"requests"
37
+ }],
38
+ records: @controllers
39
+ )) %>
40
+ </div>
41
+ </div>
42
+ <% end %>
@@ -1 +1,12 @@
1
- <router-view></router-view>
1
+ <% content_for :title, "Editing dashboard" %>
2
+
3
+ <h1>Editing dashboard</h1>
4
+
5
+ <%= render "form", dashboard: @dashboard %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Show this dashboard", @dashboard %> |
11
+ <%= link_to "Back to dashboards", dashboards_path %>
12
+ </div>
@@ -1,5 +1,7 @@
1
1
  <p style="color: green"><%= notice %></p>
2
2
 
3
+ <% content_for :title, "Dashboards" %>
4
+
3
5
  <h1>Dashboards</h1>
4
6
 
5
7
  <div id="dashboards">
@@ -1,3 +1,5 @@
1
+ <% content_for :title, "New dashboard" %>
2
+
1
3
  <h1>New dashboard</h1>
2
4
 
3
5
  <%= render "form", dashboard: @dashboard %>
@@ -1 +1,33 @@
1
- <router-view></router-view>
1
+ <%#
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by LesliTech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ %>
32
+
33
+ <%= render("/lesli/shared/dashboards/show") %>
@@ -1 +1,23 @@
1
- <router-view></router-view>
1
+ <%= render(LesliView::Layout::Container.new("audit-requests")) do %>
2
+ <%= render(LesliView::Components::Header.new("Requests")) %>
3
+ <%= render LesliView::Components::Toolbar.new() %>
4
+ <%= render(LesliView::Elements::Table.new(
5
+ columns: [{
6
+ label: "ID",
7
+ field: "id"
8
+ },{
9
+ label: "Controller",
10
+ field: "request_controller"
11
+ },{
12
+ label:"Action",
13
+ field:"request_action"
14
+ },{
15
+ label:"Count",
16
+ field:"request_count"
17
+ },{
18
+ label:"Date",
19
+ field:"created_at"
20
+ }],
21
+ records: @requests[:records]
22
+ )) %>
23
+ <% end %>
@@ -1 +1,14 @@
1
- <router-view></router-view>
1
+
2
+ <%= render(LesliView::Layout::Container.new("audit-users")) do %>
3
+ <%= render(LesliView::Components::Header.new("Users")) %>
4
+
5
+ <div class="columns">
6
+ <div class="column">
7
+ <%= render(LesliView::Charts::Bar.new(
8
+ title:"Registered users",
9
+ labels: @users.map { |item| item[:date] },
10
+ serie: @users.map { |item| item[:count] }
11
+ ))%>
12
+ </div>
13
+ </div>
14
+ <% end %>
@@ -1,21 +1,2 @@
1
1
  ---
2
- :en:
3
- lesli:
4
- shared:
5
- view_discussions: Discussions
6
- button_add_new: Add new
7
- button_reload: Reload
8
- view_files: Files
9
- view_quick_actions: Quick actions
10
- button_list: List
11
- button_save: Save
12
- button_delete: Delete
13
- button_edit: Edit
14
- view_status_active: Active
15
- view_status_inactive: Inactive
16
- button_settings: Settings
17
- button_show: Show
18
- toolbar_search: Search...
19
- application:
20
- navigation_logout: Logout
21
- navigation_my_profile: My profile
2
+ :en: {}
@@ -1,21 +1,2 @@
1
1
  ---
2
- :es:
3
- lesli:
4
- shared:
5
- view_discussions: Discusiones
6
- button_add_new: Agregar nuevo
7
- button_reload: Recargar
8
- view_files: Archivos
9
- view_quick_actions: Acciones rapidas
10
- button_list: Lista
11
- button_save: Guardar
12
- button_delete: Eliminar
13
- button_edit: Editar
14
- view_status_active: Activo
15
- view_status_inactive: Inactivo
16
- button_settings: Configuración
17
- button_show: Ver
18
- toolbar_search: Buscar...
19
- application:
20
- navigation_logout: Cerrar sesión
21
- navigation_my_profile: Mi perfil
2
+ :es: {}
@@ -1,21 +1,2 @@
1
1
  ---
2
- :fr:
3
- lesli:
4
- shared:
5
- view_discussions: ":lesli.shared.view_discussions:"
6
- button_add_new: ":lesli.shared.button_add_new:"
7
- button_reload: ":lesli.shared.button_reload:"
8
- view_files: ":lesli.shared.view_files:"
9
- view_quick_actions: ":lesli.shared.view_quick_actions:"
10
- button_list: ":lesli.shared.button_list:"
11
- button_save: ":lesli.shared.button_save:"
12
- button_delete: ":lesli.shared.button_delete:"
13
- button_edit: ":lesli.shared.button_edit:"
14
- view_status_active: ":lesli.shared.view_status_active:"
15
- view_status_inactive: ":lesli.shared.view_status_inactive:"
16
- button_settings: ":lesli.shared.button_settings:"
17
- button_show: ":lesli.shared.button_show:"
18
- toolbar_search: ":lesli.shared.toolbar_search:"
19
- application:
20
- navigation_logout: ":lesli.application.navigation_logout:"
21
- navigation_my_profile: ":lesli.application.navigation_my_profile:"
2
+ :fr: {}
@@ -1,21 +1,2 @@
1
1
  ---
2
- :it:
3
- lesli:
4
- shared:
5
- view_discussions: ":lesli.shared.view_discussions:"
6
- button_add_new: ":lesli.shared.button_add_new:"
7
- button_reload: ":lesli.shared.button_reload:"
8
- view_files: ":lesli.shared.view_files:"
9
- view_quick_actions: ":lesli.shared.view_quick_actions:"
10
- button_list: ":lesli.shared.button_list:"
11
- button_save: ":lesli.shared.button_save:"
12
- button_delete: ":lesli.shared.button_delete:"
13
- button_edit: ":lesli.shared.button_edit:"
14
- view_status_active: ":lesli.shared.view_status_active:"
15
- view_status_inactive: ":lesli.shared.view_status_inactive:"
16
- button_settings: ":lesli.shared.button_settings:"
17
- button_show: ":lesli.shared.button_show:"
18
- toolbar_search: ":lesli.shared.toolbar_search:"
19
- application:
20
- navigation_logout: ":lesli.application.navigation_logout:"
21
- navigation_my_profile: ":lesli.application.navigation_my_profile:"
2
+ :it: {}
@@ -1,21 +1,2 @@
1
1
  ---
2
- :pt:
3
- lesli:
4
- shared:
5
- view_discussions: ":lesli.shared.view_discussions:"
6
- button_add_new: ":lesli.shared.button_add_new:"
7
- button_reload: ":lesli.shared.button_reload:"
8
- view_files: ":lesli.shared.view_files:"
9
- view_quick_actions: ":lesli.shared.view_quick_actions:"
10
- button_list: ":lesli.shared.button_list:"
11
- button_save: ":lesli.shared.button_save:"
12
- button_delete: ":lesli.shared.button_delete:"
13
- button_edit: ":lesli.shared.button_edit:"
14
- view_status_active: ":lesli.shared.view_status_active:"
15
- view_status_inactive: ":lesli.shared.view_status_inactive:"
16
- button_settings: ":lesli.shared.button_settings:"
17
- button_show: ":lesli.shared.button_show:"
18
- toolbar_search: ":lesli.shared.toolbar_search:"
19
- application:
20
- navigation_logout: ":lesli.application.navigation_logout:"
21
- navigation_my_profile: ":lesli.application.navigation_my_profile:"
2
+ :pt: {}
data/config/routes.rb CHANGED
@@ -32,25 +32,7 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  LesliAudit::Engine.routes.draw do
34
34
 
35
- # Dashboard alias
36
- root to: "dashboards#show"
37
-
38
-
39
- # Dashboard:
40
- # Total users
41
- # Total roles
42
- # Visits
43
- # Trends
44
- resource :dashboard, only: [:show]
45
- resources :dashboards do
46
- collection do
47
- post "list" => :index
48
- get :options
49
- end
50
- scope module: :dashboard do
51
- resources :components
52
- end
53
- end
35
+ Lesli::Routing.mount_dashboard_for(LesliAudit)
54
36
 
55
37
 
56
38
  # Users:
@@ -32,11 +32,6 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  class CreateLesliAuditAccounts < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :lesli_audit_accounts do |t|
36
- t.integer :status
37
- t.datetime :deleted_at, index: true
38
- t.timestamps
39
- end
40
- add_reference(:lesli_audit_accounts, :account, foreign_key: { to_table: :lesli_accounts })
35
+ create_table_lesli_shared_account_10(:lesli_audit)
41
36
  end
42
37
  end
@@ -32,20 +32,6 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  class CreateLesliAuditDashboards < ActiveRecord::Migration[6.1]
34
34
  def change
35
- gem_path = Lesli::System.engine("Lesli", "dir")
36
- table_base_structure = JSON.parse(File.read(File.join(gem_path, "db", "structure", "00000501_dashboards.json")))
37
- create_table :lesli_audit_dashboards do |t|
38
- table_base_structure.each do |column|
39
- t.send(
40
- column["type"].parameterize.underscore.to_sym,
41
- column["name"].parameterize.underscore.to_sym
42
- )
43
- end
44
- t.timestamps
45
- end
46
-
47
- add_reference(:lesli_audit_dashboards, :account, foreign_key: { to_table: :lesli_audit_accounts })
48
- add_reference(:lesli_audit_dashboards, :user, foreign_key: { to_table: :lesli_users })
49
- #add_reference(:lesli_audit_dashboards, :role, foreign_key: { to_table: :roles })
35
+ create_table_lesli_shared_dashboards_10(:lesli_audit)
50
36
  end
51
37
  end
data/db/seeds.rb CHANGED
@@ -31,13 +31,10 @@ Building a better future, one line of code at a time.
31
31
  =end
32
32
 
33
33
 
34
- # IMPORTANT:
35
- # Seed files are only for development, if you need to create default resources
36
- # for production you must use the initializer method in the Engine account model
37
- if Rails.env.development?
38
- L2.msg(
39
- "LesliAudit",
40
- "Version: #{LesliAudit::VERSION}",
41
- "Build: #{LesliAudit::BUILD}")
42
- load(LesliAudit::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb"))
43
- end
34
+ L2.msg("LesliAudit", "Version: #{LesliAudit::VERSION}", "Build: #{LesliAudit::BUILD}")
35
+
36
+
37
+ # · load specific environment seeds
38
+ if Rails.env.development? || Lesli.config.demo
39
+ load LesliAudit::Engine.root.join("db", "seed", "requests.rb")
40
+ end
@@ -7,6 +7,8 @@ module LesliAudit
7
7
  # register assets manifest
8
8
  config.assets.precompile += %w[lesli_audit_manifest.js]
9
9
 
10
+ app.config.assets.paths << root.join("app", "javascript").to_s
11
+
10
12
  # register engine migrations path
11
13
  unless app.root.to_s.match root.to_s
12
14
  config.paths["db/migrate"].expanded.each do |expanded_path|
@@ -1,4 +1,4 @@
1
1
  module LesliAudit
2
- VERSION = "0.6.0"
3
- BUILD = "1713121383"
2
+ VERSION = "1.0.0"
3
+ BUILD = "1751518330"
4
4
  end
@@ -62,14 +62,12 @@ watch(() => storeUsers.registrations, (oldData, newData) => {
62
62
 
63
63
  </script>
64
64
  <template>
65
- <section class="application-component">
66
- <lesli-card>
67
- <lesli-chart-bar
68
- title="Registrations by date"
69
- :series="registrationSeries"
70
- @marker-click="markerClick">
71
- </lesli-chart-bar>
72
- </lesli-card>
73
- </section>
65
+ <lesli-application-component>
66
+ <lesli-chart-bar
67
+ title="Registrations by date"
68
+ :series="registrationSeries"
69
+ @marker-click="markerClick">
70
+ </lesli-chart-bar>
71
+ </lesli-application-component>
74
72
  </template>
75
73
 
@@ -20,6 +20,8 @@
20
20
  "button_save": "Save",
21
21
  "button_settings": "Settings",
22
22
  "button_show": "Show",
23
+ "message_operation_error": "Operation failed. Please try again.",
24
+ "message_operation_success": "Operation completed successfully",
23
25
  "toolbar_search": "Search...",
24
26
  "view_discussions": "Discussions",
25
27
  "view_files": "Files",
@@ -50,6 +52,8 @@
50
52
  "button_save": "Guardar",
51
53
  "button_settings": "Configuración",
52
54
  "button_show": "Ver",
55
+ "message_operation_error": "Operación fallida. Por favor, inténtelo de nuevo.",
56
+ "message_operation_success": "Operacion realizada satisfactoriamente",
53
57
  "toolbar_search": "Buscar...",
54
58
  "view_discussions": "Discusiones",
55
59
  "view_files": "Archivos",
@@ -80,6 +84,8 @@
80
84
  "button_save": ":lesli.shared.button_save:",
81
85
  "button_settings": ":lesli.shared.button_settings:",
82
86
  "button_show": ":lesli.shared.button_show:",
87
+ "message_operation_error": ":lesli.shared.message_operation_error:",
88
+ "message_operation_success": ":lesli.shared.message_operation_success:",
83
89
  "toolbar_search": ":lesli.shared.toolbar_search:",
84
90
  "view_discussions": ":lesli.shared.view_discussions:",
85
91
  "view_files": ":lesli.shared.view_files:",
@@ -110,6 +116,8 @@
110
116
  "button_save": ":lesli.shared.button_save:",
111
117
  "button_settings": ":lesli.shared.button_settings:",
112
118
  "button_show": ":lesli.shared.button_show:",
119
+ "message_operation_error": ":lesli.shared.message_operation_error:",
120
+ "message_operation_success": ":lesli.shared.message_operation_success:",
113
121
  "toolbar_search": ":lesli.shared.toolbar_search:",
114
122
  "view_discussions": ":lesli.shared.view_discussions:",
115
123
  "view_files": ":lesli.shared.view_files:",
@@ -140,6 +148,8 @@
140
148
  "button_save": ":lesli.shared.button_save:",
141
149
  "button_settings": ":lesli.shared.button_settings:",
142
150
  "button_show": ":lesli.shared.button_show:",
151
+ "message_operation_error": ":lesli.shared.message_operation_error:",
152
+ "message_operation_success": ":lesli.shared.message_operation_success:",
143
153
  "toolbar_search": ":lesli.shared.toolbar_search:",
144
154
  "view_discussions": ":lesli.shared.view_discussions:",
145
155
  "view_files": ":lesli.shared.view_files:",
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_audit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2025-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: useragent
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '7'
19
+ version: 0.16.10
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '7'
26
+ version: 0.16.10
27
27
  description: System logs & activities analytics for The Lesli Framework
28
28
  email:
29
29
  - hello@lesli.tech
@@ -49,6 +49,7 @@ files:
49
49
  - app/helpers/lesli_audit/dashboards_helper.rb
50
50
  - app/helpers/lesli_audit/requests_helper.rb
51
51
  - app/helpers/lesli_audit/users_helper.rb
52
+ - app/interfaces/lesli_audit/logger_interface.rb
52
53
  - app/jobs/lesli_audit/application_job.rb
53
54
  - app/mailers/lesli_audit/application_mailer.rb
54
55
  - app/models/lesli_audit/account.rb
@@ -96,7 +97,7 @@ files:
96
97
  - app/views/lesli_audit/dashboards/index.html.erb
97
98
  - app/views/lesli_audit/dashboards/new.html.erb
98
99
  - app/views/lesli_audit/dashboards/show.html.erb
99
- - app/views/lesli_audit/partials/_engine-navigation.html.erb
100
+ - app/views/lesli_audit/partials/_navigation.html.erb
100
101
  - app/views/lesli_audit/requests/_form.html.erb
101
102
  - app/views/lesli_audit/requests/_request.html.erb
102
103
  - app/views/lesli_audit/requests/edit.html.erb
@@ -117,12 +118,9 @@ files:
117
118
  - config/routes.rb
118
119
  - db/migrate/v1.0/0503000110_create_lesli_audit_accounts.rb
119
120
  - db/migrate/v1.0/0503050110_create_lesli_audit_dashboards.rb
120
- - db/migrate/v1.0/0503050210_create_lesli_audit_dashboard_components.rb
121
121
  - db/migrate/v1.0/0503100010_create_lesli_audit_account_requests.rb
122
122
  - db/migrate/v1.0/0503110010_create_lesli_audit_user_requests.rb
123
- - db/seed/development.rb
124
- - db/seed/production.rb
125
- - db/seed/test.rb
123
+ - db/seed/requests.rb
126
124
  - db/seeds.rb
127
125
  - lib/lesli_audit.rb
128
126
  - lib/lesli_audit/engine.rb
@@ -176,14 +174,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
174
  requirements:
177
175
  - - ">="
178
176
  - !ruby/object:Gem::Version
179
- version: 2.7.2
177
+ version: '0'
180
178
  required_rubygems_version: !ruby/object:Gem::Requirement
181
179
  requirements:
182
180
  - - ">="
183
181
  - !ruby/object:Gem::Version
184
182
  version: '0'
185
183
  requirements: []
186
- rubygems_version: 3.3.7
184
+ rubygems_version: 3.4.19
187
185
  signing_key:
188
186
  specification_version: 4
189
187
  summary: System logs & activities analytics for The Lesli Framework
@@ -1,53 +0,0 @@
1
- =begin
2
-
3
- Lesli
4
-
5
- Copyright (c) 2023, Lesli Technologies, S. A.
6
-
7
- This program is free software: you can redistribute it and/or modify
8
- it under the terms of the GNU General Public License as published by
9
- the Free Software Foundation, either version 3 of the License, or
10
- (at your option) any later version.
11
-
12
- This program is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- GNU General Public License for more details.
16
-
17
- You should have received a copy of the GNU General Public License
18
- along with this program. If not, see http://www.gnu.org/licenses/.
19
-
20
- Lesli · Ruby on Rails SaaS Development Framework.
21
-
22
- Made with ♥ by https://www.lesli.tech
23
- Building a better future, one line of code at a time.
24
-
25
- @contact hello@lesli.tech
26
- @website https://www.lesli.tech
27
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
-
29
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
- =end
32
-
33
- class CreateLesliAuditDashboardComponents < ActiveRecord::Migration[6.1]
34
- def change
35
- gem_path = Lesli::System.engine("Lesli", "dir")
36
- table_base_structure = JSON.parse(File.read(File.join(gem_path, "db", "structure", "00000502_dashboard_components.json")))
37
- create_table :lesli_audit_dashboard_components do |t|
38
- table_base_structure.each do |column|
39
- t.send(
40
- column["type"].parameterize.underscore.to_sym,
41
- column["name"].parameterize.underscore.to_sym
42
- )
43
- end
44
- t.timestamps
45
- end
46
-
47
- add_reference(
48
- :lesli_audit_dashboard_components, :dashboard,
49
- foreign_key: { to_table: :lesli_audit_dashboards },
50
- index: { name: "lesli_audit_dashboard_components_dashboards" }
51
- )
52
- end
53
- end
File without changes
data/db/seed/test.rb DELETED
File without changes
File without changes