lesli_audit 0.4.0 → 0.6.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 +2776 -1688
  3. data/app/assets/stylesheets/lesli_audit/application.css +35 -0
  4. data/app/controllers/lesli_audit/dashboards_controller.rb +26 -49
  5. data/app/controllers/lesli_audit/users_controller.rb +35 -0
  6. data/app/helpers/lesli_audit/dashboard/components_helper.rb +4 -0
  7. data/app/models/lesli_audit/account.rb +7 -0
  8. data/app/models/lesli_audit/dashboard/component.rb +18 -0
  9. data/app/models/lesli_audit/dashboard.rb +30 -2
  10. data/app/services/lesli_audit/account/activity_services.rb +2 -2
  11. data/app/services/lesli_audit/analytics/trend_services.rb +2 -2
  12. data/app/services/lesli_audit/user_service.rb +63 -0
  13. data/app/services/lesli_audit/users/activity_services.rb +2 -2
  14. data/app/services/lesli_audit/users/log_services.rb +2 -2
  15. data/app/services/lesli_audit/users/registration_services.rb +2 -2
  16. data/app/services/lesli_audit/users/role_services.rb +2 -2
  17. data/app/services/lesli_audit/users/working_hour_services.rb +2 -2
  18. data/app/views/lesli_audit/dashboard/components/_component.html.erb +2 -0
  19. data/app/views/lesli_audit/dashboard/components/_form.html.erb +17 -0
  20. data/app/views/lesli_audit/dashboard/components/edit.html.erb +1 -0
  21. data/app/views/lesli_audit/dashboard/components/index.html.erb +14 -0
  22. data/app/views/lesli_audit/dashboard/components/new.html.erb +9 -0
  23. data/app/views/lesli_audit/dashboard/components/show.html.erb +1 -0
  24. data/app/views/lesli_audit/dashboards/edit.html.erb +1 -10
  25. data/app/views/lesli_audit/partials/_engine-navigation.html.erb +4 -4
  26. data/config/locales/translations.en.yml +17 -1
  27. data/config/locales/translations.es.yml +17 -1
  28. data/config/locales/translations.fr.yml +21 -0
  29. data/config/locales/translations.it.yml +21 -0
  30. data/config/locales/translations.pt.yml +21 -0
  31. data/config/routes.rb +17 -3
  32. data/db/seeds.rb +4 -1
  33. data/lib/lesli_audit/version.rb +2 -2
  34. data/{app/assets/stylesheets/lesli_audit → lib/scss}/application.scss +0 -4
  35. data/lib/vue/application.js +47 -5
  36. data/lib/vue/apps/analytics/index.vue +1 -1
  37. data/lib/vue/apps/analytics/trends.vue +2 -3
  38. data/lib/vue/apps/dashboards/components/roles.vue +71 -0
  39. data/lib/vue/apps/dashboards/components/users.vue +71 -0
  40. data/lib/vue/apps/dashboards/show.vue +8 -0
  41. data/lib/vue/apps/requests/index.vue +1 -1
  42. data/lib/vue/apps/users/index.vue +80 -22
  43. data/lib/vue/apps/users/registrations.vue +21 -44
  44. data/lib/vue/components/requests.vue +1 -1
  45. data/lib/vue/components/visitors.vue +1 -1
  46. data/lib/vue/stores/analytics.js +24 -9
  47. data/lib/vue/stores/translations.json +133 -19
  48. data/lib/vue/stores/users.js +56 -0
  49. metadata +25 -10
  50. data/app/assets/javascripts/lesli_audit/application.js.LICENSE.txt +0 -327
  51. data/app/assets/stylesheets/lesli_audit/dashboard.scss +0 -0
  52. /data/db/migrate/v1.0/{0803000110_create_lesli_audit_accounts.rb → 0503000110_create_lesli_audit_accounts.rb} +0 -0
  53. /data/db/migrate/v1.0/{0803050110_create_lesli_audit_dashboards.rb → 0503050110_create_lesli_audit_dashboards.rb} +0 -0
  54. /data/db/migrate/v1.0/{0803050210_create_lesli_audit_dashboard_components.rb → 0503050210_create_lesli_audit_dashboard_components.rb} +0 -0
  55. /data/db/migrate/v1.0/{0803100010_create_lesli_audit_account_requests.rb → 0503100010_create_lesli_audit_account_requests.rb} +0 -0
  56. /data/db/migrate/v1.0/{0803110010_create_lesli_audit_user_requests.rb → 0503110010_create_lesli_audit_user_requests.rb} +0 -0
@@ -0,0 +1,35 @@
1
+ /*!*********************************************************************************************************************************************************!*\
2
+ !*** css ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/sass-loader/dist/cjs.js!../LesliAudit/lib/scss/application.scss ***!
3
+ \*********************************************************************************************************************************************************/
4
+ @charset "UTF-8";
5
+ /*
6
+
7
+ Lesli
8
+
9
+ Copyright (c) 2023, Lesli Technologies, S. A.
10
+
11
+ This program is free software: you can redistribute it and/or modify
12
+ it under the terms of the GNU General Public License as published by
13
+ the Free Software Foundation, either version 3 of the License, or
14
+ (at your option) any later version.
15
+
16
+ This program is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU General Public License for more details.
20
+
21
+ You should have received a copy of the GNU General Public License
22
+ along with this program. If not, see http://www.gnu.org/licenses/.
23
+
24
+ Lesli · Ruby on Rails SaaS Development Framework.
25
+
26
+ Made with ♥ by https://www.lesli.tech
27
+ Building a better future, one line of code at a time.
28
+
29
+ @contact hello@lesli.tech
30
+ @website https://www.lesli.tech
31
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
32
+
33
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
34
+ // ·
35
+ */
@@ -1,59 +1,36 @@
1
- module LesliAudit
2
- class DashboardsController < ApplicationController
3
- #before_action :set_dashboard, only: %i[ show edit update destroy ]
1
+ =begin
4
2
 
5
- # GET /dashboards
6
- def index
7
- end
3
+ Lesli
8
4
 
9
- # GET /dashboards/1
10
- def show
11
- end
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
12
6
 
13
- # GET /dashboards/new
14
- def new
15
- @dashboard = Dashboard.new
16
- end
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.
17
11
 
18
- # GET /dashboards/1/edit
19
- def edit
20
- end
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.
21
16
 
22
- # POST /dashboards
23
- def create
24
- @dashboard = Dashboard.new(dashboard_params)
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/.
25
19
 
26
- if @dashboard.save
27
- redirect_to @dashboard, notice: "Dashboard was successfully created."
28
- else
29
- render :new, status: :unprocessable_entity
30
- end
31
- end
20
+ Lesli · Ruby on Rails SaaS Development Framework.
32
21
 
33
- # PATCH/PUT /dashboards/1
34
- def update
35
- if @dashboard.update(dashboard_params)
36
- redirect_to @dashboard, notice: "Dashboard was successfully updated.", status: :see_other
37
- else
38
- render :edit, status: :unprocessable_entity
39
- end
40
- end
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
41
24
 
42
- # DELETE /dashboards/1
43
- def destroy
44
- @dashboard.destroy
45
- redirect_to dashboards_url, notice: "Dashboard was successfully destroyed.", status: :see_other
46
- end
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
47
32
 
48
- private
49
- # Use callbacks to share common setup or constraints between actions.
50
- def set_dashboard
51
- @dashboard = Dashboard.find(params[:id])
52
- end
53
-
54
- # Only allow a list of trusted parameters through.
55
- def dashboard_params
56
- params.fetch(:dashboard, {})
57
- end
58
- end
33
+ module LesliAudit
34
+ class DashboardsController < Lesli::Shared::DashboardsController
35
+ end
59
36
  end
@@ -1,3 +1,34 @@
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 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
1
32
  module LesliAudit
2
33
  class UsersController < ApplicationController
3
34
 
@@ -5,6 +36,10 @@ module LesliAudit
5
36
  def index
6
37
  end
7
38
 
39
+ def registrations
40
+ respond_with_successful(UserService.new(current_user, query).registrations)
41
+ end
42
+
8
43
 
9
44
  private
10
45
 
@@ -0,0 +1,4 @@
1
+ module LesliAudit
2
+ module Dashboard::ComponentsHelper
3
+ end
4
+ end
@@ -3,5 +3,12 @@ module LesliAudit
3
3
  belongs_to :account, class_name: "Lesli::Account"
4
4
  has_many :account_requests
5
5
  has_many :user_requests
6
+ has_many :dashboards
7
+
8
+ after_create :initialize_account
9
+
10
+ def initialize_account
11
+ Dashboard.initialize_account(self)
12
+ end
6
13
  end
7
14
  end
@@ -0,0 +1,18 @@
1
+ module LesliAudit
2
+ class Dashboard::Component < ApplicationRecord
3
+
4
+ belongs_to :dashboard, inverse_of: :components
5
+
6
+ def self.component_ids
7
+ ["audit-users", "audit-roles"]
8
+ end
9
+ # components_ids: {
10
+ # list_new_tickets: "list_new_tickets",
11
+ # list_my_tickets: "list_my_tickets",
12
+ # list_unassigned_tickets: "list_unassigned_tickets",
13
+ # chart_tickets_by_type: "chart_tickets_by_type",
14
+ # chart_tickets_by_category: "chart_tickets_by_category",
15
+ # hours_worked: "hours_worked"
16
+ # }
17
+ end
18
+ end
@@ -1,4 +1,32 @@
1
1
  module LesliAudit
2
- class Dashboard < ApplicationRecord
3
- end
2
+ #class Dashboard < Lesli::ApplicationLesliRecord
3
+ class Dashboard < Lesli::Shared::Dashboard
4
+ self.table_name = "lesli_audit_dashboards"
5
+ belongs_to :account
6
+
7
+ has_many :components, inverse_of: :dashboard, autosave: true, dependent: :destroy
8
+ accepts_nested_attributes_for :components, allow_destroy: true
9
+
10
+ def self.initialize_account(account)
11
+ self.create!(
12
+ account: account,
13
+ name: "Audit Default Dashboard",
14
+ default: true,
15
+ main: false,
16
+ components_attributes: [{
17
+ name: "Total users",
18
+ component_id: "audit-users",
19
+ layout: 3,
20
+ query_configuration: {},
21
+ custom_configuration: {}
22
+ }, {
23
+ name: "Roles",
24
+ component_id: "audit-roles",
25
+ layout: 3,
26
+ query_configuration: {},
27
+ custom_configuration: {}
28
+ }]
29
+ )
30
+ end
31
+ end
4
32
  end
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Analytics::ActivityServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Account::ActivityServices < Lesli::ApplicationLesliService
35
35
 
36
36
  def index
37
37
  search_string = nil # query[:search].downcase.gsub(" ","%") unless query[:search].blank?
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Analytics::TrendServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Analytics::TrendServices < Lesli::ApplicationLesliService
35
35
 
36
36
  def index
37
37
 
@@ -0,0 +1,63 @@
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 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
+ module LesliAudit
34
+ class UserService < Lesli::ApplicationLesliService
35
+
36
+ def registrations
37
+
38
+ period = "month"
39
+
40
+ #Get filters from the request
41
+ group = query[:group]
42
+
43
+ #Get period only if the request have filters
44
+ period = group unless group.blank?
45
+
46
+ registrations = []
47
+
48
+ if ["day", "week", "month", "year"].include?(period)
49
+ registrations = current_user.account.users
50
+ .group("DATE_TRUNC('#{period}', created_at)")
51
+ .count
52
+ .map do |request|
53
+ {
54
+ :date => Date2.new(request[0]).date.to_s,
55
+ :count => request[1]
56
+ }
57
+ end
58
+ end
59
+
60
+ registrations
61
+ end
62
+ end
63
+ end
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::ActivityServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::ActivityServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::LogServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::LogServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::RegistrationServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::RegistrationServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::RoleServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::RoleServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- module CloudAudit
34
- class Users::WorkingHourServices < ApplicationLesliServices
33
+ module LesliAudit
34
+ class Users::WorkingHourServices < Lesli::ApplicationLesliService
35
35
 
36
36
  # @overwrite
37
37
  # @return {Hash} Paginated list of the records
@@ -0,0 +1,2 @@
1
+ <div id="<%= dom_id component %>">
2
+ </div>
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: dashboard_component) do |form| %>
2
+ <% if dashboard_component.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(dashboard_component.errors.count, "error") %> prohibited this dashboard_component from being saved:</h2>
5
+
6
+ <ul>
7
+ <% dashboard_component.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 @@
1
+ <router-view></router-view>
@@ -0,0 +1,14 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <h1>Components</h1>
4
+
5
+ <div id="dashboard_components">
6
+ <% @dashboard_components.each do |dashboard_component| %>
7
+ <%= render dashboard_component %>
8
+ <p>
9
+ <%= link_to "Show this component", dashboard_component %>
10
+ </p>
11
+ <% end %>
12
+ </div>
13
+
14
+ <%= link_to "New component", new_dashboard_component_path %>
@@ -0,0 +1,9 @@
1
+ <h1>New component</h1>
2
+
3
+ <%= render "form", dashboard_component: @dashboard_component %>
4
+
5
+ <br>
6
+
7
+ <div>
8
+ <%= link_to "Back to components", dashboard_components_path %>
9
+ </div>
@@ -0,0 +1 @@
1
+ <router-view></router-view>
@@ -1,10 +1 @@
1
- <h1>Editing dashboard</h1>
2
-
3
- <%= render "form", dashboard: @dashboard %>
4
-
5
- <br>
6
-
7
- <div>
8
- <%= link_to "Show this dashboard", @dashboard %> |
9
- <%= link_to "Back to dashboards", dashboards_path %>
10
- </div>
1
+ <router-view></router-view>
@@ -18,9 +18,9 @@ GNU General Public License for more details.
18
18
  You should have received a copy of the GNU General Public License
19
19
  along with this program. If not, see http://www.gnu.org/licenses/.
20
20
 
21
- Lesli · Ruby on Rails SaaS development platform.
21
+ Lesli · Ruby on Rails SaaS Development Framework.
22
22
 
23
- Made with ♥ by https://www.lesli.tech
23
+ Made with ♥ by LesliTech
24
24
  Building a better future, one line of code at a time.
25
25
 
26
26
  @contact hello@lesli.tech
@@ -32,8 +32,8 @@ Building a better future, one line of code at a time.
32
32
  =end
33
33
  %>
34
34
 
35
- <%= navigation_item(lesli_audit.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
35
+ <%#= navigation_item(lesli_audit.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
36
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
- <%= navigation_item(lesli_audit.dashboard_path, "Account", "ri-briefcase-line"); %>
38
+ <%#= navigation_item(lesli_audit.dashboard_path, "Account", "ri-briefcase-line"); %>
39
39
  <%= navigation_item(lesli_audit.requests_path, "Requests", "ri-arrow-left-right-fill"); %>
@@ -1,5 +1,21 @@
1
1
  ---
2
2
  :en:
3
- lesli_audit:
3
+ lesli:
4
4
  shared:
5
+ view_discussions: Discussions
6
+ button_add_new: Add new
7
+ button_reload: Reload
8
+ view_files: Files
9
+ view_quick_actions: Quick actions
10
+ button_list: List
5
11
  button_save: Save
12
+ button_delete: Delete
13
+ button_edit: Edit
14
+ view_status_active: Active
15
+ view_status_inactive: Inactive
16
+ button_settings: Settings
17
+ button_show: Show
18
+ toolbar_search: Search...
19
+ application:
20
+ navigation_logout: Logout
21
+ navigation_my_profile: My profile
@@ -1,5 +1,21 @@
1
1
  ---
2
2
  :es:
3
- lesli_audit:
3
+ lesli:
4
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
5
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
+ toolbar_search: Buscar...
19
+ application:
20
+ navigation_logout: Cerrar sesión
21
+ navigation_my_profile: Mi perfil
@@ -0,0 +1,21 @@
1
+ ---
2
+ :fr:
3
+ lesli:
4
+ shared:
5
+ view_discussions: ":lesli.shared.view_discussions:"
6
+ button_add_new: ":lesli.shared.button_add_new:"
7
+ button_reload: ":lesli.shared.button_reload:"
8
+ view_files: ":lesli.shared.view_files:"
9
+ view_quick_actions: ":lesli.shared.view_quick_actions:"
10
+ button_list: ":lesli.shared.button_list:"
11
+ button_save: ":lesli.shared.button_save:"
12
+ button_delete: ":lesli.shared.button_delete:"
13
+ button_edit: ":lesli.shared.button_edit:"
14
+ view_status_active: ":lesli.shared.view_status_active:"
15
+ view_status_inactive: ":lesli.shared.view_status_inactive:"
16
+ button_settings: ":lesli.shared.button_settings:"
17
+ button_show: ":lesli.shared.button_show:"
18
+ toolbar_search: ":lesli.shared.toolbar_search:"
19
+ application:
20
+ navigation_logout: ":lesli.application.navigation_logout:"
21
+ navigation_my_profile: ":lesli.application.navigation_my_profile:"
@@ -0,0 +1,21 @@
1
+ ---
2
+ :it:
3
+ lesli:
4
+ shared:
5
+ view_discussions: ":lesli.shared.view_discussions:"
6
+ button_add_new: ":lesli.shared.button_add_new:"
7
+ button_reload: ":lesli.shared.button_reload:"
8
+ view_files: ":lesli.shared.view_files:"
9
+ view_quick_actions: ":lesli.shared.view_quick_actions:"
10
+ button_list: ":lesli.shared.button_list:"
11
+ button_save: ":lesli.shared.button_save:"
12
+ button_delete: ":lesli.shared.button_delete:"
13
+ button_edit: ":lesli.shared.button_edit:"
14
+ view_status_active: ":lesli.shared.view_status_active:"
15
+ view_status_inactive: ":lesli.shared.view_status_inactive:"
16
+ button_settings: ":lesli.shared.button_settings:"
17
+ button_show: ":lesli.shared.button_show:"
18
+ toolbar_search: ":lesli.shared.toolbar_search:"
19
+ application:
20
+ navigation_logout: ":lesli.application.navigation_logout:"
21
+ navigation_my_profile: ":lesli.application.navigation_my_profile:"
@@ -0,0 +1,21 @@
1
+ ---
2
+ :pt:
3
+ lesli:
4
+ shared:
5
+ view_discussions: ":lesli.shared.view_discussions:"
6
+ button_add_new: ":lesli.shared.button_add_new:"
7
+ button_reload: ":lesli.shared.button_reload:"
8
+ view_files: ":lesli.shared.view_files:"
9
+ view_quick_actions: ":lesli.shared.view_quick_actions:"
10
+ button_list: ":lesli.shared.button_list:"
11
+ button_save: ":lesli.shared.button_save:"
12
+ button_delete: ":lesli.shared.button_delete:"
13
+ button_edit: ":lesli.shared.button_edit:"
14
+ view_status_active: ":lesli.shared.view_status_active:"
15
+ view_status_inactive: ":lesli.shared.view_status_inactive:"
16
+ button_settings: ":lesli.shared.button_settings:"
17
+ button_show: ":lesli.shared.button_show:"
18
+ toolbar_search: ":lesli.shared.toolbar_search:"
19
+ application:
20
+ navigation_logout: ":lesli.application.navigation_logout:"
21
+ navigation_my_profile: ":lesli.application.navigation_my_profile:"
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 Development Framework.
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,7 +32,6 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  LesliAudit::Engine.routes.draw do
34
34
 
35
-
36
35
  # Dashboard alias
37
36
  root to: "dashboards#show"
38
37
 
@@ -43,6 +42,15 @@ LesliAudit::Engine.routes.draw do
43
42
  # Visits
44
43
  # Trends
45
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
46
54
 
47
55
 
48
56
  # Users:
@@ -52,11 +60,17 @@ LesliAudit::Engine.routes.draw do
52
60
  # Roles total users by role
53
61
  # Logs relevant actions of users
54
62
  resources :users, only: [:index] do
55
-
63
+ collection do
64
+ get :registrations
65
+ end
56
66
  end
57
67
 
58
68
 
59
69
  # Analytics:
70
+ # Visitors by date
71
+ # Trends by date
72
+ # Most active users
73
+ # Most active controllers
60
74
  resources :analytics, only: [:index] do
61
75
  collection do
62
76
  get :trends
data/db/seeds.rb CHANGED
@@ -35,6 +35,9 @@ Building a better future, one line of code at a time.
35
35
  # Seed files are only for development, if you need to create default resources
36
36
  # for production you must use the initializer method in the Engine account model
37
37
  if Rails.env.development?
38
- L2.msg("Loading seeds for LesliAudit", "Version: #{LesliAudit::VERSION}", "Build: #{LesliAudit::BUILD}")
38
+ L2.msg(
39
+ "LesliAudit",
40
+ "Version: #{LesliAudit::VERSION}",
41
+ "Build: #{LesliAudit::BUILD}")
39
42
  load(LesliAudit::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb"))
40
43
  end