lesli_audit 0.3.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/lesli_audit/application.js +2083 -1626
- data/app/controllers/lesli_audit/dashboard/components_controller.rb +60 -0
- data/app/controllers/lesli_audit/dashboards_controller.rb +26 -49
- data/app/controllers/lesli_audit/requests_controller.rb +36 -50
- data/app/controllers/lesli_audit/users_controller.rb +5 -53
- data/app/helpers/lesli_audit/dashboard/components_helper.rb +4 -0
- data/app/models/lesli_audit/account/request.rb +4 -0
- data/app/models/lesli_audit/account.rb +8 -0
- data/app/models/lesli_audit/dashboard/component.rb +18 -0
- data/app/models/lesli_audit/dashboard.rb +30 -2
- data/app/services/lesli_audit/{request_services.rb → request_service.rb} +14 -3
- data/app/views/lesli_audit/dashboard/components/_component.html.erb +2 -0
- data/app/views/lesli_audit/dashboard/components/_form.html.erb +17 -0
- data/app/views/lesli_audit/dashboard/components/edit.html.erb +1 -0
- data/app/views/lesli_audit/dashboard/components/index.html.erb +14 -0
- data/app/views/lesli_audit/dashboard/components/new.html.erb +9 -0
- data/app/views/lesli_audit/dashboard/components/show.html.erb +1 -0
- data/app/views/lesli_audit/dashboards/edit.html.erb +1 -10
- data/app/views/lesli_audit/partials/_engine-navigation.html.erb +2 -2
- data/app/views/lesli_audit/requests/index.html.erb +1 -14
- data/app/views/lesli_audit/users/index.html.erb +1 -14
- data/config/locales/translations.en.yml +17 -4
- data/config/locales/translations.es.yml +17 -4
- data/config/routes.rb +17 -3
- data/db/seeds.rb +4 -1
- data/lib/lesli_audit/version.rb +1 -1
- data/lib/vue/application.js +50 -6
- data/lib/vue/apps/dashboards/components/roles.vue +71 -0
- data/lib/vue/apps/dashboards/components/users.vue +71 -0
- data/lib/vue/apps/dashboards/show.vue +8 -0
- data/lib/vue/apps/requests/index.vue +43 -41
- data/lib/vue/apps/users/index.vue +31 -0
- data/lib/vue/components/requests.vue +2 -0
- data/lib/vue/components/visitors.vue +3 -3
- data/lib/vue/stores/analytics.js +4 -1
- data/lib/vue/stores/request.js +4 -4
- data/lib/vue/stores/translations.json +32 -22
- data/readme.md +9 -9
- metadata +23 -10
- data/app/assets/javascripts/lesli_audit/application.js.LICENSE.txt +0 -327
- /data/db/migrate/v1.0/{0803000110_create_lesli_audit_accounts.rb → 0503000110_create_lesli_audit_accounts.rb} +0 -0
- /data/db/migrate/v1.0/{0803050110_create_lesli_audit_dashboards.rb → 0503050110_create_lesli_audit_dashboards.rb} +0 -0
- /data/db/migrate/v1.0/{0803050210_create_lesli_audit_dashboard_components.rb → 0503050210_create_lesli_audit_dashboard_components.rb} +0 -0
- /data/db/migrate/v1.0/{0803100010_create_lesli_audit_account_requests.rb → 0503100010_create_lesli_audit_account_requests.rb} +0 -0
- /data/db/migrate/v1.0/{0803110010_create_lesli_audit_user_requests.rb → 0503110010_create_lesli_audit_user_requests.rb} +0 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
module LesliAudit
|
2
|
+
class Dashboard::ComponentsController < ApplicationController
|
3
|
+
before_action :set_dashboard_component, only: %i[ show edit update destroy ]
|
4
|
+
|
5
|
+
# GET /dashboard/components
|
6
|
+
def index
|
7
|
+
@dashboard_components = Dashboard::Component.all
|
8
|
+
end
|
9
|
+
|
10
|
+
# GET /dashboard/components/1
|
11
|
+
def show
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /dashboard/components/new
|
15
|
+
def new
|
16
|
+
@dashboard_component = Dashboard::Component.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# GET /dashboard/components/1/edit
|
20
|
+
def edit
|
21
|
+
end
|
22
|
+
|
23
|
+
# POST /dashboard/components
|
24
|
+
def create
|
25
|
+
@dashboard_component = Dashboard::Component.new(dashboard_component_params)
|
26
|
+
|
27
|
+
if @dashboard_component.save
|
28
|
+
redirect_to @dashboard_component, notice: "Component was successfully created."
|
29
|
+
else
|
30
|
+
render :new, status: :unprocessable_entity
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# PATCH/PUT /dashboard/components/1
|
35
|
+
def update
|
36
|
+
if @dashboard_component.update(dashboard_component_params)
|
37
|
+
redirect_to @dashboard_component, notice: "Component was successfully updated.", status: :see_other
|
38
|
+
else
|
39
|
+
render :edit, status: :unprocessable_entity
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# DELETE /dashboard/components/1
|
44
|
+
def destroy
|
45
|
+
@dashboard_component.destroy
|
46
|
+
redirect_to dashboard_components_url, notice: "Component was successfully destroyed.", status: :see_other
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
# Use callbacks to share common setup or constraints between actions.
|
51
|
+
def set_dashboard_component
|
52
|
+
@dashboard_component = Dashboard::Component.find(params[:id])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Only allow a list of trusted parameters through.
|
56
|
+
def dashboard_component_params
|
57
|
+
params.fetch(:dashboard_component, {})
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -1,59 +1,36 @@
|
|
1
|
-
|
2
|
-
class DashboardsController < ApplicationController
|
3
|
-
#before_action :set_dashboard, only: %i[ show edit update destroy ]
|
1
|
+
=begin
|
4
2
|
|
5
|
-
|
6
|
-
def index
|
7
|
-
end
|
3
|
+
Lesli
|
8
4
|
|
9
|
-
|
10
|
-
def show
|
11
|
-
end
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
12
6
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
23
|
-
|
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
|
-
|
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
|
-
|
34
|
-
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
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
|
-
|
49
|
-
|
50
|
-
|
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,60 +1,46 @@
|
|
1
|
-
|
2
|
-
class RequestsController < ApplicationController
|
3
|
-
before_action :set_request, only: %i[ show edit update destroy ]
|
1
|
+
=begin
|
4
2
|
|
5
|
-
|
6
|
-
def index
|
7
|
-
@requests = Request.all
|
8
|
-
end
|
3
|
+
Lesli
|
9
4
|
|
10
|
-
|
11
|
-
def show
|
12
|
-
end
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
13
6
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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.
|
18
11
|
|
19
|
-
|
20
|
-
|
21
|
-
|
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.
|
22
16
|
|
23
|
-
|
24
|
-
|
25
|
-
@request = Request.new(request_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/.
|
26
19
|
|
27
|
-
|
28
|
-
redirect_to @request, notice: "Request was successfully created."
|
29
|
-
else
|
30
|
-
render :new, status: :unprocessable_entity
|
31
|
-
end
|
32
|
-
end
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
33
21
|
|
34
|
-
|
35
|
-
|
36
|
-
if @request.update(request_params)
|
37
|
-
redirect_to @request, notice: "Request was successfully updated.", status: :see_other
|
38
|
-
else
|
39
|
-
render :edit, status: :unprocessable_entity
|
40
|
-
end
|
41
|
-
end
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
42
24
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
48
32
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
33
|
+
module LesliAudit
|
34
|
+
class RequestsController < ApplicationController
|
35
|
+
|
36
|
+
# GET /requests
|
37
|
+
def index
|
38
|
+
respond_to do |format|
|
39
|
+
format.html
|
40
|
+
format.json {
|
41
|
+
respond_with_pagination(LesliAudit::RequestService.new(current_user, query).index)
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
60
46
|
end
|
@@ -1,60 +1,12 @@
|
|
1
1
|
module LesliAudit
|
2
|
-
|
3
|
-
before_action :set_user, only: %i[ show edit update destroy ]
|
2
|
+
class UsersController < ApplicationController
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
end
|
9
|
-
|
10
|
-
# GET /users/1
|
11
|
-
def show
|
12
|
-
end
|
13
|
-
|
14
|
-
# GET /users/new
|
15
|
-
def new
|
16
|
-
@user = User.new
|
17
|
-
end
|
18
|
-
|
19
|
-
# GET /users/1/edit
|
20
|
-
def edit
|
21
|
-
end
|
22
|
-
|
23
|
-
# POST /users
|
24
|
-
def create
|
25
|
-
@user = User.new(user_params)
|
4
|
+
# GET /users
|
5
|
+
def index
|
6
|
+
end
|
26
7
|
|
27
|
-
if @user.save
|
28
|
-
redirect_to @user, notice: "User was successfully created."
|
29
|
-
else
|
30
|
-
render :new, status: :unprocessable_entity
|
31
|
-
end
|
32
|
-
end
|
33
8
|
|
34
|
-
|
35
|
-
def update
|
36
|
-
if @user.update(user_params)
|
37
|
-
redirect_to @user, notice: "User was successfully updated.", status: :see_other
|
38
|
-
else
|
39
|
-
render :edit, status: :unprocessable_entity
|
40
|
-
end
|
41
|
-
end
|
9
|
+
private
|
42
10
|
|
43
|
-
# DELETE /users/1
|
44
|
-
def destroy
|
45
|
-
@user.destroy
|
46
|
-
redirect_to users_url, notice: "User was successfully destroyed.", status: :see_other
|
47
11
|
end
|
48
|
-
|
49
|
-
private
|
50
|
-
# Use callbacks to share common setup or constraints between actions.
|
51
|
-
def set_user
|
52
|
-
@user = User.find(params[:id])
|
53
|
-
end
|
54
|
-
|
55
|
-
# Only allow a list of trusted parameters through.
|
56
|
-
def user_params
|
57
|
-
params.fetch(:user, {})
|
58
|
-
end
|
59
|
-
end
|
60
12
|
end
|
@@ -1,6 +1,14 @@
|
|
1
1
|
module LesliAudit
|
2
2
|
class Account < ApplicationRecord
|
3
|
+
belongs_to :account, class_name: "Lesli::Account"
|
3
4
|
has_many :account_requests
|
4
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
|
5
13
|
end
|
6
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
|
-
|
3
|
-
|
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
|
@@ -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 Framework.
|
21
21
|
|
22
22
|
Made with ♥ by https://www.lesli.tech
|
23
23
|
Building a better future, one line of code at a time.
|
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
30
30
|
// ·
|
31
31
|
=end
|
32
32
|
|
33
|
-
module
|
34
|
-
class
|
33
|
+
module LesliAudit
|
34
|
+
class RequestService < Lesli::ApplicationLesliService
|
35
35
|
|
36
36
|
# @overwrite
|
37
37
|
# @return {Hash} Paginated list of the records
|
@@ -39,6 +39,17 @@ module CloudAudit
|
|
39
39
|
# @description
|
40
40
|
# @example
|
41
41
|
def index
|
42
|
+
|
43
|
+
|
44
|
+
requests = Account::Request.all
|
45
|
+
.order(created_at: :desc)
|
46
|
+
.order(request_count: :desc)
|
47
|
+
.page(query[:pagination][:page])
|
48
|
+
.per(query[:pagination][:perPage])
|
49
|
+
|
50
|
+
return requests
|
51
|
+
|
52
|
+
|
42
53
|
search_string = nil # query[:search].downcase.gsub(" ","%") unless query[:search].blank?
|
43
54
|
order_string = "user_requests.created_at"
|
44
55
|
|
@@ -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 @@
|
|
1
|
+
<router-view></router-view>
|
@@ -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.
|
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.
|
39
|
+
<%= navigation_item(lesli_audit.requests_path, "Requests", "ri-arrow-left-right-fill"); %>
|
@@ -1,14 +1 @@
|
|
1
|
-
<
|
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 %>
|
1
|
+
<router-view></router-view>
|
@@ -1,14 +1 @@
|
|
1
|
-
<
|
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 %>
|
1
|
+
<router-view></router-view>
|
@@ -1,7 +1,20 @@
|
|
1
1
|
---
|
2
2
|
:en:
|
3
|
-
|
3
|
+
lesli:
|
4
4
|
shared:
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
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
|
+
application:
|
19
|
+
navigation_logout: Logout
|
20
|
+
navigation_my_profile: My profile
|
@@ -1,7 +1,20 @@
|
|
1
1
|
---
|
2
2
|
:es:
|
3
|
-
|
3
|
+
lesli:
|
4
4
|
shared:
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
data/config/routes.rb
CHANGED
@@ -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:
|
@@ -51,10 +59,16 @@ LesliAudit::Engine.routes.draw do
|
|
51
59
|
# Activities changes on users information
|
52
60
|
# Roles total users by role
|
53
61
|
# Logs relevant actions of users
|
54
|
-
resources :users, only: []
|
62
|
+
resources :users, only: [:index] do
|
63
|
+
|
64
|
+
end
|
55
65
|
|
56
66
|
|
57
67
|
# Analytics:
|
68
|
+
# Visitors by date
|
69
|
+
# Trends by date
|
70
|
+
# Most active users
|
71
|
+
# Most active controllers
|
58
72
|
resources :analytics, only: [:index] do
|
59
73
|
collection do
|
60
74
|
get :trends
|
@@ -73,6 +87,6 @@ LesliAudit::Engine.routes.draw do
|
|
73
87
|
|
74
88
|
|
75
89
|
# Requests: Raw request data
|
76
|
-
resources :
|
90
|
+
resources :requests, only: [:index]
|
77
91
|
|
78
92
|
end
|
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(
|
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
|
data/lib/lesli_audit/version.rb
CHANGED