lesli_audit 1.1.1 → 1.1.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.
- checksums.yaml +4 -4
- data/Rakefile +6 -1
- data/app/assets/stylesheets/lesli_audit/application.css +549 -35
- data/app/controllers/lesli_audit/accounts_controller.rb +7 -3
- data/app/controllers/lesli_audit/analytics_controller.rb +16 -0
- data/app/controllers/lesli_audit/logs_controller.rb +12 -7
- data/app/controllers/lesli_audit/traffic_controller.rb +25 -0
- data/app/controllers/lesli_audit/users_controller.rb +7 -4
- data/app/interfaces/lesli_audit/logger_interface.rb +56 -58
- data/app/jobs/lesli_audit/cloudflare_traffic_sync_job.rb +78 -0
- data/app/jobs/lesli_audit/retention_cleanup_job.rb +9 -0
- data/app/models/concerns/lesli_audit/append_only.rb +12 -0
- data/app/models/lesli_audit/account.rb +38 -10
- data/app/models/lesli_audit/account_device.rb +3 -1
- data/app/models/lesli_audit/account_log.rb +12 -7
- data/app/models/lesli_audit/account_request.rb +3 -1
- data/app/models/lesli_audit/cloudflare_traffic_sync.rb +99 -0
- data/app/models/lesli_audit/traffic_breakdown.rb +38 -0
- data/app/models/lesli_audit/traffic_rollup.rb +33 -0
- data/app/models/lesli_audit/user_journal.rb +14 -3
- data/app/models/lesli_audit/user_log.rb +12 -3
- data/app/models/lesli_audit/user_request.rb +7 -3
- data/app/services/lesli_audit/activity_audit.rb +134 -0
- data/app/services/lesli_audit/analytics_service.rb +237 -0
- data/app/services/lesli_audit/cloudflare/configuration.rb +92 -0
- data/app/services/lesli_audit/cloudflare/graphql_client.rb +309 -0
- data/app/services/lesli_audit/cloudflare/snapshot_converter.rb +101 -0
- data/app/services/lesli_audit/cloudflare/sync_service.rb +79 -0
- data/app/services/lesli_audit/cloudflare_traffic_snapshot.rb +182 -0
- data/app/services/lesli_audit/log_service.rb +99 -5
- data/app/services/lesli_audit/request_service.rb +74 -44
- data/app/services/lesli_audit/retention_cleanup.rb +146 -0
- data/app/services/lesli_audit/traffic_service.rb +216 -0
- data/app/services/lesli_audit/traffic_snapshot_importer.rb +120 -0
- data/app/services/lesli_audit/user_agent_parser.rb +51 -0
- data/app/services/lesli_audit/user_service.rb +119 -150
- data/app/views/lesli_audit/{visitors → analytics}/index.html.erb +40 -30
- data/app/views/lesli_audit/logs/index.html.erb +88 -19
- data/app/views/lesli_audit/logs/show.html.erb +41 -7
- data/app/views/lesli_audit/partials/_navigation.html.erb +5 -4
- data/app/views/lesli_audit/requests/index.html.erb +80 -19
- data/app/views/lesli_audit/traffic/_breakdown.html.erb +46 -0
- data/app/views/lesli_audit/traffic/index.html.erb +177 -0
- data/app/views/lesli_audit/users/index.html.erb +97 -43
- data/config/locales/translations.en.yml +137 -1
- data/config/locales/translations.es.yml +137 -1
- data/config/locales/translations.fr.yml +132 -1
- data/config/locales/translations.it.yml +132 -1
- data/config/locales/translations.pt.yml +132 -1
- data/config/routes.rb +6 -22
- data/db/migrate/v1.0/0501000110_create_lesli_audit_accounts.rb +14 -1
- data/db/migrate/v1.0/0501110110_create_lesli_audit_account_logs.rb +11 -6
- data/db/migrate/v1.0/0501110210_create_lesli_audit_account_devices.rb +10 -7
- data/db/migrate/v1.0/0501110310_create_lesli_audit_account_requests.rb +10 -7
- data/db/migrate/v1.0/0501120110_create_lesli_audit_user_logs.rb +12 -7
- data/db/migrate/v1.0/0501120210_create_lesli_audit_user_journals.rb +16 -8
- data/db/migrate/v1.0/0501120310_create_lesli_audit_user_requests.rb +13 -10
- data/db/migrate/v1.0/0501130110_create_lesli_audit_traffic_rollups.rb +55 -0
- data/db/migrate/v1.0/0501130210_create_lesli_audit_traffic_breakdowns.rb +41 -0
- data/db/migrate/v1.0/0501130310_create_lesli_audit_cloudflare_traffic_syncs.rb +42 -0
- data/db/seed/devices.rb +3 -2
- data/db/seed/requests.rb +3 -3
- data/db/seed/traffic.rb +128 -0
- data/db/seed/users.rb +68 -27
- data/db/seeds.rb +3 -2
- data/lib/lesli_audit/engine.rb +1 -12
- data/lib/lesli_audit/version.rb +2 -2
- data/lib/tasks/lesli_audit_cloudflare_traffic.rake +16 -0
- data/lib/tasks/lesli_audit_tasks.rake +12 -4
- data/readme.md +28 -5
- metadata +36 -9
- data/app/assets/stylesheets/lesli_audit/application.tailwind.css +0 -2
- data/app/controllers/lesli_audit/visitors_controller.rb +0 -14
- data/app/models/concerns/lesli_audit/user_associations.rb +0 -11
- data/app/services/lesli_audit/visitor_service.rb +0 -239
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc87690d4e0c3d33349d21bba5008b3a303badd7e5e383e4b00145f057099d6c
|
|
4
|
+
data.tar.gz: 8f621fb6f7a4f30b7c515ba666b6a9e82bbdea7cc2f776be2848c280716f8da5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 394689968d6234bcd0bfe7c93345e3f8032159eba78106136fbe65bb9b72eb578ced91688ea47dfe2910a28e908137fa105dd8ba039a8534e0dee92e31bc3be8
|
|
7
|
+
data.tar.gz: dc0a38e689115d0c43014988b3a902335f983a24094c24a652aa89a35a80622aa891e05f6c5fddb25eaa763767f048d3f0b92a7fdcfbd9bda80ff1827cc1a0db
|
data/Rakefile
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
require "bundler/setup"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
|
|
4
|
+
|
|
5
|
+
load "rails/tasks/engine.rake"
|
|
4
6
|
|
|
5
7
|
require "bundler/gem_tasks"
|
|
8
|
+
|
|
9
|
+
desc "Run engine tests through the dummy Rails application"
|
|
10
|
+
task test: "app:test"
|
|
@@ -1,35 +1,549 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
@layer theme, utilities;
|
|
4
|
+
@layer theme {
|
|
5
|
+
:root, :host {
|
|
6
|
+
--color-amber-50: oklch(98.7% 0.022 95.277);
|
|
7
|
+
--color-amber-300: oklch(87.9% 0.169 91.605);
|
|
8
|
+
--color-amber-600: oklch(66.6% 0.179 58.318);
|
|
9
|
+
--color-amber-900: oklch(41.4% 0.112 45.904);
|
|
10
|
+
--color-sky-600: oklch(58.8% 0.158 241.966);
|
|
11
|
+
--color-sky-700: oklch(50% 0.134 242.749);
|
|
12
|
+
--color-sky-900: oklch(39.1% 0.09 240.876);
|
|
13
|
+
--color-rose-600: oklch(58.6% 0.253 17.585);
|
|
14
|
+
--color-slate-50: oklch(98.4% 0.003 247.858);
|
|
15
|
+
--color-slate-100: oklch(96.8% 0.007 247.896);
|
|
16
|
+
--color-slate-200: oklch(92.9% 0.013 255.508);
|
|
17
|
+
--color-slate-300: oklch(86.9% 0.022 252.894);
|
|
18
|
+
--color-slate-400: oklch(70.4% 0.04 256.788);
|
|
19
|
+
--color-slate-500: oklch(55.4% 0.046 257.417);
|
|
20
|
+
--color-slate-600: oklch(44.6% 0.043 257.281);
|
|
21
|
+
--color-slate-700: oklch(37.2% 0.044 257.287);
|
|
22
|
+
--color-slate-800: oklch(27.9% 0.041 260.031);
|
|
23
|
+
--color-slate-900: oklch(20.8% 0.042 265.755);
|
|
24
|
+
--color-white: #fff;
|
|
25
|
+
--spacing: 0.25rem;
|
|
26
|
+
--container-xl: 36rem;
|
|
27
|
+
--text-xs: 0.75rem;
|
|
28
|
+
--text-xs--line-height: calc(1 / 0.75);
|
|
29
|
+
--text-sm: 0.875rem;
|
|
30
|
+
--text-sm--line-height: calc(1.25 / 0.875);
|
|
31
|
+
--text-base: 1rem;
|
|
32
|
+
--text-base--line-height: calc(1.5 / 1);
|
|
33
|
+
--text-lg: 1.125rem;
|
|
34
|
+
--text-lg--line-height: calc(1.75 / 1.125);
|
|
35
|
+
--text-xl: 1.25rem;
|
|
36
|
+
--text-xl--line-height: calc(1.75 / 1.25);
|
|
37
|
+
--text-3xl: 1.875rem;
|
|
38
|
+
--text-3xl--line-height: calc(2.25 / 1.875);
|
|
39
|
+
--font-weight-medium: 500;
|
|
40
|
+
--font-weight-semibold: 600;
|
|
41
|
+
--tracking-tight: -0.025em;
|
|
42
|
+
--tracking-wide: 0.025em;
|
|
43
|
+
--radius-md: 0.375rem;
|
|
44
|
+
--radius-lg: 0.5rem;
|
|
45
|
+
--radius-xl: 0.75rem;
|
|
46
|
+
--radius-2xl: 1rem;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
@layer utilities {
|
|
50
|
+
.sr-only {
|
|
51
|
+
position: absolute;
|
|
52
|
+
width: 1px;
|
|
53
|
+
height: 1px;
|
|
54
|
+
padding: 0;
|
|
55
|
+
margin: -1px;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
clip-path: inset(50%);
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
border-width: 0;
|
|
60
|
+
}
|
|
61
|
+
.absolute {
|
|
62
|
+
position: absolute;
|
|
63
|
+
}
|
|
64
|
+
.relative {
|
|
65
|
+
position: relative;
|
|
66
|
+
}
|
|
67
|
+
.inset-y-0 {
|
|
68
|
+
inset-block: 0px;
|
|
69
|
+
}
|
|
70
|
+
.left-0 {
|
|
71
|
+
left: 0px;
|
|
72
|
+
}
|
|
73
|
+
.isolate {
|
|
74
|
+
isolation: isolate;
|
|
75
|
+
}
|
|
76
|
+
.-z-10 {
|
|
77
|
+
z-index: calc(10 * -1);
|
|
78
|
+
}
|
|
79
|
+
.mx-auto {
|
|
80
|
+
margin-inline: auto;
|
|
81
|
+
}
|
|
82
|
+
.mt-0\.5 {
|
|
83
|
+
margin-top: calc(var(--spacing) * 0.5);
|
|
84
|
+
}
|
|
85
|
+
.mt-1 {
|
|
86
|
+
margin-top: var(--spacing);
|
|
87
|
+
}
|
|
88
|
+
.mt-3 {
|
|
89
|
+
margin-top: calc(var(--spacing) * 3);
|
|
90
|
+
}
|
|
91
|
+
.mt-4 {
|
|
92
|
+
margin-top: calc(var(--spacing) * 4);
|
|
93
|
+
}
|
|
94
|
+
.mt-6 {
|
|
95
|
+
margin-top: calc(var(--spacing) * 6);
|
|
96
|
+
}
|
|
97
|
+
.mb-1\.5 {
|
|
98
|
+
margin-bottom: calc(var(--spacing) * 1.5);
|
|
99
|
+
}
|
|
100
|
+
.mb-4 {
|
|
101
|
+
margin-bottom: calc(var(--spacing) * 4);
|
|
102
|
+
}
|
|
103
|
+
.mb-6 {
|
|
104
|
+
margin-bottom: calc(var(--spacing) * 6);
|
|
105
|
+
}
|
|
106
|
+
.block {
|
|
107
|
+
display: block;
|
|
108
|
+
}
|
|
109
|
+
.flex {
|
|
110
|
+
display: flex;
|
|
111
|
+
}
|
|
112
|
+
.grid {
|
|
113
|
+
display: grid;
|
|
114
|
+
}
|
|
115
|
+
.inline-flex {
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
}
|
|
118
|
+
.h-7 {
|
|
119
|
+
height: calc(var(--spacing) * 7);
|
|
120
|
+
}
|
|
121
|
+
.h-8 {
|
|
122
|
+
height: calc(var(--spacing) * 8);
|
|
123
|
+
}
|
|
124
|
+
.w-7 {
|
|
125
|
+
width: calc(var(--spacing) * 7);
|
|
126
|
+
}
|
|
127
|
+
.w-8 {
|
|
128
|
+
width: calc(var(--spacing) * 8);
|
|
129
|
+
}
|
|
130
|
+
.w-full {
|
|
131
|
+
width: 100%;
|
|
132
|
+
}
|
|
133
|
+
.max-w-xl {
|
|
134
|
+
max-width: var(--container-xl);
|
|
135
|
+
}
|
|
136
|
+
.\!min-w-0 {
|
|
137
|
+
min-width: 0px !important;
|
|
138
|
+
}
|
|
139
|
+
.min-w-0 {
|
|
140
|
+
min-width: 0px;
|
|
141
|
+
}
|
|
142
|
+
.shrink-0 {
|
|
143
|
+
flex-shrink: 0;
|
|
144
|
+
}
|
|
145
|
+
.cursor-pointer {
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
}
|
|
148
|
+
.grid-cols-1 {
|
|
149
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
150
|
+
}
|
|
151
|
+
.flex-col {
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
}
|
|
154
|
+
.items-center {
|
|
155
|
+
align-items: center;
|
|
156
|
+
}
|
|
157
|
+
.items-end {
|
|
158
|
+
align-items: flex-end;
|
|
159
|
+
}
|
|
160
|
+
.items-start {
|
|
161
|
+
align-items: flex-start;
|
|
162
|
+
}
|
|
163
|
+
.justify-between {
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
}
|
|
166
|
+
.justify-center {
|
|
167
|
+
justify-content: center;
|
|
168
|
+
}
|
|
169
|
+
.gap-2 {
|
|
170
|
+
gap: calc(var(--spacing) * 2);
|
|
171
|
+
}
|
|
172
|
+
.gap-3 {
|
|
173
|
+
gap: calc(var(--spacing) * 3);
|
|
174
|
+
}
|
|
175
|
+
.gap-4 {
|
|
176
|
+
gap: calc(var(--spacing) * 4);
|
|
177
|
+
}
|
|
178
|
+
.gap-6 {
|
|
179
|
+
gap: calc(var(--spacing) * 6);
|
|
180
|
+
}
|
|
181
|
+
.truncate {
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
text-overflow: ellipsis;
|
|
184
|
+
white-space: nowrap;
|
|
185
|
+
}
|
|
186
|
+
.overflow-hidden {
|
|
187
|
+
overflow: hidden;
|
|
188
|
+
}
|
|
189
|
+
.rounded-2xl {
|
|
190
|
+
border-radius: var(--radius-2xl);
|
|
191
|
+
}
|
|
192
|
+
.rounded-lg {
|
|
193
|
+
border-radius: var(--radius-lg);
|
|
194
|
+
}
|
|
195
|
+
.rounded-md {
|
|
196
|
+
border-radius: var(--radius-md);
|
|
197
|
+
}
|
|
198
|
+
.rounded-xl {
|
|
199
|
+
border-radius: var(--radius-xl);
|
|
200
|
+
}
|
|
201
|
+
.border {
|
|
202
|
+
border-style: var(--tw-border-style);
|
|
203
|
+
border-width: 1px;
|
|
204
|
+
}
|
|
205
|
+
.border-dashed {
|
|
206
|
+
--tw-border-style: dashed;
|
|
207
|
+
border-style: dashed;
|
|
208
|
+
}
|
|
209
|
+
.border-amber-300 {
|
|
210
|
+
border-color: var(--color-amber-300);
|
|
211
|
+
}
|
|
212
|
+
.border-slate-200 {
|
|
213
|
+
border-color: var(--color-slate-200);
|
|
214
|
+
}
|
|
215
|
+
.border-slate-300 {
|
|
216
|
+
border-color: var(--color-slate-300);
|
|
217
|
+
}
|
|
218
|
+
.bg-amber-50 {
|
|
219
|
+
background-color: var(--color-amber-50);
|
|
220
|
+
}
|
|
221
|
+
.bg-slate-50 {
|
|
222
|
+
background-color: var(--color-slate-50);
|
|
223
|
+
}
|
|
224
|
+
.bg-slate-100 {
|
|
225
|
+
background-color: var(--color-slate-100);
|
|
226
|
+
}
|
|
227
|
+
.bg-slate-900 {
|
|
228
|
+
background-color: var(--color-slate-900);
|
|
229
|
+
}
|
|
230
|
+
.bg-white {
|
|
231
|
+
background-color: var(--color-white);
|
|
232
|
+
}
|
|
233
|
+
.\!p-0 {
|
|
234
|
+
padding: 0px !important;
|
|
235
|
+
}
|
|
236
|
+
.p-4 {
|
|
237
|
+
padding: calc(var(--spacing) * 4);
|
|
238
|
+
}
|
|
239
|
+
.p-5 {
|
|
240
|
+
padding: calc(var(--spacing) * 5);
|
|
241
|
+
}
|
|
242
|
+
.px-3 {
|
|
243
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
244
|
+
}
|
|
245
|
+
.px-4 {
|
|
246
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
247
|
+
}
|
|
248
|
+
.px-6 {
|
|
249
|
+
padding-inline: calc(var(--spacing) * 6);
|
|
250
|
+
}
|
|
251
|
+
.py-2 {
|
|
252
|
+
padding-block: calc(var(--spacing) * 2);
|
|
253
|
+
}
|
|
254
|
+
.py-2\.5 {
|
|
255
|
+
padding-block: calc(var(--spacing) * 2.5);
|
|
256
|
+
}
|
|
257
|
+
.py-12 {
|
|
258
|
+
padding-block: calc(var(--spacing) * 12);
|
|
259
|
+
}
|
|
260
|
+
.pb-8 {
|
|
261
|
+
padding-bottom: calc(var(--spacing) * 8);
|
|
262
|
+
}
|
|
263
|
+
.text-center {
|
|
264
|
+
text-align: center;
|
|
265
|
+
}
|
|
266
|
+
.text-3xl {
|
|
267
|
+
font-size: var(--text-3xl);
|
|
268
|
+
line-height: var(--tw-leading, var(--text-3xl--line-height));
|
|
269
|
+
}
|
|
270
|
+
.text-base {
|
|
271
|
+
font-size: var(--text-base);
|
|
272
|
+
line-height: var(--tw-leading, var(--text-base--line-height));
|
|
273
|
+
}
|
|
274
|
+
.text-lg {
|
|
275
|
+
font-size: var(--text-lg);
|
|
276
|
+
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
277
|
+
}
|
|
278
|
+
.text-sm {
|
|
279
|
+
font-size: var(--text-sm);
|
|
280
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
281
|
+
}
|
|
282
|
+
.text-xl {
|
|
283
|
+
font-size: var(--text-xl);
|
|
284
|
+
line-height: var(--tw-leading, var(--text-xl--line-height));
|
|
285
|
+
}
|
|
286
|
+
.text-xs {
|
|
287
|
+
font-size: var(--text-xs);
|
|
288
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
289
|
+
}
|
|
290
|
+
.leading-none {
|
|
291
|
+
--tw-leading: 1;
|
|
292
|
+
line-height: 1;
|
|
293
|
+
}
|
|
294
|
+
.font-medium {
|
|
295
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
296
|
+
font-weight: var(--font-weight-medium);
|
|
297
|
+
}
|
|
298
|
+
.font-semibold {
|
|
299
|
+
--tw-font-weight: var(--font-weight-semibold);
|
|
300
|
+
font-weight: var(--font-weight-semibold);
|
|
301
|
+
}
|
|
302
|
+
.tracking-tight {
|
|
303
|
+
--tw-tracking: var(--tracking-tight);
|
|
304
|
+
letter-spacing: var(--tracking-tight);
|
|
305
|
+
}
|
|
306
|
+
.tracking-wide {
|
|
307
|
+
--tw-tracking: var(--tracking-wide);
|
|
308
|
+
letter-spacing: var(--tracking-wide);
|
|
309
|
+
}
|
|
310
|
+
.break-words {
|
|
311
|
+
overflow-wrap: break-word;
|
|
312
|
+
}
|
|
313
|
+
.whitespace-pre-wrap {
|
|
314
|
+
white-space: pre-wrap;
|
|
315
|
+
}
|
|
316
|
+
.text-amber-600 {
|
|
317
|
+
color: var(--color-amber-600);
|
|
318
|
+
}
|
|
319
|
+
.text-amber-900 {
|
|
320
|
+
color: var(--color-amber-900);
|
|
321
|
+
}
|
|
322
|
+
.text-rose-600 {
|
|
323
|
+
color: var(--color-rose-600);
|
|
324
|
+
}
|
|
325
|
+
.text-sky-600 {
|
|
326
|
+
color: var(--color-sky-600);
|
|
327
|
+
}
|
|
328
|
+
.text-sky-700 {
|
|
329
|
+
color: var(--color-sky-700);
|
|
330
|
+
}
|
|
331
|
+
.text-slate-400 {
|
|
332
|
+
color: var(--color-slate-400);
|
|
333
|
+
}
|
|
334
|
+
.text-slate-500 {
|
|
335
|
+
color: var(--color-slate-500);
|
|
336
|
+
}
|
|
337
|
+
.text-slate-600 {
|
|
338
|
+
color: var(--color-slate-600);
|
|
339
|
+
}
|
|
340
|
+
.text-slate-700 {
|
|
341
|
+
color: var(--color-slate-700);
|
|
342
|
+
}
|
|
343
|
+
.text-slate-800 {
|
|
344
|
+
color: var(--color-slate-800);
|
|
345
|
+
}
|
|
346
|
+
.text-slate-900 {
|
|
347
|
+
color: var(--color-slate-900);
|
|
348
|
+
}
|
|
349
|
+
.text-white {
|
|
350
|
+
color: var(--color-white);
|
|
351
|
+
}
|
|
352
|
+
.uppercase {
|
|
353
|
+
text-transform: uppercase;
|
|
354
|
+
}
|
|
355
|
+
.tabular-nums {
|
|
356
|
+
--tw-numeric-spacing: tabular-nums;
|
|
357
|
+
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
358
|
+
}
|
|
359
|
+
.shadow-sm {
|
|
360
|
+
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
361
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
362
|
+
}
|
|
363
|
+
@media (hover: hover) {
|
|
364
|
+
.hover\:bg-slate-700:hover {
|
|
365
|
+
background-color: var(--color-slate-700);
|
|
366
|
+
}
|
|
367
|
+
.hover\:text-sky-900:hover {
|
|
368
|
+
color: var(--color-sky-900);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
@media (width >= 40rem) {
|
|
372
|
+
.sm\:col-span-2 {
|
|
373
|
+
grid-column: span 2 / span 2;
|
|
374
|
+
}
|
|
375
|
+
.sm\:grid-cols-2 {
|
|
376
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
377
|
+
}
|
|
378
|
+
.sm\:flex-row {
|
|
379
|
+
flex-direction: row;
|
|
380
|
+
}
|
|
381
|
+
.sm\:items-center {
|
|
382
|
+
align-items: center;
|
|
383
|
+
}
|
|
384
|
+
.sm\:justify-between {
|
|
385
|
+
justify-content: space-between;
|
|
386
|
+
}
|
|
387
|
+
.sm\:text-right {
|
|
388
|
+
text-align: right;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
@media (width >= 48rem) {
|
|
392
|
+
.md\:grid-cols-4 {
|
|
393
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
@media (width >= 64rem) {
|
|
397
|
+
.lg\:w-2\/5 {
|
|
398
|
+
width: calc(2 / 5 * 100%);
|
|
399
|
+
}
|
|
400
|
+
.lg\:grid-cols-3 {
|
|
401
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
402
|
+
}
|
|
403
|
+
.lg\:grid-cols-4 {
|
|
404
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
405
|
+
}
|
|
406
|
+
.lg\:grid-cols-5 {
|
|
407
|
+
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
@media (width >= 80rem) {
|
|
411
|
+
.xl\:grid-cols-2 {
|
|
412
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
413
|
+
}
|
|
414
|
+
.xl\:grid-cols-3 {
|
|
415
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
@property --tw-border-style {
|
|
420
|
+
syntax: "*";
|
|
421
|
+
inherits: false;
|
|
422
|
+
initial-value: solid;
|
|
423
|
+
}
|
|
424
|
+
@property --tw-leading {
|
|
425
|
+
syntax: "*";
|
|
426
|
+
inherits: false;
|
|
427
|
+
}
|
|
428
|
+
@property --tw-font-weight {
|
|
429
|
+
syntax: "*";
|
|
430
|
+
inherits: false;
|
|
431
|
+
}
|
|
432
|
+
@property --tw-tracking {
|
|
433
|
+
syntax: "*";
|
|
434
|
+
inherits: false;
|
|
435
|
+
}
|
|
436
|
+
@property --tw-ordinal {
|
|
437
|
+
syntax: "*";
|
|
438
|
+
inherits: false;
|
|
439
|
+
}
|
|
440
|
+
@property --tw-slashed-zero {
|
|
441
|
+
syntax: "*";
|
|
442
|
+
inherits: false;
|
|
443
|
+
}
|
|
444
|
+
@property --tw-numeric-figure {
|
|
445
|
+
syntax: "*";
|
|
446
|
+
inherits: false;
|
|
447
|
+
}
|
|
448
|
+
@property --tw-numeric-spacing {
|
|
449
|
+
syntax: "*";
|
|
450
|
+
inherits: false;
|
|
451
|
+
}
|
|
452
|
+
@property --tw-numeric-fraction {
|
|
453
|
+
syntax: "*";
|
|
454
|
+
inherits: false;
|
|
455
|
+
}
|
|
456
|
+
@property --tw-shadow {
|
|
457
|
+
syntax: "*";
|
|
458
|
+
inherits: false;
|
|
459
|
+
initial-value: 0 0 #0000;
|
|
460
|
+
}
|
|
461
|
+
@property --tw-shadow-color {
|
|
462
|
+
syntax: "*";
|
|
463
|
+
inherits: false;
|
|
464
|
+
}
|
|
465
|
+
@property --tw-shadow-alpha {
|
|
466
|
+
syntax: "<percentage>";
|
|
467
|
+
inherits: false;
|
|
468
|
+
initial-value: 100%;
|
|
469
|
+
}
|
|
470
|
+
@property --tw-inset-shadow {
|
|
471
|
+
syntax: "*";
|
|
472
|
+
inherits: false;
|
|
473
|
+
initial-value: 0 0 #0000;
|
|
474
|
+
}
|
|
475
|
+
@property --tw-inset-shadow-color {
|
|
476
|
+
syntax: "*";
|
|
477
|
+
inherits: false;
|
|
478
|
+
}
|
|
479
|
+
@property --tw-inset-shadow-alpha {
|
|
480
|
+
syntax: "<percentage>";
|
|
481
|
+
inherits: false;
|
|
482
|
+
initial-value: 100%;
|
|
483
|
+
}
|
|
484
|
+
@property --tw-ring-color {
|
|
485
|
+
syntax: "*";
|
|
486
|
+
inherits: false;
|
|
487
|
+
}
|
|
488
|
+
@property --tw-ring-shadow {
|
|
489
|
+
syntax: "*";
|
|
490
|
+
inherits: false;
|
|
491
|
+
initial-value: 0 0 #0000;
|
|
492
|
+
}
|
|
493
|
+
@property --tw-inset-ring-color {
|
|
494
|
+
syntax: "*";
|
|
495
|
+
inherits: false;
|
|
496
|
+
}
|
|
497
|
+
@property --tw-inset-ring-shadow {
|
|
498
|
+
syntax: "*";
|
|
499
|
+
inherits: false;
|
|
500
|
+
initial-value: 0 0 #0000;
|
|
501
|
+
}
|
|
502
|
+
@property --tw-ring-inset {
|
|
503
|
+
syntax: "*";
|
|
504
|
+
inherits: false;
|
|
505
|
+
}
|
|
506
|
+
@property --tw-ring-offset-width {
|
|
507
|
+
syntax: "<length>";
|
|
508
|
+
inherits: false;
|
|
509
|
+
initial-value: 0px;
|
|
510
|
+
}
|
|
511
|
+
@property --tw-ring-offset-color {
|
|
512
|
+
syntax: "*";
|
|
513
|
+
inherits: false;
|
|
514
|
+
initial-value: #fff;
|
|
515
|
+
}
|
|
516
|
+
@property --tw-ring-offset-shadow {
|
|
517
|
+
syntax: "*";
|
|
518
|
+
inherits: false;
|
|
519
|
+
initial-value: 0 0 #0000;
|
|
520
|
+
}
|
|
521
|
+
@layer properties {
|
|
522
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
523
|
+
*, ::before, ::after, ::backdrop {
|
|
524
|
+
--tw-border-style: solid;
|
|
525
|
+
--tw-leading: initial;
|
|
526
|
+
--tw-font-weight: initial;
|
|
527
|
+
--tw-tracking: initial;
|
|
528
|
+
--tw-ordinal: initial;
|
|
529
|
+
--tw-slashed-zero: initial;
|
|
530
|
+
--tw-numeric-figure: initial;
|
|
531
|
+
--tw-numeric-spacing: initial;
|
|
532
|
+
--tw-numeric-fraction: initial;
|
|
533
|
+
--tw-shadow: 0 0 #0000;
|
|
534
|
+
--tw-shadow-color: initial;
|
|
535
|
+
--tw-shadow-alpha: 100%;
|
|
536
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
537
|
+
--tw-inset-shadow-color: initial;
|
|
538
|
+
--tw-inset-shadow-alpha: 100%;
|
|
539
|
+
--tw-ring-color: initial;
|
|
540
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
541
|
+
--tw-inset-ring-color: initial;
|
|
542
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
543
|
+
--tw-ring-inset: initial;
|
|
544
|
+
--tw-ring-offset-width: 0px;
|
|
545
|
+
--tw-ring-offset-color: #fff;
|
|
546
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
@@ -25,7 +25,7 @@ module LesliAudit
|
|
|
25
25
|
@account = Account.new(account_params)
|
|
26
26
|
|
|
27
27
|
if @account.save
|
|
28
|
-
redirect_to @account, notice: "Account was successfully created."
|
|
28
|
+
redirect_to({ action: :show, id: @account.id }, notice: "Account was successfully created.")
|
|
29
29
|
else
|
|
30
30
|
render :new, status: :unprocessable_entity
|
|
31
31
|
end
|
|
@@ -34,7 +34,11 @@ module LesliAudit
|
|
|
34
34
|
# PATCH/PUT /accounts/1
|
|
35
35
|
def update
|
|
36
36
|
if @account.update(account_params)
|
|
37
|
-
redirect_to
|
|
37
|
+
redirect_to(
|
|
38
|
+
{ action: :show, id: @account.id },
|
|
39
|
+
notice: "Account was successfully updated.",
|
|
40
|
+
status: :see_other
|
|
41
|
+
)
|
|
38
42
|
else
|
|
39
43
|
render :edit, status: :unprocessable_entity
|
|
40
44
|
end
|
|
@@ -43,7 +47,7 @@ module LesliAudit
|
|
|
43
47
|
# DELETE /accounts/1
|
|
44
48
|
def destroy
|
|
45
49
|
@account.destroy
|
|
46
|
-
redirect_to
|
|
50
|
+
redirect_to({ action: :index }, notice: "Account was successfully destroyed.", status: :see_other)
|
|
47
51
|
end
|
|
48
52
|
|
|
49
53
|
private
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module LesliAudit
|
|
2
|
+
class AnalyticsController < ApplicationController
|
|
3
|
+
|
|
4
|
+
# GET /analytics
|
|
5
|
+
def index
|
|
6
|
+
dashboard = AnalyticsService.new(current_user, query).dashboard
|
|
7
|
+
|
|
8
|
+
@summary = dashboard.fetch(:summary)
|
|
9
|
+
@request_trend = dashboard.fetch(:request_trend)
|
|
10
|
+
@top_controllers = dashboard.fetch(:top_controllers)
|
|
11
|
+
@browsers = dashboard.fetch(:browsers)
|
|
12
|
+
@devices = dashboard.fetch(:devices)
|
|
13
|
+
@operating_systems = dashboard.fetch(:operating_systems)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
module LesliAudit
|
|
2
2
|
class LogsController < ApplicationController
|
|
3
|
-
before_action :set_log, only:
|
|
3
|
+
before_action :set_log, only: :show
|
|
4
4
|
|
|
5
5
|
# GET /logs
|
|
6
6
|
def index
|
|
7
|
-
@
|
|
7
|
+
@log_kind = log_service.kind
|
|
8
|
+
@available_log_kinds = log_service.available_kinds
|
|
9
|
+
@logs = respond_with_pagination(log_service.index)
|
|
8
10
|
end
|
|
9
11
|
|
|
10
|
-
# GET /logs
|
|
12
|
+
# GET /logs/:id
|
|
11
13
|
def show
|
|
12
14
|
end
|
|
13
15
|
|
|
14
16
|
private
|
|
15
17
|
|
|
16
18
|
def set_log
|
|
17
|
-
@
|
|
19
|
+
@log_kind = log_service.kind
|
|
20
|
+
@log = log_service.find(params[:id])
|
|
18
21
|
end
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
def log_service
|
|
24
|
+
@log_service ||= LesliAudit::LogService.new(
|
|
25
|
+
current_user,
|
|
26
|
+
query.merge(kind: params[:kind])
|
|
27
|
+
)
|
|
23
28
|
end
|
|
24
29
|
end
|
|
25
30
|
end
|