lesli_audit 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/lesli_audit/application.js +222 -89
  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/analytics_controller.rb +0 -4
  6. data/{lib/vue/components/resources.vue → app/controllers/lesli_audit/requests_controller.rb} +18 -45
  7. data/app/controllers/lesli_audit/users_controller.rb +12 -0
  8. data/app/helpers/lesli_audit/accounts_helper.rb +4 -0
  9. data/app/helpers/lesli_audit/requests_helper.rb +4 -0
  10. data/app/helpers/lesli_audit/users_helper.rb +4 -0
  11. data/app/models/lesli_audit/account/request.rb +4 -0
  12. data/app/models/lesli_audit/account.rb +7 -0
  13. data/app/models/lesli_audit/account_request.rb +5 -0
  14. data/app/models/lesli_audit/analytic.rb +2 -2
  15. data/app/models/lesli_audit/request.rb +4 -0
  16. data/app/models/lesli_audit/user.rb +4 -0
  17. data/app/models/lesli_audit/user_request.rb +7 -0
  18. data/app/services/lesli_audit/analytic_service.rb +13 -48
  19. data/app/services/lesli_audit/{request_services.rb → request_service.rb} +14 -3
  20. data/app/views/lesli_audit/accounts/_account.html.erb +2 -0
  21. data/app/views/lesli_audit/accounts/_form.html.erb +17 -0
  22. data/app/views/lesli_audit/accounts/edit.html.erb +10 -0
  23. data/app/views/lesli_audit/accounts/index.html.erb +14 -0
  24. data/app/views/lesli_audit/accounts/new.html.erb +9 -0
  25. data/app/views/lesli_audit/accounts/show.html.erb +10 -0
  26. data/app/views/lesli_audit/partials/_engine-navigation.html.erb +2 -2
  27. data/app/views/lesli_audit/requests/_form.html.erb +17 -0
  28. data/app/views/lesli_audit/requests/_request.html.erb +2 -0
  29. data/app/views/lesli_audit/requests/edit.html.erb +10 -0
  30. data/app/views/lesli_audit/requests/index.html.erb +1 -0
  31. data/app/views/lesli_audit/requests/new.html.erb +9 -0
  32. data/app/views/lesli_audit/requests/show.html.erb +10 -0
  33. data/app/views/lesli_audit/users/_form.html.erb +17 -0
  34. data/app/views/lesli_audit/users/_user.html.erb +2 -0
  35. data/app/views/lesli_audit/users/edit.html.erb +10 -0
  36. data/app/views/lesli_audit/users/index.html.erb +1 -0
  37. data/app/views/lesli_audit/users/new.html.erb +9 -0
  38. data/app/views/lesli_audit/users/show.html.erb +10 -0
  39. data/config/locales/translations.en.yml +5 -0
  40. data/config/locales/translations.es.yml +5 -0
  41. data/config/routes.rb +19 -11
  42. data/db/migrate/v1.0/0803100010_create_lesli_audit_account_requests.rb +44 -0
  43. data/db/migrate/v1.0/0803110010_create_lesli_audit_user_requests.rb +46 -0
  44. data/db/seed/development.rb +31 -24
  45. data/lib/lesli_audit/version.rb +2 -2
  46. data/lib/vue/application.js +8 -6
  47. data/lib/vue/apps/analytics/index.vue +3 -7
  48. data/lib/vue/apps/requests/index.vue +43 -41
  49. data/lib/vue/apps/users/index.vue +31 -0
  50. data/lib/vue/components/requests.vue +2 -6
  51. data/lib/vue/components/visitors.vue +3 -0
  52. data/lib/vue/stores/analytics.js +4 -36
  53. data/lib/vue/stores/request.js +4 -4
  54. data/lib/vue/stores/translations.json +38 -0
  55. data/readme.md +44 -93
  56. metadata +41 -5
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: account) do |form| %>
2
+ <% if account.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(account.errors.count, "error") %> prohibited this account from being saved:</h2>
5
+
6
+ <ul>
7
+ <% account.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,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>
@@ -33,7 +33,7 @@ Building a better future, one line of code at a time.
33
33
  %>
34
34
 
35
35
  <%= navigation_item(lesli_audit.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
36
- <%= navigation_item(lesli_audit.dashboard_path, "Users", "ri-team-line"); %>
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
- <%= navigation_item(lesli_audit.dashboard_path, "Requests", "ri-arrow-left-right-fill"); %>
39
+ <%= navigation_item(lesli_audit.requests_path, "Requests", "ri-arrow-left-right-fill"); %>
@@ -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 @@
1
+ <router-view></router-view>
@@ -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 @@
1
+ <router-view></router-view>
@@ -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,5 @@
1
+ ---
2
+ :en:
3
+ lesli_audit:
4
+ shared:
5
+ button_save: Save
@@ -0,0 +1,5 @@
1
+ ---
2
+ :es:
3
+ lesli_audit:
4
+ shared:
5
+ button_save: Guardar
data/config/routes.rb CHANGED
@@ -31,6 +31,9 @@ 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"
35
38
 
36
39
 
@@ -41,32 +44,37 @@ LesliAudit::Engine.routes.draw do
41
44
  # Trends
42
45
  resource :dashboard, only: [:show]
43
46
 
47
+
44
48
  # Users:
45
49
  # Registrations users grouped by creation date
46
50
  # Working hours first and last request of the day
47
51
  # Activities changes on users information
48
52
  # Roles total users by role
49
53
  # Logs relevant actions of users
50
- # resources :users, only: []
51
-
52
- # Account:
53
- # Activities changes on account information
54
- # Logs relevant actions of the account
55
- # resources :account, only: []
54
+ resources :users, only: [:index] do
55
+
56
+ end
56
57
 
57
- # Requests: Raw request data
58
- # resources :request, only: []
59
58
 
60
59
  # Analytics:
61
- #
62
60
  resources :analytics, only: [:index] do
63
61
  collection do
64
62
  get :trends
65
- get :resourcess
66
- get :visitors
67
63
  get :controllers
64
+ get :visitors
68
65
  get :devices
69
66
  get :users
70
67
  end
71
68
  end
69
+
70
+
71
+ # Account:
72
+ # Activities changes on account information
73
+ # Logs relevant actions of the account
74
+ resources :account, only: []
75
+
76
+
77
+ # Requests: Raw request data
78
+ resources :requests, only: [:index]
79
+
72
80
  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
@@ -40,28 +40,35 @@ start_date = 10.days.ago.to_date
40
40
 
41
41
  account = Lesli::Account.first
42
42
 
43
- user = Lesli::User.first
44
-
45
- session = user.sessions.first
46
-
47
- # Iterate through the dates
48
- (start_date..end_date).each do |date|
49
-
50
- Lesli::Account::Request.create_with(
51
- :request_method => "show",
52
- :request_count => rand(1..100),
53
- ).find_or_create_by(
54
- :request_controller => "lesli_audit/dashboards",
55
- :request_action => "show",
56
- :created_at => date,
57
- :account => account
58
- )
59
-
60
- Lesli::User::Request.create_with(
61
- :request_count => rand(1..100)
62
- ).find_or_create_by(
63
- :created_at => date,
64
- :session => session,
65
- :user => user
66
- )
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
67
74
  end
@@ -1,4 +1,4 @@
1
1
  module LesliAudit
2
- VERSION = "0.2.0"
3
- BUILD = "1696565622"
2
+ VERSION = "0.4.0"
3
+ BUILD = "1697000148"
4
4
  end
@@ -32,8 +32,9 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  // ·
34
34
  import application from "Lesli/application"
35
-
36
35
  import appAnalytics from "LesliAudit/apps/analytics/index.vue"
36
+ import appRequests from "LesliAudit/apps/requests/index.vue"
37
+ import appUsers from "LesliAudit/apps/users/index.vue"
37
38
 
38
39
  // ·
39
40
  /*
@@ -51,8 +52,6 @@ import appAccountsActivities from "CloudAudit/apps/accounts/activities.vue"
51
52
 
52
53
  import appSecuritySessions from "CloudAudit/apps/security/sessions.vue"
53
54
  import appSecurityPasswords from "CloudAudit/apps/security/passwords.vue"
54
-
55
- import appRequests from "CloudAudit/apps/requests/index.vue"
56
55
  */
57
56
 
58
57
 
@@ -61,6 +60,12 @@ application("LesliAudit", [{
61
60
  path: "/analytics",
62
61
  component: appAnalytics,
63
62
  props: { engine: "audit" }
63
+ }, {
64
+ path: "/requests",
65
+ component: appRequests
66
+ }, {
67
+ path: "/users",
68
+ component: appUsers,
64
69
  }
65
70
  /*{
66
71
  path: "/",
@@ -90,9 +95,6 @@ application("LesliAudit", [{
90
95
  }, {
91
96
  path: "/analytics/trends",
92
97
  component: appAnalyticsTrends
93
- }, {
94
- path: "/requests",
95
- component: appRequests
96
98
  }, {
97
99
  path: "/security/sessions",
98
100
  component: appSecuritySessions
@@ -15,7 +15,6 @@ const storeAnalytics = useAnalytics()
15
15
  // ·
16
16
  import visitors from "../../components/visitors.vue";
17
17
  import requests from "../../components/requests.vue";
18
- import resources from "../../components/resources.vue";
19
18
  //import trends from "./trends.vue";
20
19
 
21
20
 
@@ -28,10 +27,8 @@ function reload() {
28
27
  // · initializing
29
28
  onMounted(() => {
30
29
  storeAnalytics.fetchVisits()
31
- setTimeout(() => storeAnalytics.fetchUsers(), 500)
32
- setTimeout(() => storeAnalytics.fetchDevices(), 1000)
33
- setTimeout(() => storeAnalytics.fetchResources(), 1500)
34
- setTimeout(() => storeAnalytics.fetchControllers(), 2000)
30
+ setTimeout(() => storeAnalytics.fetchUsers(), 600)
31
+ setTimeout(() => storeAnalytics.fetchControllers(), 1200)
35
32
  })
36
33
 
37
34
  </script>
@@ -53,8 +50,7 @@ onMounted(() => {
53
50
  ]">
54
51
  </lesli-select>
55
52
  </lesli-header>
56
- <visitors class="mb-5"></visitors>
57
- <resources class="mb-5"></resources>
53
+ <visitors class="mb-6"></visitors>
58
54
  <requests></requests>
59
55
  </lesli-application-container>
60
56
  </template>
@@ -1,18 +1,33 @@
1
1
  <script setup>
2
2
  /*
3
- Copyright (c) 2022, all rights reserved.
4
3
 
5
- All the information provided by this platform is protected by international laws related to
6
- industrial property, intellectual property, copyright and relative international laws.
7
- All intellectual or industrial property rights of the code, texts, trade mark, design,
8
- pictures and any other information belongs to the owner of this platform.
4
+ Lesli
9
5
 
10
- Without the written permission of the owner, any replication, modification,
11
- transmission, publication is strictly forbidden.
6
+ Copyright (c) 2023, Lesli Technologies, S. A.
12
7
 
13
- For more information read the license file including with this software.
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.
14
12
 
15
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
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 https://www.lesli.tech
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
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
16
31
  // ·
17
32
  */
18
33
 
@@ -22,28 +37,18 @@ import { ref, reactive, onMounted, watch, computed } from "vue"
22
37
 
23
38
 
24
39
  // · import lesli stores
25
- import { useLogRequest } from "CloudAudit/stores/request"
40
+ import { useRequests } from "LesliAudit/stores/request"
26
41
 
27
42
 
28
43
  // · implement stores
29
- const store = useLogRequest()
44
+ const storeRequests = useRequests()
30
45
 
31
46
 
32
47
  // · define variables
33
48
  const columns = [{
34
49
  field: "id",
35
50
  label: "ID"
36
- }, {
37
- field: "email",
38
- label: "Email",
39
- sort: true
40
- }, {
41
- field: "request_agent",
42
- label: "Device"
43
- }, {
44
- field: "request_method",
45
- label: "Method"
46
- }, {
51
+ }, {
47
52
  field: "request_controller",
48
53
  label: "Controller",
49
54
  sort: true
@@ -51,23 +56,20 @@ const columns = [{
51
56
  field: "request_action",
52
57
  label: "Action"
53
58
  }, {
54
- field: "created_at_date",
59
+ field: "request_count",
60
+ align: "center",
61
+ label: "Count"
62
+ }, {
63
+ field: "created_at",
55
64
  label: "Date"
56
65
  }]
57
66
 
58
67
 
59
68
  // · initializing
60
69
  onMounted(() => {
61
- store.fetchLogsIfEmpty()
70
+ storeRequests.fetch()
62
71
  })
63
72
 
64
-
65
- function itemProjection(item){ console.log("itemprojection", item) }
66
- function selectItemEventHandler(item){ console.log("selectItem", item) }
67
- function onInputEventHandler(item){ console.log("onInput", item) }
68
- function onFocusEventHandler(item){ console.log("onFocus", item) }
69
- function onBlurEventHandler(item){ console.log("onBlur", item) }
70
-
71
73
  </script>
72
74
  <script>
73
75
  export default {
@@ -79,12 +81,12 @@ export default {
79
81
  }
80
82
  </script>
81
83
  <template>
82
- <section class="application-component">
84
+ <lesli-application-container>
83
85
  <lesli-header
84
- title="Users activity"
85
- @reload="store.fetchLogs()">
86
+ title="Account requests"
87
+ @reload="storeRequests.fetchLogs()">
86
88
  </lesli-header>
87
- <lesli-toolbar @search="store.search">
89
+ <lesli-toolbar @search="storeRequests.search">
88
90
  <!--
89
91
  <Autocomplete
90
92
  id="typeahead_id"
@@ -111,13 +113,13 @@ export default {
111
113
  -->
112
114
  </lesli-toolbar>
113
115
  <lesli-table
114
- @sort="store.sort"
115
- @paginate="store.paginate"
116
- :pagination="store.pagination"
117
- :loading="store.loading"
116
+ @sort="storeRequests.sort"
117
+ @paginate="storeRequests.paginate"
118
+ :pagination="storeRequests.pagination"
119
+ :loading="storeRequests.loading"
118
120
  :columns="columns"
119
- :records="store.records"
121
+ :records="storeRequests.records"
120
122
  @click="showUser">
121
123
  </lesli-table>
122
- </section>
124
+ </lesli-application-container>
123
125
  </template>