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,20 +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
|
-
application:
|
19
|
-
navigation_logout: Cerrar sesión
|
20
|
-
navigation_my_profile: Mi perfil
|
2
|
+
:es: {}
|
data/config/routes.rb
CHANGED
@@ -17,7 +17,7 @@ GNU General Public License for more details.
|
|
17
17
|
You should have received a copy of the GNU General Public License
|
18
18
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
19
|
|
20
|
-
Lesli · Ruby on Rails SaaS
|
20
|
+
Lesli · Ruby on Rails SaaS development platform.
|
21
21
|
|
22
22
|
Made with ♥ by https://www.lesli.tech
|
23
23
|
Building a better future, one line of code at a time.
|
@@ -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
|
-
|
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:
|
@@ -60,7 +42,9 @@ LesliAudit::Engine.routes.draw do
|
|
60
42
|
# Roles total users by role
|
61
43
|
# Logs relevant actions of users
|
62
44
|
resources :users, only: [:index] do
|
63
|
-
|
45
|
+
collection do
|
46
|
+
get :registrations
|
47
|
+
end
|
64
48
|
end
|
65
49
|
|
66
50
|
|
@@ -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
|
-
|
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
|
-
|
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
|
-
#
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
data/lib/lesli_audit/engine.rb
CHANGED
@@ -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|
|
data/lib/lesli_audit/version.rb
CHANGED
data/lib/vue/application.js
CHANGED
@@ -31,26 +31,26 @@ Building a better future, one line of code at a time.
|
|
31
31
|
|
32
32
|
|
33
33
|
// · Import Lesli builders
|
34
|
-
import application from "Lesli/application"
|
35
|
-
import translation from "Lesli/translation"
|
34
|
+
import application from "Lesli/vue/application"
|
35
|
+
import translation from "Lesli/vue/translation"
|
36
36
|
|
37
37
|
|
38
38
|
// · Import engine translations
|
39
|
-
import translations from "LesliAudit/stores/translations.json"
|
39
|
+
import translations from "LesliAudit/vue/stores/translations.json"
|
40
40
|
|
41
41
|
|
42
42
|
// ·
|
43
|
-
import appAnalytics from "LesliAudit/apps/analytics/index.vue"
|
44
|
-
import appRequests from "LesliAudit/apps/requests/index.vue"
|
45
|
-
import appUsers from "LesliAudit/apps/users/index.vue"
|
43
|
+
import appAnalytics from "LesliAudit/vue/apps/analytics/index.vue"
|
44
|
+
import appRequests from "LesliAudit/vue/apps/requests/index.vue"
|
45
|
+
import appUsers from "LesliAudit/vue/apps/users/index.vue"
|
46
46
|
|
47
|
-
//import appDashboardShow from "LesliAudit/apps/dashboards/show.vue"
|
48
|
-
import appDashboardShow from "Lesli/shared/dashboards/apps/show.vue"
|
49
|
-
import appDashboardEdit from "Lesli/shared/dashboards/apps/edit.vue"
|
47
|
+
//import appDashboardShow from "LesliAudit/vue/apps/dashboards/show.vue"
|
48
|
+
import appDashboardShow from "Lesli/vue/shared/dashboards/apps/show.vue"
|
49
|
+
import appDashboardEdit from "Lesli/vue/shared/dashboards/apps/edit.vue"
|
50
50
|
|
51
51
|
// ·
|
52
52
|
/*
|
53
|
-
import dashboard from "Lesli/shared/dashboards/apps/show.vue"
|
53
|
+
import dashboard from "Lesli/vue/shared/dashboards/apps/show.vue"
|
54
54
|
import appUsersRegistrations from "CloudAudit/apps/users/registrations.vue"
|
55
55
|
import appUsersWorkingHours from "CloudAudit/apps/users/workingHours.vue"
|
56
56
|
import appUsersActivities from "CloudAudit/apps/users/activities.vue"
|
@@ -68,15 +68,15 @@ import appSecurityPasswords from "CloudAudit/apps/security/passwords.vue"
|
|
68
68
|
|
69
69
|
|
70
70
|
// ·
|
71
|
-
import componentDashboardUsers from "LesliAudit/apps/dashboards/components/users.vue"
|
72
|
-
import componentDashboardRoles from "LesliAudit/apps/dashboards/components/roles.vue"
|
71
|
+
import componentDashboardUsers from "LesliAudit/vue/apps/dashboards/components/users.vue"
|
72
|
+
import componentDashboardRoles from "LesliAudit/vue/apps/dashboards/components/roles.vue"
|
73
73
|
|
74
74
|
|
75
75
|
// ·
|
76
76
|
const dashboardProps = {
|
77
77
|
components: {
|
78
|
-
"audit-users": componentDashboardUsers,
|
79
|
-
"audit-roles": componentDashboardRoles
|
78
|
+
// "audit-users": componentDashboardUsers,
|
79
|
+
// "audit-roles": componentDashboardRoles
|
80
80
|
}
|
81
81
|
}
|
82
82
|
|
@@ -22,12 +22,11 @@ import { ref, reactive, onMounted, watch, computed } from "vue"
|
|
22
22
|
|
23
23
|
|
24
24
|
// . import Lesli components
|
25
|
-
import
|
26
|
-
import chartLine from "Lesli/components/charts/line.vue"
|
25
|
+
import { lesliChartBar, lesliChartLine } from "lesli-vue/components"
|
27
26
|
|
28
27
|
|
29
28
|
// · import lesli stores
|
30
|
-
import { useAnalytics } from "
|
29
|
+
import { useAnalytics } from "LesliAudit/vue/stores/analytics"
|
31
30
|
|
32
31
|
|
33
32
|
// · implement stores
|
@@ -36,7 +36,7 @@ import { onMounted } from "vue"
|
|
36
36
|
|
37
37
|
|
38
38
|
// ·
|
39
|
-
import { useUsers } from "
|
39
|
+
import { useUsers } from "LesliSecurity/vue/stores/users"
|
40
40
|
|
41
41
|
|
42
42
|
// ·
|
@@ -54,14 +54,14 @@ const props = defineProps({
|
|
54
54
|
|
55
55
|
// ·
|
56
56
|
onMounted(() => {
|
57
|
-
storeUsers.getUsersList()
|
57
|
+
//storeUsers.getUsersList()
|
58
58
|
})
|
59
59
|
|
60
60
|
</script>
|
61
61
|
<template>
|
62
62
|
<lesli-card>
|
63
63
|
<h6 class="title is-6 mb-4">{{ props.component.name }}</h6>
|
64
|
-
<p>{{ storeUsers.list.length }}</p>
|
64
|
+
<p>{ { storeUsers.list.length } }</p>
|
65
65
|
</lesli-card>
|
66
66
|
</template>
|
67
67
|
<style scoped>
|
@@ -36,7 +36,7 @@ import { onMounted } from "vue"
|
|
36
36
|
|
37
37
|
|
38
38
|
// ·
|
39
|
-
import { useUsers } from "
|
39
|
+
import { useUsers } from "LesliSecurity/vue/stores/users"
|
40
40
|
|
41
41
|
|
42
42
|
// ·
|
@@ -54,14 +54,14 @@ const props = defineProps({
|
|
54
54
|
|
55
55
|
// ·
|
56
56
|
onMounted(() => {
|
57
|
-
storeUsers.getUsersList()
|
57
|
+
//storeUsers.getUsersList()
|
58
58
|
})
|
59
59
|
|
60
60
|
</script>
|
61
61
|
<template>
|
62
62
|
<lesli-card>
|
63
63
|
<h6 class="title is-6 mb-4">{{ props.component.name }}</h6>
|
64
|
-
|
64
|
+
|
65
65
|
</lesli-card>
|
66
66
|
</template>
|
67
67
|
<style scoped>
|
@@ -1,31 +1,89 @@
|
|
1
1
|
<script setup>
|
2
|
+
/*
|
3
|
+
|
4
|
+
Lesli
|
5
|
+
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
7
|
+
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
9
|
+
it under the terms of the GNU General Public License as published by
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
11
|
+
(at your option) any later version.
|
12
|
+
|
13
|
+
This program is distributed in the hope that it will be useful,
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
GNU General Public License for more details.
|
17
|
+
|
18
|
+
You should have received a copy of the GNU General Public License
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
20
|
+
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
22
|
+
|
23
|
+
Made with ♥ by LesliTech
|
24
|
+
Building a better future, one line of code at a time.
|
25
|
+
|
26
|
+
@contact hello@lesli.tech
|
27
|
+
@website https://www.lesli.tech
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
+
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
31
|
+
// ·
|
32
|
+
*/
|
33
|
+
|
34
|
+
|
35
|
+
// · import vue tools
|
36
|
+
import { onMounted, ref } from "vue"
|
37
|
+
|
38
|
+
|
39
|
+
// · import stores
|
40
|
+
import componentRegistrations from "./registrations.vue"
|
41
|
+
|
42
|
+
|
43
|
+
// · import stores
|
44
|
+
import { useUsers } from "LesliAudit/vue/stores/users"
|
45
|
+
|
46
|
+
|
47
|
+
// · implement stores
|
48
|
+
const storeUsers = useUsers()
|
49
|
+
|
50
|
+
|
51
|
+
// ·
|
52
|
+
var selectedPeriod = ref("month");
|
53
|
+
|
54
|
+
|
55
|
+
// ·
|
56
|
+
function updateDate(){
|
57
|
+
// filterPeriod = selectedPeriod.value;
|
58
|
+
// storeUsersRegistrations.fetch(filterPeriod)
|
59
|
+
}
|
2
60
|
|
3
61
|
</script>
|
4
62
|
<template>
|
5
63
|
<lesli-application-container>
|
6
|
-
<lesli-
|
7
|
-
<lesli-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
64
|
+
<lesli-header title="Users">
|
65
|
+
<lesli-select
|
66
|
+
id = "selectPeriod"
|
67
|
+
@change="updateDate"
|
68
|
+
v-model = "selectedPeriod"
|
69
|
+
:options="[{
|
70
|
+
label: 'Year',
|
71
|
+
value: 'year'
|
72
|
+
}, {
|
73
|
+
label: 'Month',
|
74
|
+
value: 'month'
|
75
|
+
}, {
|
76
|
+
label: 'Week',
|
77
|
+
value: 'week'
|
78
|
+
}, {
|
79
|
+
label: 'Day',
|
80
|
+
value: 'day'
|
81
|
+
}]">
|
82
|
+
</lesli-select>
|
83
|
+
</lesli-header>
|
84
|
+
<component-registrations>
|
85
|
+
</component-registrations>
|
23
86
|
</lesli-application-container>
|
24
87
|
</template>
|
25
88
|
<style>
|
26
|
-
.number {
|
27
|
-
padding: 1rem;
|
28
|
-
font-size: 3rem;
|
29
|
-
text-align: center;
|
30
|
-
}
|
31
89
|
</style>
|
@@ -22,77 +22,52 @@ import { ref, reactive, onMounted, watch, computed } from "vue"
|
|
22
22
|
|
23
23
|
|
24
24
|
// · import Lesli components
|
25
|
-
import
|
25
|
+
import { lesliChartBar } from "lesli-vue/components"
|
26
26
|
|
27
27
|
|
28
28
|
// · import stores
|
29
|
-
import {
|
29
|
+
import { useUsers } from "LesliAudit/vue/stores/users"
|
30
30
|
|
31
31
|
|
32
32
|
// · implement stores
|
33
|
-
const
|
33
|
+
const storeUsers = useUsers()
|
34
34
|
|
35
35
|
|
36
36
|
// · define variables
|
37
37
|
var registrationSeries = ref([]);
|
38
|
-
var registrationLabels = ref([]);
|
39
|
-
var selectedPeriod = ref("month");
|
40
|
-
var filterPeriod = ref("");
|
41
|
-
var selectOptions = ref([]);
|
42
38
|
|
43
39
|
|
44
40
|
// · initializing
|
45
41
|
onMounted(() => {
|
46
|
-
|
47
|
-
storeUsersRegistrations.getOptions()
|
42
|
+
storeUsers.getRegistrations()
|
48
43
|
})
|
49
44
|
|
50
45
|
|
51
46
|
// ·
|
52
|
-
watch(() =>
|
53
|
-
selectOptions.value = storeUsersRegistrations.periods
|
54
|
-
})
|
47
|
+
watch(() => storeUsers.registrations, (oldData, newData) => {
|
55
48
|
|
49
|
+
if (storeUsers.registrations.length == 0) {
|
50
|
+
return
|
51
|
+
}
|
56
52
|
|
57
|
-
// ·
|
58
|
-
watch(() => storeUsersRegistrations.records, () => {
|
59
|
-
registrationLabels.value = storeUsersRegistrations.records.map(visit => visit.date)
|
60
53
|
registrationSeries.value = [{
|
61
|
-
|
62
|
-
|
54
|
+
data: storeUsers.registrations.map(registration => {
|
55
|
+
return {
|
56
|
+
x: registration.date,
|
57
|
+
y: registration.count
|
58
|
+
}
|
59
|
+
})
|
63
60
|
}]
|
64
61
|
})
|
65
62
|
|
66
|
-
|
67
|
-
// ·
|
68
|
-
function updateDate(){
|
69
|
-
filterPeriod = selectedPeriod.value;
|
70
|
-
storeUsersRegistrations.fetch(filterPeriod)
|
71
|
-
}
|
72
|
-
|
73
63
|
</script>
|
74
64
|
<template>
|
75
|
-
<
|
76
|
-
<lesli-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
@change="updateDate"
|
83
|
-
v-model = "selectedPeriod"
|
84
|
-
:options="selectOptions">
|
85
|
-
</lesli-select>
|
86
|
-
</div>
|
87
|
-
<div class="card">
|
88
|
-
<div class="card-content">
|
89
|
-
<chartLine
|
90
|
-
:series="registrationSeries"
|
91
|
-
:labels="registrationLabels"
|
92
|
-
@marker-click="markerClick">
|
93
|
-
</chartLine>
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
</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>
|
97
72
|
</template>
|
98
73
|
|
@@ -36,11 +36,11 @@ import { ref, reactive, onMounted, watch, computed } from "vue"
|
|
36
36
|
|
37
37
|
|
38
38
|
// · import Lesli components
|
39
|
-
import {
|
39
|
+
import { lesliChartLine } from "lesli-vue/components"
|
40
40
|
|
41
41
|
|
42
42
|
// · import stores
|
43
|
-
import { useAnalytics } from "LesliAudit/stores/analytics"
|
43
|
+
import { useAnalytics } from "LesliAudit/vue/stores/analytics"
|
44
44
|
|
45
45
|
|
46
46
|
// · implement stores
|
@@ -67,10 +67,10 @@ watch(() => storeAnalytics.visitors.records, () => {
|
|
67
67
|
</script>
|
68
68
|
<template>
|
69
69
|
<lesli-application-component>
|
70
|
-
<chart-line
|
70
|
+
<lesli-chart-line
|
71
71
|
:title="'Visitors'"
|
72
72
|
:series="series"
|
73
73
|
:labels="labels">
|
74
|
-
</chart-line>
|
74
|
+
</lesli-chart-line>
|
75
75
|
</lesli-application-component>
|
76
76
|
</template>
|
data/lib/vue/stores/analytics.js
CHANGED
@@ -1,17 +1,32 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2022, all rights reserved.
|
3
2
|
|
4
|
-
|
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.
|
3
|
+
Lesli
|
8
4
|
|
9
|
-
|
10
|
-
transmission, publication is strictly forbidden.
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
11
6
|
|
12
|
-
|
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.
|
13
11
|
|
14
|
-
|
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
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
15
30
|
// ·
|
16
31
|
*/
|
17
32
|
|