lesli_audit 1.0.2 → 1.1.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/controllers/lesli_audit/users_controller.rb +1 -2
- data/app/controllers/lesli_audit/visitors_controller.rb +14 -0
- data/app/interfaces/lesli_audit/logger_interface.rb +22 -29
- data/app/services/lesli_audit/user_service.rb +105 -12
- data/app/services/lesli_audit/{analytic_service.rb → visitor_service.rb} +121 -24
- data/app/views/lesli_audit/partials/_navigation.html.erb +1 -1
- data/app/views/lesli_audit/requests/index.html.erb +1 -1
- data/app/views/lesli_audit/users/index.html.erb +36 -4
- data/app/views/lesli_audit/visitors/index.html.erb +118 -0
- data/config/routes.rb +1 -1
- data/db/migrate/v1.0/0501110210_create_lesli_audit_account_devices.rb +2 -1
- data/db/seed/devices.rb +23 -15
- data/db/seed/users.rb +117 -0
- data/db/seeds.rb +2 -2
- data/lib/lesli_audit/version.rb +2 -2
- metadata +10 -50
- data/app/assets/config/lesli_audit_manifest.js +0 -37
- data/app/controllers/lesli_audit/analytics_controller.rb +0 -23
- data/app/controllers/lesli_audit/user_journals_controller.rb +0 -60
- data/app/helpers/lesli_audit/analytics_helper.rb +0 -4
- data/app/views/lesli_audit/analytics/index.html.erb +0 -44
- data/app/views/lesli_audit/user_journals/_form.html.erb +0 -17
- data/app/views/lesli_audit/user_journals/_user_journal.html.erb +0 -2
- data/app/views/lesli_audit/user_journals/edit.html.erb +0 -12
- data/app/views/lesli_audit/user_journals/index.html.erb +0 -16
- data/app/views/lesli_audit/user_journals/new.html.erb +0 -11
- data/app/views/lesli_audit/user_journals/show.html.erb +0 -10
- data/app/views/lesli_audit/users/show.html.erb +0 -10
- data/lib/scss/application.scss +0 -31
- data/lib/vue/application.js +0 -146
- data/lib/vue/apps/accounts/activities.vue +0 -48
- data/lib/vue/apps/analytics/index.vue +0 -56
- data/lib/vue/apps/analytics/trends.vue +0 -148
- data/lib/vue/apps/dashboards/components/roles.vue +0 -71
- data/lib/vue/apps/dashboards/components/users.vue +0 -71
- data/lib/vue/apps/dashboards/show.vue +0 -8
- data/lib/vue/apps/requests/index.vue +0 -125
- data/lib/vue/apps/security/passwords.vue +0 -52
- data/lib/vue/apps/security/sessions.vue +0 -63
- data/lib/vue/apps/users/activities.vue +0 -49
- data/lib/vue/apps/users/index.vue +0 -89
- data/lib/vue/apps/users/logs.vue +0 -49
- data/lib/vue/apps/users/registrations.vue +0 -73
- data/lib/vue/apps/users/roles.vue +0 -70
- data/lib/vue/apps/users/workingHours.vue +0 -52
- data/lib/vue/components/requests.vue +0 -63
- data/lib/vue/components/visitors.vue +0 -76
- data/lib/vue/stores/accounts/activities.js +0 -87
- data/lib/vue/stores/analytics.js +0 -127
- data/lib/vue/stores/request.js +0 -70
- data/lib/vue/stores/security/password.js +0 -75
- data/lib/vue/stores/security/session.js +0 -78
- data/lib/vue/stores/translations.json +0 -162
- data/lib/vue/stores/users/activities.js +0 -76
- data/lib/vue/stores/users/logs.js +0 -74
- data/lib/vue/stores/users/registrations.js +0 -61
- data/lib/vue/stores/users/roles.js +0 -52
- data/lib/vue/stores/users/working_hours.js +0 -92
- data/lib/vue/stores/users.js +0 -56
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2022, all rights reserved.
|
|
3
|
-
|
|
4
|
-
All the information provided by this platform is protected by international laws related to
|
|
5
|
-
industrial property, intellectual property, copyright and relative international laws.
|
|
6
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
|
7
|
-
pictures and any other information belongs to the owner of this platform.
|
|
8
|
-
|
|
9
|
-
Without the written permission of the owner, any replication, modification,
|
|
10
|
-
transmission, publication is strictly forbidden.
|
|
11
|
-
|
|
12
|
-
For more information read the license file including with this software.
|
|
13
|
-
|
|
14
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
15
|
-
// ·
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// ·
|
|
20
|
-
import { defineStore } from "pinia"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// ·
|
|
24
|
-
export const useUsersLogs = defineStore("userLogs", {
|
|
25
|
-
state: () => {
|
|
26
|
-
return {
|
|
27
|
-
loading: false,
|
|
28
|
-
pagination: {},
|
|
29
|
-
records: [],
|
|
30
|
-
columns: [{
|
|
31
|
-
field: "id",
|
|
32
|
-
label: "ID"
|
|
33
|
-
}, {
|
|
34
|
-
field: "email",
|
|
35
|
-
label: "Email",
|
|
36
|
-
defaultSort: true,
|
|
37
|
-
defaultOrder: 'asc',
|
|
38
|
-
sort: true
|
|
39
|
-
}, {
|
|
40
|
-
field: "title",
|
|
41
|
-
label: "Title"
|
|
42
|
-
}, {
|
|
43
|
-
field: "description",
|
|
44
|
-
label: "Description"
|
|
45
|
-
}, {
|
|
46
|
-
field: "created_at_date",
|
|
47
|
-
label: "Date"
|
|
48
|
-
}]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
actions: {
|
|
52
|
-
|
|
53
|
-
sort(column, order= 'desc | asc'){},
|
|
54
|
-
|
|
55
|
-
fetchIfEmpty() {
|
|
56
|
-
if (this.records.length <= 0) {
|
|
57
|
-
this.fetchLogs()
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
fetchLogs() {
|
|
62
|
-
this.loading = true
|
|
63
|
-
this.http.get(this.url.audit("users/logs")).then(result => {
|
|
64
|
-
this.records = result.records
|
|
65
|
-
this.pagination = result.pagination
|
|
66
|
-
}).catch(error => {
|
|
67
|
-
|
|
68
|
-
}).finally(() => {
|
|
69
|
-
this.loading = false
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
})
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2022, all rights reserved.
|
|
3
|
-
All the information provided by this platform is protected by international laws related to
|
|
4
|
-
industrial property, intellectual property, copyright and relative international laws.
|
|
5
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
|
6
|
-
pictures and any other information belongs to the owner of this platform.
|
|
7
|
-
Without the written permission of the owner, any replication, modification,
|
|
8
|
-
transmission, publication is strictly forbidden.
|
|
9
|
-
For more information read the license file including with this software.
|
|
10
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
11
|
-
// ·
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// ·
|
|
16
|
-
import { defineStore } from "pinia"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// ·
|
|
20
|
-
export const useUsersRegistrations = defineStore("userRegistrations", {
|
|
21
|
-
state: () => {
|
|
22
|
-
return {
|
|
23
|
-
loading: false,
|
|
24
|
-
pagination: {},
|
|
25
|
-
records: [],
|
|
26
|
-
periods : []
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
actions: {
|
|
30
|
-
|
|
31
|
-
fetchIfEmpty() {
|
|
32
|
-
if (this.records.length <= 0) {
|
|
33
|
-
this.fetch('month')
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
getOptions(){
|
|
38
|
-
this.loading = true
|
|
39
|
-
this.http.get(this.url.audit("users/options")).then(result => {
|
|
40
|
-
this.periods = result.periods
|
|
41
|
-
}).catch(error => {
|
|
42
|
-
this.msg.danger("Error while trying to fetch data")
|
|
43
|
-
}).finally(() => {
|
|
44
|
-
this.loading = false
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
fetch(period) {
|
|
50
|
-
this.loading = true
|
|
51
|
-
this.http.get(this.url.audit("users/registrations").group(period)).then(result => {
|
|
52
|
-
this.records = result.reverse()
|
|
53
|
-
}).catch(error => {
|
|
54
|
-
this.msg.danger("Error while trying to fetch data")
|
|
55
|
-
}).finally(() => {
|
|
56
|
-
this.loading = false
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
})
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2022, all rights reserved.
|
|
3
|
-
|
|
4
|
-
All the information provided by this platform is protected by international laws related to
|
|
5
|
-
industrial property, intellectual property, copyright and relative international laws.
|
|
6
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
|
7
|
-
pictures and any other information belongs to the owner of this platform.
|
|
8
|
-
|
|
9
|
-
Without the written permission of the owner, any replication, modification,
|
|
10
|
-
transmission, publication is strictly forbidden.
|
|
11
|
-
|
|
12
|
-
For more information read the license file including with this software.
|
|
13
|
-
|
|
14
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
15
|
-
// ·
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// ·
|
|
20
|
-
import { defineStore } from "pinia"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// ·
|
|
24
|
-
export const useUsersRoles = defineStore("usersRoles", {
|
|
25
|
-
state: () => {
|
|
26
|
-
return {
|
|
27
|
-
loading: false,
|
|
28
|
-
pagination: {},
|
|
29
|
-
records: []
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
actions: {
|
|
33
|
-
|
|
34
|
-
fetchIfEmpty() {
|
|
35
|
-
if (this.records.length <= 0) {
|
|
36
|
-
this.fetch()
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
fetch() {
|
|
41
|
-
this.loading = true
|
|
42
|
-
this.http.get(this.url.audit("users/roles")).then(result => {
|
|
43
|
-
this.records = result
|
|
44
|
-
}).catch(error => {
|
|
45
|
-
|
|
46
|
-
}).finally(() => {
|
|
47
|
-
this.loading = false
|
|
48
|
-
})
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
})
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2022, all rights reserved.
|
|
3
|
-
|
|
4
|
-
All the information provided by this platform is protected by international laws related to
|
|
5
|
-
industrial property, intellectual property, copyright and relative international laws.
|
|
6
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
|
7
|
-
pictures and any other information belongs to the owner of this platform.
|
|
8
|
-
|
|
9
|
-
Without the written permission of the owner, any replication, modification,
|
|
10
|
-
transmission, publication is strictly forbidden.
|
|
11
|
-
|
|
12
|
-
For more information read the license file including with this software.
|
|
13
|
-
|
|
14
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
15
|
-
// ·
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// ·
|
|
20
|
-
import { defineStore } from "pinia"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// ·
|
|
24
|
-
export const useUsersWorkingHours = defineStore("userWorkingHours", {
|
|
25
|
-
state: () => {
|
|
26
|
-
return {
|
|
27
|
-
loading: false,
|
|
28
|
-
pagination: {},
|
|
29
|
-
records: [],
|
|
30
|
-
columns: [{
|
|
31
|
-
field: "id",
|
|
32
|
-
label: "ID"
|
|
33
|
-
},{
|
|
34
|
-
field: "email",
|
|
35
|
-
label: "Email"
|
|
36
|
-
|
|
37
|
-
},{
|
|
38
|
-
field: "name",
|
|
39
|
-
label: "Role"
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
field: "date",
|
|
44
|
-
label: "Date",
|
|
45
|
-
sort: true
|
|
46
|
-
},{
|
|
47
|
-
field: "first_activity",
|
|
48
|
-
label: "First activity at",
|
|
49
|
-
sort: true
|
|
50
|
-
},{
|
|
51
|
-
field: "last_activity",
|
|
52
|
-
label: "Last activity at",
|
|
53
|
-
sort: true
|
|
54
|
-
}]
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
actions: {
|
|
58
|
-
|
|
59
|
-
fetchIfEmpty() {
|
|
60
|
-
if (this.records.length <= 0) {
|
|
61
|
-
this.fetch()
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
search(string) {
|
|
65
|
-
this.fetch(this.url.audit("users/working_hours").search(string))
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
sort(column, direction){
|
|
69
|
-
this.fetch(this.url.audit("users/working_hours").order(column, direction), false)
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
fetch(url=this.url.audit("users/working_hours")) {
|
|
73
|
-
this.$reset()
|
|
74
|
-
this.loading = true
|
|
75
|
-
this.http.get(url).then(result => {
|
|
76
|
-
this.records = result.map(({date, first_activity, last_activity, ...activity}) =>
|
|
77
|
-
({
|
|
78
|
-
...activity,
|
|
79
|
-
date: this.date.date(date),
|
|
80
|
-
first_activity: this.date.time(first_activity),
|
|
81
|
-
last_activity: this.date.time(last_activity)
|
|
82
|
-
})
|
|
83
|
-
)
|
|
84
|
-
}).catch(error => {
|
|
85
|
-
this.msg.danger("Error while trying to fetch data")
|
|
86
|
-
}).finally(() => {
|
|
87
|
-
this.loading = false
|
|
88
|
-
})
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
})
|
data/lib/vue/stores/users.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
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 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
|
-
|
|
34
|
-
// ·
|
|
35
|
-
import { defineStore } from "pinia"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// ·
|
|
39
|
-
export const useUsers = defineStore("audit.users", {
|
|
40
|
-
state: () => {
|
|
41
|
-
return {
|
|
42
|
-
registrations: []
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
actions: {
|
|
46
|
-
|
|
47
|
-
getRegistrations() {
|
|
48
|
-
this.registrations = []
|
|
49
|
-
this.http.get(this.url.audit("users/registrations")).then(result => {
|
|
50
|
-
this.registrations = result
|
|
51
|
-
}).catch(error => {
|
|
52
|
-
console.log(error)
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
})
|