lesli_audit 0.5.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 (60) 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 -4081
  4. data/{db/migrate/v1.0/0503050210_create_lesli_audit_dashboard_components.rb → app/assets/stylesheets/lesli_audit/application.css} +6 -24
  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 +32 -4
  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/account/activity_services.rb +2 -2
  12. data/app/services/lesli_audit/analytic_service.rb +12 -7
  13. data/app/services/lesli_audit/analytics/trend_services.rb +2 -2
  14. data/app/services/lesli_audit/analytics/visitor_service.rb +155 -153
  15. data/app/services/lesli_audit/user_service.rb +71 -0
  16. data/app/services/lesli_audit/users/activity_services.rb +2 -2
  17. data/app/services/lesli_audit/users/log_services.rb +2 -2
  18. data/app/services/lesli_audit/users/registration_services.rb +2 -2
  19. data/app/services/lesli_audit/users/role_services.rb +2 -2
  20. data/app/services/lesli_audit/users/working_hour_services.rb +2 -2
  21. data/app/views/lesli_audit/analytics/index.html.erb +42 -1
  22. data/app/views/lesli_audit/dashboards/edit.html.erb +12 -1
  23. data/app/views/lesli_audit/dashboards/index.html.erb +2 -0
  24. data/app/views/lesli_audit/dashboards/new.html.erb +2 -0
  25. data/app/views/lesli_audit/dashboards/show.html.erb +33 -1
  26. data/app/views/lesli_audit/partials/{_engine-navigation.html.erb → _navigation.html.erb} +4 -4
  27. data/app/views/lesli_audit/requests/index.html.erb +23 -1
  28. data/app/views/lesli_audit/users/index.html.erb +14 -1
  29. data/config/locales/translations.en.yml +1 -19
  30. data/config/locales/translations.es.yml +1 -19
  31. data/config/locales/translations.fr.yml +2 -0
  32. data/config/locales/translations.it.yml +2 -0
  33. data/config/locales/translations.pt.yml +2 -0
  34. data/config/routes.rb +5 -21
  35. data/db/migrate/v1.0/0503000110_create_lesli_audit_accounts.rb +1 -6
  36. data/db/migrate/v1.0/0503050110_create_lesli_audit_dashboards.rb +1 -15
  37. data/db/seeds.rb +7 -10
  38. data/lib/lesli_audit/engine.rb +2 -0
  39. data/lib/lesli_audit/version.rb +2 -2
  40. data/{app/assets/stylesheets/lesli_audit → lib/scss}/application.scss +0 -4
  41. data/lib/vue/application.js +14 -14
  42. data/lib/vue/apps/analytics/index.vue +1 -1
  43. data/lib/vue/apps/analytics/trends.vue +2 -3
  44. data/lib/vue/apps/dashboards/components/roles.vue +3 -3
  45. data/lib/vue/apps/dashboards/components/users.vue +3 -3
  46. data/lib/vue/apps/dashboards/show.vue +1 -1
  47. data/lib/vue/apps/requests/index.vue +1 -1
  48. data/lib/vue/apps/users/index.vue +80 -22
  49. data/lib/vue/apps/users/registrations.vue +21 -46
  50. data/lib/vue/components/requests.vue +1 -1
  51. data/lib/vue/components/visitors.vue +4 -4
  52. data/lib/vue/stores/analytics.js +24 -9
  53. data/lib/vue/stores/translations.json +114 -0
  54. data/lib/vue/stores/users.js +56 -0
  55. metadata +17 -15
  56. data/app/assets/stylesheets/lesli_audit/dashboard.scss +0 -0
  57. data/app/controllers/lesli_audit/dashboard/components_controller.rb +0 -60
  58. data/db/seed/production.rb +0 -0
  59. data/db/seed/test.rb +0 -0
  60. /data/db/seed/{development.rb → requests.rb} +0 -0
@@ -1,170 +1,172 @@
1
- =begin
1
+ # =begin
2
2
 
3
- Lesli
3
+ # Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ # Copyright (c) 2023, Lesli Technologies, S. A.
6
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.
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
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.
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
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/.
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
19
 
20
- Lesli · Ruby on Rails SaaS development platform.
20
+ # Lesli · Ruby on Rails SaaS development platform.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
23
- Building a better future, one line of code at a time.
22
+ # Made with ♥ by https://www.lesli.tech
23
+ # Building a better future, one line of code at a time.
24
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
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
28
 
29
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
- =end
29
+ # // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ # // ·
31
+ # =end
32
32
 
33
33
  module LesliAudit
34
34
  class Analytics::VisitorService < Lesli::ApplicationLesliService
35
35
 
36
- LIMIT=5
37
-
38
- # @overwrite
39
- # @return {Hash} Paginated list of the records
40
- # @param {query} Has of the formated queries/filters that will be applied to filter data
41
- # @description
42
- # @example
43
- def visits
44
-
45
- return Lesli::User::Request
46
- .group("DATE_TRUNC('day', created_at)").limit(30)
47
- .order("date DESC")
48
- .limit(30)
49
- .select(
50
- "count(id) resources",
51
- "sum(request_count) requests",
52
- "DATE_TRUNC('day', created_at) date"
53
- ).map do |request|
54
- {
55
- :requests => request[:requests],
56
- :resources => request[:resources],
57
- :date => Date2.new(request[:date]).date.to_s
58
- }
59
- end
60
-
61
- group = 'day'
62
- #group = params[:bygroup] if ['month','week','day'].include?(params[:bygroup])
63
-
64
- # only the users of the account
65
- usrs = current_user.account.users
66
-
67
- requests = ::User::Request.where(user: usrs).group("DATE_TRUNC('month', created_at)") if group == 'month'
68
- requests = ::User::Request.where(user: usrs).group("DATE_TRUNC('week', created_at)") if group == 'week'
69
- requests = ::User::Request.where(user: usrs).group("DATE_TRUNC('day', created_at)") if group == 'day'
70
-
71
- requests = apply_filters(requests, query)
36
+ # LIMIT=5
37
+
38
+ # # @overwrite
39
+ # # @return {Hash} Paginated list of the records
40
+ # # @param {query} Has of the formated queries/filters that will be applied to filter data
41
+ # # @description
42
+ # # @example
43
+ # def visits
44
+
45
+ # return "hola"
46
+
47
+ # return Lesli::User::Request
48
+ # .group("DATE_TRUNC('day', created_at)").limit(30)
49
+ # .order("date DESC")
50
+ # .limit(30)
51
+ # .select(
52
+ # "count(id) resources",
53
+ # "sum(request_count) requests",
54
+ # "DATE_TRUNC('day', created_at) date"
55
+ # ).map do |request|
56
+ # {
57
+ # :requests => request[:requests],
58
+ # :resources => request[:resources],
59
+ # :date => Date2.new(request[:date]).date.to_s
60
+ # }
61
+ # end
62
+
63
+ # group = 'day'
64
+ # #group = params[:bygroup] if ['month','week','day'].include?(params[:bygroup])
65
+
66
+ # # only the users of the account
67
+ # usrs = current_user.account.users
68
+
69
+ # requests = ::User::Request.where(user: usrs).group("DATE_TRUNC('month', created_at)") if group == 'month'
70
+ # requests = ::User::Request.where(user: usrs).group("DATE_TRUNC('week', created_at)") if group == 'week'
71
+ # requests = ::User::Request.where(user: usrs).group("DATE_TRUNC('day', created_at)") if group == 'day'
72
+
73
+ # requests = apply_filters(requests, query)
72
74
 
73
- requests.limit(30).order("date DESC").select(
74
- "count(id) resources",
75
- "sum(request_count) requests",
76
- "DATE_TRUNC('day', created_at) date"
77
- ).map do |request|
78
- {
79
- :requests => request[:requests],
80
- :resources => request[:resources],
81
- :date => Date2.new(request[:date]).date.to_s
82
- }
83
- end
84
- end
85
-
86
- def users
87
- requests = ::User::Request
88
- .joins(:user)
89
- .where(user: current_user.account.users)
90
- .group(:email)
91
-
92
- requests = apply_filters(requests, query)
93
-
94
- requests = requests.limit(LIMIT).order("requests DESC").select(
95
- :email,
96
- "count(user_requests.id) resources",
97
- "sum(user_requests.request_count) requests"
98
- ).map do |request|
99
- {
100
- :requests => request[:requests],
101
- :resources => request[:resources],
102
- :email => request[:email]
103
- }
104
- end
105
-
106
- return requests
107
- end
108
-
109
- def devices
110
- agents = ::User::Agent.where(user: current_user.account.users)
111
- agents = agents.group("platform", "browser")
112
- agents = agents.limit(LIMIT).order(sum_count: :desc).sum(:count).map do |req|
113
- {
114
- :device => req[0].join("/"),
115
- :visits => req[1]
116
- }
117
- end
118
-
119
- return agents
120
- end
121
-
122
- def controllers
123
- requests = Lesli::User::Request.where(lesli_user: current_user.account.users).group("request_controller")
124
-
125
- requests = apply_filters(requests, query)
126
-
127
- requests = requests.limit(LIMIT).order("requests DESC").select(
128
- :request_controller,
129
- "sum(request_count) requests"
130
- )
75
+ # requests.limit(30).order("date DESC").select(
76
+ # "count(id) resources",
77
+ # "sum(request_count) requests",
78
+ # "DATE_TRUNC('day', created_at) date"
79
+ # ).map do |request|
80
+ # {
81
+ # :requests => request[:requests],
82
+ # :resources => request[:resources],
83
+ # :date => Date2.new(request[:date]).date.to_s
84
+ # }
85
+ # end
86
+ # end
87
+
88
+ # def users
89
+ # requests = ::User::Request
90
+ # .joins(:user)
91
+ # .where(user: current_user.account.users)
92
+ # .group(:email)
93
+
94
+ # requests = apply_filters(requests, query)
95
+
96
+ # requests = requests.limit(LIMIT).order("requests DESC").select(
97
+ # :email,
98
+ # "count(user_requests.id) resources",
99
+ # "sum(user_requests.request_count) requests"
100
+ # ).map do |request|
101
+ # {
102
+ # :requests => request[:requests],
103
+ # :resources => request[:resources],
104
+ # :email => request[:email]
105
+ # }
106
+ # end
107
+
108
+ # return requests
109
+ # end
110
+
111
+ # def devices
112
+ # agents = ::User::Agent.where(user: current_user.account.users)
113
+ # agents = agents.group("platform", "browser")
114
+ # agents = agents.limit(LIMIT).order(sum_count: :desc).sum(:count).map do |req|
115
+ # {
116
+ # :device => req[0].join("/"),
117
+ # :visits => req[1]
118
+ # }
119
+ # end
120
+
121
+ # return agents
122
+ # end
123
+
124
+ # def controllers
125
+ # requests = Lesli::User::Request.where(lesli_user: current_user.account.users).group("request_controller")
126
+
127
+ # requests = apply_filters(requests, query)
128
+
129
+ # requests = requests.limit(LIMIT).order("requests DESC").select(
130
+ # :request_controller,
131
+ # "sum(request_count) requests"
132
+ # )
131
133
 
132
- return requests
133
- end
134
-
135
- private
136
-
137
- def apply_filters requests, params
138
-
139
- return requests
140
-
141
- # filter by search string
142
- unless params[:search].blank?
143
- requests = requests.where(
144
- "lower(request_agent) like :search_string or lower(request_controller) like :search_string or lower(request_action) like :search_string",
145
- {
146
- search_string: "%#{params[:search].downcase.gsub(" ","%")}%"
147
- }
148
- )
149
- end
150
-
151
- # filter by time
152
- unless params[:bytime].blank? && params[:bytime] != 'all'
153
- requests = requests.where(created_at: (Time.now.beginning_of_day)..) if params[:bytime] == 'day'
154
- requests = requests.where(created_at: (Time.now.beginning_of_day - 7.day)..) if params[:bytime] == 'week'
155
- requests = requests.where(created_at: (Time.now.beginning_of_day - 30.day)..) if params[:bytime] == 'month'
156
- requests = requests.where(created_at: (Time.now.beginning_of_day - 6.month)..) if params[:bytime] == 'sixmonth'
157
- requests = requests.where(created_at: (Time.now.beginning_of_day - 1.year)..) if params[:bytime] == 'year'
158
- end
159
-
160
- # filter by request format
161
- if (!params[:byformat].blank? && ['html', 'json'].include?(params[:byformat]))
162
- requests = requests.where(:request_action => 'show') if params[:byformat] == 'html'
163
- requests = requests.where(:request_format => params[:byformat])
164
- end
165
-
166
- requests
167
-
168
- end
134
+ # return requests
135
+ # end
136
+
137
+ # private
138
+
139
+ # def apply_filters requests, params
140
+
141
+ # return requests
142
+
143
+ # # filter by search string
144
+ # unless params[:search].blank?
145
+ # requests = requests.where(
146
+ # "lower(request_agent) like :search_string or lower(request_controller) like :search_string or lower(request_action) like :search_string",
147
+ # {
148
+ # search_string: "%#{params[:search].downcase.gsub(" ","%")}%"
149
+ # }
150
+ # )
151
+ # end
152
+
153
+ # # filter by time
154
+ # unless params[:bytime].blank? && params[:bytime] != 'all'
155
+ # requests = requests.where(created_at: (Time.now.beginning_of_day)..) if params[:bytime] == 'day'
156
+ # requests = requests.where(created_at: (Time.now.beginning_of_day - 7.day)..) if params[:bytime] == 'week'
157
+ # requests = requests.where(created_at: (Time.now.beginning_of_day - 30.day)..) if params[:bytime] == 'month'
158
+ # requests = requests.where(created_at: (Time.now.beginning_of_day - 6.month)..) if params[:bytime] == 'sixmonth'
159
+ # requests = requests.where(created_at: (Time.now.beginning_of_day - 1.year)..) if params[:bytime] == 'year'
160
+ # end
161
+
162
+ # # filter by request format
163
+ # if (!params[:byformat].blank? && ['html', 'json'].include?(params[:byformat]))
164
+ # requests = requests.where(:request_action => 'show') if params[:byformat] == 'html'
165
+ # requests = requests.where(:request_format => params[:byformat])
166
+ # end
167
+
168
+ # requests
169
+
170
+ # end
169
171
  end
170
172
  end
@@ -0,0 +1,71 @@
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 platform.
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
+ module LesliAudit
34
+ class UserService < Lesli::ApplicationLesliService
35
+
36
+ def registrations
37
+
38
+ #Get filters from the request
39
+ group = query[:group]
40
+ group = "month"
41
+
42
+ #Get period only if the request have filters
43
+ period = group unless group.blank?
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
+
54
+ registrations = []
55
+
56
+ if ["day", "week", "month", "year"].include?(period)
57
+
58
+ registrations = current_user.account.users
59
+ .group(group_by)
60
+ .count.map do |request|
61
+ {
62
+ :date => request[0],
63
+ :count => request[1]
64
+ }
65
+ end
66
+ end
67
+
68
+ registrations
69
+ end
70
+ end
71
+ end
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::ActivityServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::ActivityServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::LogServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::LogServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::RegistrationServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::RegistrationServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::RoleServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::RoleServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::WorkingHourServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::WorkingHourServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -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") %>
@@ -18,9 +18,9 @@ GNU General Public License for more details.
18
18
  You should have received a copy of the GNU General Public License
19
19
  along with this program. If not, see http://www.gnu.org/licenses/.
20
20
 
21
- Lesli · Ruby on Rails SaaS development platform.
21
+ Lesli · Ruby on Rails SaaS Development Framework.
22
22
 
23
- Made with ♥ by https://www.lesli.tech
23
+ Made with ♥ by LesliTech
24
24
  Building a better future, one line of code at a time.
25
25
 
26
26
  @contact hello@lesli.tech
@@ -32,8 +32,8 @@ Building a better future, one line of code at a time.
32
32
  =end
33
33
  %>
34
34
 
35
- <%= navigation_item(lesli_audit.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
35
+ <%#= navigation_item(lesli_audit.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
36
36
  <%= navigation_item(lesli_audit.users_path, "Users", "ri-team-line"); %>
37
37
  <%= navigation_item(lesli_audit.analytics_path, "Analytics", "ri-pie-chart-line"); %>
38
- <%= navigation_item(lesli_audit.dashboard_path, "Account", "ri-briefcase-line"); %>
38
+ <%#= navigation_item(lesli_audit.dashboard_path, "Account", "ri-briefcase-line"); %>
39
39
  <%= navigation_item(lesli_audit.requests_path, "Requests", "ri-arrow-left-right-fill"); %>
@@ -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,20 +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
- application:
19
- navigation_logout: Logout
20
- navigation_my_profile: My profile
2
+ :en: {}