lesli_audit 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/lesli_audit/application.js +143 -98
  3. data/app/assets/javascripts/lesli_audit/application.js.LICENSE.txt +327 -0
  4. data/app/controllers/lesli_audit/accounts_controller.rb +60 -0
  5. data/app/controllers/lesli_audit/requests_controller.rb +60 -0
  6. data/app/controllers/lesli_audit/users_controller.rb +60 -0
  7. data/app/helpers/lesli_audit/accounts_helper.rb +4 -0
  8. data/app/helpers/lesli_audit/requests_helper.rb +4 -0
  9. data/app/helpers/lesli_audit/users_helper.rb +4 -0
  10. data/app/models/lesli_audit/account.rb +6 -0
  11. data/app/models/lesli_audit/account_request.rb +5 -0
  12. data/app/models/lesli_audit/analytic.rb +2 -2
  13. data/app/models/lesli_audit/request.rb +4 -0
  14. data/app/models/lesli_audit/user.rb +4 -0
  15. data/app/models/lesli_audit/user_request.rb +7 -0
  16. data/app/services/lesli_audit/analytic_service.rb +13 -39
  17. data/app/services/lesli_audit/analytics/visitor_service.rb +5 -1
  18. data/app/views/lesli_audit/accounts/_account.html.erb +2 -0
  19. data/app/views/lesli_audit/accounts/_form.html.erb +17 -0
  20. data/app/views/lesli_audit/accounts/edit.html.erb +10 -0
  21. data/app/views/lesli_audit/accounts/index.html.erb +14 -0
  22. data/app/views/lesli_audit/accounts/new.html.erb +9 -0
  23. data/app/views/lesli_audit/accounts/show.html.erb +10 -0
  24. data/app/views/lesli_audit/requests/_form.html.erb +17 -0
  25. data/app/views/lesli_audit/requests/_request.html.erb +2 -0
  26. data/app/views/lesli_audit/requests/edit.html.erb +10 -0
  27. data/app/views/lesli_audit/requests/index.html.erb +14 -0
  28. data/app/views/lesli_audit/requests/new.html.erb +9 -0
  29. data/app/views/lesli_audit/requests/show.html.erb +10 -0
  30. data/app/views/lesli_audit/users/_form.html.erb +17 -0
  31. data/app/views/lesli_audit/users/_user.html.erb +2 -0
  32. data/app/views/lesli_audit/users/edit.html.erb +10 -0
  33. data/app/views/lesli_audit/users/index.html.erb +14 -0
  34. data/app/views/lesli_audit/users/new.html.erb +9 -0
  35. data/app/views/lesli_audit/users/show.html.erb +10 -0
  36. data/config/locales/translations.en.yml +7 -0
  37. data/config/locales/translations.es.yml +7 -0
  38. data/config/routes.rb +34 -1
  39. data/db/migrate/v1.0/0803100010_create_lesli_audit_account_requests.rb +44 -0
  40. data/db/migrate/v1.0/0803110010_create_lesli_audit_user_requests.rb +46 -0
  41. data/db/seed/development.rb +74 -0
  42. data/db/seed/production.rb +0 -0
  43. data/db/seed/test.rb +0 -0
  44. data/db/seeds.rb +40 -0
  45. data/lib/lesli_audit/version.rb +2 -1
  46. data/lib/vue/apps/analytics/index.vue +42 -4
  47. data/lib/vue/apps/analytics/trends.vue +1 -1
  48. data/lib/vue/{apps/analytics → components}/requests.vue +2 -8
  49. data/lib/vue/{apps/analytics → components}/visitors.vue +1 -16
  50. data/lib/vue/stores/{analytics/visitors.js → analytics.js} +0 -21
  51. data/lib/vue/stores/translations.json +38 -0
  52. data/readme.md +44 -93
  53. metadata +44 -5
@@ -0,0 +1,10 @@
1
+ <h1>Editing account</h1>
2
+
3
+ <%= render "form", account: @account %>
4
+
5
+ <br>
6
+
7
+ <div>
8
+ <%= link_to "Show this account", @account %> |
9
+ <%= link_to "Back to accounts", accounts_path %>
10
+ </div>
@@ -0,0 +1,14 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <h1>Accounts</h1>
4
+
5
+ <div id="accounts">
6
+ <% @accounts.each do |account| %>
7
+ <%= render account %>
8
+ <p>
9
+ <%= link_to "Show this account", account %>
10
+ </p>
11
+ <% end %>
12
+ </div>
13
+
14
+ <%= link_to "New account", new_account_path %>
@@ -0,0 +1,9 @@
1
+ <h1>New account</h1>
2
+
3
+ <%= render "form", account: @account %>
4
+
5
+ <br>
6
+
7
+ <div>
8
+ <%= link_to "Back to accounts", accounts_path %>
9
+ </div>
@@ -0,0 +1,10 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <%= render @account %>
4
+
5
+ <div>
6
+ <%= link_to "Edit this account", edit_account_path(@account) %> |
7
+ <%= link_to "Back to accounts", accounts_path %>
8
+
9
+ <%= button_to "Destroy this account", @account, method: :delete %>
10
+ </div>
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: request) do |form| %>
2
+ <% if request.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(request.errors.count, "error") %> prohibited this request from being saved:</h2>
5
+
6
+ <ul>
7
+ <% request.errors.each do |error| %>
8
+ <li><%= error.full_message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div>
15
+ <%= form.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <div id="<%= dom_id request %>">
2
+ </div>
@@ -0,0 +1,10 @@
1
+ <h1>Editing request</h1>
2
+
3
+ <%= render "form", request: @request %>
4
+
5
+ <br>
6
+
7
+ <div>
8
+ <%= link_to "Show this request", @request %> |
9
+ <%= link_to "Back to requests", requests_path %>
10
+ </div>
@@ -0,0 +1,14 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <h1>Requests</h1>
4
+
5
+ <div id="requests">
6
+ <% @requests.each do |request| %>
7
+ <%= render request %>
8
+ <p>
9
+ <%= link_to "Show this request", request %>
10
+ </p>
11
+ <% end %>
12
+ </div>
13
+
14
+ <%= link_to "New request", new_request_path %>
@@ -0,0 +1,9 @@
1
+ <h1>New request</h1>
2
+
3
+ <%= render "form", request: @request %>
4
+
5
+ <br>
6
+
7
+ <div>
8
+ <%= link_to "Back to requests", requests_path %>
9
+ </div>
@@ -0,0 +1,10 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <%= render @request %>
4
+
5
+ <div>
6
+ <%= link_to "Edit this request", edit_request_path(@request) %> |
7
+ <%= link_to "Back to requests", requests_path %>
8
+
9
+ <%= button_to "Destroy this request", @request, method: :delete %>
10
+ </div>
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: user) do |form| %>
2
+ <% if user.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(user.errors.count, "error") %> prohibited this user from being saved:</h2>
5
+
6
+ <ul>
7
+ <% user.errors.each do |error| %>
8
+ <li><%= error.full_message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div>
15
+ <%= form.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <div id="<%= dom_id user %>">
2
+ </div>
@@ -0,0 +1,10 @@
1
+ <h1>Editing user</h1>
2
+
3
+ <%= render "form", user: @user %>
4
+
5
+ <br>
6
+
7
+ <div>
8
+ <%= link_to "Show this user", @user %> |
9
+ <%= link_to "Back to users", users_path %>
10
+ </div>
@@ -0,0 +1,14 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <h1>Users</h1>
4
+
5
+ <div id="users">
6
+ <% @users.each do |user| %>
7
+ <%= render user %>
8
+ <p>
9
+ <%= link_to "Show this user", user %>
10
+ </p>
11
+ <% end %>
12
+ </div>
13
+
14
+ <%= link_to "New user", new_user_path %>
@@ -0,0 +1,9 @@
1
+ <h1>New user</h1>
2
+
3
+ <%= render "form", user: @user %>
4
+
5
+ <br>
6
+
7
+ <div>
8
+ <%= link_to "Back to users", users_path %>
9
+ </div>
@@ -0,0 +1,10 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <%= render @user %>
4
+
5
+ <div>
6
+ <%= link_to "Edit this user", edit_user_path(@user) %> |
7
+ <%= link_to "Back to users", users_path %>
8
+
9
+ <%= button_to "Destroy this user", @user, method: :delete %>
10
+ </div>
@@ -0,0 +1,7 @@
1
+ ---
2
+ :en:
3
+ lesli_audit:
4
+ shared:
5
+ title_lesli: ":lesli.shared.title_lesli:"
6
+ users:
7
+ title_users: Users
@@ -0,0 +1,7 @@
1
+ ---
2
+ :es:
3
+ lesli_audit:
4
+ shared:
5
+ title_lesli: 'Lesli en español '
6
+ users:
7
+ title_users: Usuarios
data/config/routes.rb CHANGED
@@ -31,15 +31,48 @@ Building a better future, one line of code at a time.
31
31
  =end
32
32
 
33
33
  LesliAudit::Engine.routes.draw do
34
+
35
+
36
+ # Dashboard alias
34
37
  root to: "dashboards#show"
38
+
39
+
40
+ # Dashboard:
41
+ # Total users
42
+ # Total roles
43
+ # Visits
44
+ # Trends
35
45
  resource :dashboard, only: [:show]
46
+
47
+
48
+ # Users:
49
+ # Registrations users grouped by creation date
50
+ # Working hours first and last request of the day
51
+ # Activities changes on users information
52
+ # Roles total users by role
53
+ # Logs relevant actions of users
54
+ resources :users, only: []
55
+
56
+
57
+ # Analytics:
36
58
  resources :analytics, only: [:index] do
37
59
  collection do
38
60
  get :trends
39
- get :visitors
40
61
  get :controllers
62
+ get :visitors
41
63
  get :devices
42
64
  get :users
43
65
  end
44
66
  end
67
+
68
+
69
+ # Account:
70
+ # Activities changes on account information
71
+ # Logs relevant actions of the account
72
+ resources :account, only: []
73
+
74
+
75
+ # Requests: Raw request data
76
+ resources :request, only: []
77
+
45
78
  end
@@ -0,0 +1,44 @@
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 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
+ class CreateLesliAuditAccountRequests < ActiveRecord::Migration[6.0]
34
+ def change
35
+ create_table :lesli_audit_account_requests do |t|
36
+ t.string :request_controller
37
+ t.string :request_action
38
+ t.integer :request_count
39
+ t.date :created_at
40
+ end
41
+ add_reference(:lesli_audit_account_requests, :account, foreign_key: { to_table: :lesli_audit_accounts })
42
+ add_index(:lesli_audit_account_requests, %i[request_controller request_action created_at account_id], unique: true, name: "lesli_audit_account_requests_index")
43
+ end
44
+ end
@@ -0,0 +1,46 @@
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 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
+ class CreateLesliAuditUserRequests < ActiveRecord::Migration[6.0]
34
+ def change
35
+ create_table :lesli_audit_user_requests do |t|
36
+ t.string :request_controller
37
+ t.string :request_action
38
+ t.integer :request_count
39
+ t.date :created_at
40
+ end
41
+ add_reference(:lesli_audit_user_requests, :user, foreign_key: { to_table: :lesli_users })
42
+ add_reference(:lesli_audit_user_requests, :session, foreign_key: { to_table: :lesli_user_sessions })
43
+ add_reference(:lesli_audit_user_requests, :account, foreign_key: { to_table: :lesli_audit_accounts })
44
+ add_index(:lesli_audit_user_requests, %i[request_controller request_action created_at user_id session_id], unique: true, name: "lesli_audit_user_requests_index")
45
+ end
46
+ end
@@ -0,0 +1,74 @@
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 Framework.
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
+
34
+
35
+ # Get the current date
36
+ end_date = Date.today
37
+
38
+ # Calculate the date 10 days ago
39
+ start_date = 10.days.ago.to_date
40
+
41
+ account = Lesli::Account.first
42
+
43
+ current_user = Lesli::User.first
44
+
45
+ session = current_user.sessions.first
46
+
47
+ # controllers to seed
48
+ [
49
+ "lesli_audit/dashboards",
50
+ "lesli_audit/analytics"
51
+ ].each do |controller|
52
+
53
+ # Iterate through the dates
54
+ (start_date..end_date).each do |date|
55
+
56
+ current_user.account.audit.account_requests.create_with(
57
+ :request_count => rand(40..80),
58
+ ).find_or_create_by(
59
+ :request_controller => controller,
60
+ :request_action => "show",
61
+ :created_at => date,
62
+ )
63
+
64
+ current_user.account.audit.user_requests.create_with(
65
+ :request_count => rand(40..80),
66
+ ).find_or_create_by(
67
+ :request_controller => controller,
68
+ :request_action => "show",
69
+ :created_at => date,
70
+ :session => session,
71
+ :user => current_user
72
+ )
73
+ end
74
+ end
File without changes
data/db/seed/test.rb ADDED
File without changes
data/db/seeds.rb ADDED
@@ -0,0 +1,40 @@
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 Framework.
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
+
34
+ # IMPORTANT:
35
+ # Seed files are only for development, if you need to create default resources
36
+ # for production you must use the initializer method in the Engine account model
37
+ if Rails.env.development?
38
+ L2.msg("Loading seeds for LesliAudit", "Version: #{LesliAudit::VERSION}", "Build: #{LesliAudit::BUILD}")
39
+ load(LesliAudit::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb"))
40
+ end
@@ -1,3 +1,4 @@
1
1
  module LesliAudit
2
- VERSION = "0.1.0"
2
+ VERSION = "0.3.0"
3
+ BUILD = "1697000148"
3
4
  end
@@ -4,15 +4,53 @@
4
4
  import { ref, reactive, onMounted, watch, computed } from "vue"
5
5
 
6
6
 
7
- import visitors from "./visitors.vue";
8
- import requests from "./requests.vue";
7
+ // · import stores
8
+ import { useAnalytics } from "LesliAudit/stores/analytics"
9
+
10
+
11
+ // · implement stores
12
+ const storeAnalytics = useAnalytics()
13
+
14
+
15
+ // ·
16
+ import visitors from "../../components/visitors.vue";
17
+ import requests from "../../components/requests.vue";
9
18
  //import trends from "./trends.vue";
10
19
 
20
+
21
+ // ·
22
+ function reload() {
23
+ storeAnalytics.fetch()
24
+ }
25
+
26
+
27
+ // · initializing
28
+ onMounted(() => {
29
+ storeAnalytics.fetchVisits()
30
+ setTimeout(() => storeAnalytics.fetchUsers(), 600)
31
+ setTimeout(() => storeAnalytics.fetchControllers(), 1200)
32
+ })
33
+
11
34
  </script>
12
35
  <template>
13
36
  <lesli-application-container>
14
- <lesli-header title="Analytics"></lesli-header>
15
- <visitors></visitors>
37
+ <lesli-header title="Analytics">
38
+ <lesli-select :options="[
39
+ { label: 'Today', value: 7 },
40
+ { label: 'Yesterday', value: 7 },
41
+ { label: 'This week', value: 7 },
42
+ { label: 'Last 7 days', value: 7 },
43
+ { label: 'Last 15 days', value: 7 },
44
+ { label: 'Last 30 days', value: 7 },
45
+ { label: 'Last 60 days', value: 7 },
46
+ { label: 'Last 90 days', value: 7 },
47
+ { label: 'Last 6 months', value: 7 },
48
+ { label: 'Last 12 months', value: 7 },
49
+ { label: 'This year (Jan - Today)', value: 7 }
50
+ ]">
51
+ </lesli-select>
52
+ </lesli-header>
53
+ <visitors class="mb-6"></visitors>
16
54
  <requests></requests>
17
55
  </lesli-application-container>
18
56
  </template>
@@ -27,7 +27,7 @@ import chartLine from "Lesli/components/charts/line.vue"
27
27
 
28
28
 
29
29
  // · import lesli stores
30
- import { useAnalytics } from "CloudAudit/stores/analytics/visitors"
30
+ import { useAnalytics } from "CloudAudit/stores/analytics"
31
31
 
32
32
 
33
33
  // · implement stores
@@ -36,7 +36,7 @@ import { } from "vue"
36
36
 
37
37
 
38
38
  // · import stores
39
- import { useAnalytics } from "LesliAudit/stores/analytics/visitors"
39
+ import { useAnalytics } from "LesliAudit/stores/analytics"
40
40
 
41
41
 
42
42
  // · implement stores
@@ -44,19 +44,13 @@ const storeAnalytics = useAnalytics()
44
44
 
45
45
  </script>
46
46
  <template>
47
- <div class="columns mt-3">
47
+ <div class="columns">
48
48
  <div class="column">
49
49
  <lesli-table
50
50
  :columns="storeAnalytics.users.columns"
51
51
  :records="storeAnalytics.users.records">
52
52
  </lesli-table>
53
53
  </div>
54
- <div class="column">
55
- <lesli-table
56
- :columns="storeAnalytics.devices.columns"
57
- :records="storeAnalytics.devices.records">
58
- </lesli-table>
59
- </div>
60
54
  <div class="column">
61
55
  <lesli-table
62
56
  :columns="storeAnalytics.controllers.columns"
@@ -40,7 +40,7 @@ import { lesliChartLine } from "lesli-vue/components"
40
40
 
41
41
 
42
42
  // · import stores
43
- import { useAnalytics } from "LesliAudit/stores/analytics/visitors"
43
+ import { useAnalytics } from "LesliAudit/stores/analytics"
44
44
 
45
45
 
46
46
  // · implement stores
@@ -52,21 +52,6 @@ var series = ref([]);
52
52
  var labels = ref([]);
53
53
 
54
54
 
55
- // · initializing
56
- onMounted(() => {
57
- storeAnalytics.fetchVisits()
58
- setTimeout(() => storeAnalytics.fetchUsers(), 500)
59
- setTimeout(() => storeAnalytics.fetchDevices(), 1000)
60
- setTimeout(() => storeAnalytics.fetchControllers(), 1500)
61
- })
62
-
63
-
64
- // ·
65
- function reload() {
66
- storeAnalytics.fetch()
67
- }
68
-
69
-
70
55
  // ·
71
56
  watch(() => storeAnalytics.visitors.records, () => {
72
57
  labels.value = storeAnalytics.visitors.records.map(visit => visit.date)
@@ -39,18 +39,6 @@ export const useAnalytics = defineStore("analytics", {
39
39
  label: 'Requests'
40
40
  }]
41
41
  },
42
- devices: {
43
- loading: false,
44
- pagination: {},
45
- records: [],
46
- columns: [{
47
- field: 'device',
48
- label: 'Device'
49
- }, {
50
- field: 'visits',
51
- label: 'Visits'
52
- }]
53
- },
54
42
  visitors: {
55
43
  loading: false,
56
44
  pagination: {},
@@ -95,15 +83,6 @@ export const useAnalytics = defineStore("analytics", {
95
83
  })
96
84
  },
97
85
 
98
- fetchDevices() {
99
- this.devices.loading = true
100
- this.http.get(this.url.audit("analytics/devices")).then(result => {
101
- this.devices.records = result
102
- }).finally(() => {
103
- this.devices.loading = false
104
- })
105
- },
106
-
107
86
  fetchControllers() {
108
87
  this.controllers.loading = true
109
88
  this.http.get(this.url.audit("analytics/controllers")).then(result => {