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.
- checksums.yaml +4 -4
- data/app/assets/config/lesli_audit_manifest.js +0 -1
- data/app/assets/javascripts/lesli_audit/application.js +1 -4081
- data/{db/migrate/v1.0/0503050210_create_lesli_audit_dashboard_components.rb → app/assets/stylesheets/lesli_audit/application.css} +6 -24
- data/app/controllers/lesli_audit/analytics_controller.rb +3 -13
- data/app/controllers/lesli_audit/dashboards_controller.rb +2 -0
- data/app/controllers/lesli_audit/requests_controller.rb +1 -6
- data/app/controllers/lesli_audit/users_controller.rb +32 -4
- data/app/interfaces/lesli_audit/logger_interface.rb +132 -0
- data/app/models/lesli_audit/dashboard.rb +0 -25
- data/app/services/lesli_audit/account/activity_services.rb +2 -2
- data/app/services/lesli_audit/analytic_service.rb +12 -7
- data/app/services/lesli_audit/analytics/trend_services.rb +2 -2
- data/app/services/lesli_audit/analytics/visitor_service.rb +155 -153
- data/app/services/lesli_audit/user_service.rb +71 -0
- data/app/services/lesli_audit/users/activity_services.rb +2 -2
- data/app/services/lesli_audit/users/log_services.rb +2 -2
- data/app/services/lesli_audit/users/registration_services.rb +2 -2
- data/app/services/lesli_audit/users/role_services.rb +2 -2
- data/app/services/lesli_audit/users/working_hour_services.rb +2 -2
- data/app/views/lesli_audit/analytics/index.html.erb +42 -1
- data/app/views/lesli_audit/dashboards/edit.html.erb +12 -1
- data/app/views/lesli_audit/dashboards/index.html.erb +2 -0
- data/app/views/lesli_audit/dashboards/new.html.erb +2 -0
- data/app/views/lesli_audit/dashboards/show.html.erb +33 -1
- data/app/views/lesli_audit/partials/{_engine-navigation.html.erb → _navigation.html.erb} +4 -4
- data/app/views/lesli_audit/requests/index.html.erb +23 -1
- data/app/views/lesli_audit/users/index.html.erb +14 -1
- data/config/locales/translations.en.yml +1 -19
- data/config/locales/translations.es.yml +1 -19
- data/config/locales/translations.fr.yml +2 -0
- data/config/locales/translations.it.yml +2 -0
- data/config/locales/translations.pt.yml +2 -0
- data/config/routes.rb +5 -21
- data/db/migrate/v1.0/0503000110_create_lesli_audit_accounts.rb +1 -6
- data/db/migrate/v1.0/0503050110_create_lesli_audit_dashboards.rb +1 -15
- data/db/seeds.rb +7 -10
- data/lib/lesli_audit/engine.rb +2 -0
- data/lib/lesli_audit/version.rb +2 -2
- data/{app/assets/stylesheets/lesli_audit → lib/scss}/application.scss +0 -4
- data/lib/vue/application.js +14 -14
- data/lib/vue/apps/analytics/index.vue +1 -1
- data/lib/vue/apps/analytics/trends.vue +2 -3
- data/lib/vue/apps/dashboards/components/roles.vue +3 -3
- data/lib/vue/apps/dashboards/components/users.vue +3 -3
- data/lib/vue/apps/dashboards/show.vue +1 -1
- data/lib/vue/apps/requests/index.vue +1 -1
- data/lib/vue/apps/users/index.vue +80 -22
- data/lib/vue/apps/users/registrations.vue +21 -46
- data/lib/vue/components/requests.vue +1 -1
- data/lib/vue/components/visitors.vue +4 -4
- data/lib/vue/stores/analytics.js +24 -9
- data/lib/vue/stores/translations.json +114 -0
- data/lib/vue/stores/users.js +56 -0
- metadata +17 -15
- data/app/assets/stylesheets/lesli_audit/dashboard.scss +0 -0
- data/app/controllers/lesli_audit/dashboard/components_controller.rb +0 -60
- data/db/seed/production.rb +0 -0
- data/db/seed/test.rb +0 -0
- /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
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
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
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
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
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
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
|
34
|
-
class Users::ActivityServices <
|
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
|
34
|
-
class Users::LogServices <
|
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
|
34
|
-
class Users::RegistrationServices <
|
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
|
34
|
-
class Users::RoleServices <
|
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
|
34
|
-
class Users::WorkingHourServices <
|
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
|
-
|
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
|
-
|
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 +1,33 @@
|
|
1
|
-
|
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
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
22
22
|
|
23
|
-
Made with ♥ by
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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: {}
|