lesli 5.0.4 → 5.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/lesli/brand/app-logo2.svg +52 -0
- data/app/assets/javascripts/lesli/users/passwords.js +3 -3
- data/app/assets/javascripts/lesli/users/registrations.js +3 -3
- data/app/assets/javascripts/lesli/users/sessions.js +3 -3
- data/app/controllers/lesli/application_controller.rb +3 -3
- data/app/controllers/lesli/application_lesli_controller.rb +2 -2
- data/app/controllers/lesli/interfaces/application/authorization.rb +1 -1
- data/app/controllers/lesli/interfaces/application/requester.rb +1 -1
- data/app/controllers/lesli/shared/dashboards_controller.rb +308 -0
- data/app/controllers/users/confirmations_controller.rb +1 -1
- data/app/controllers/users/passwords_controller.rb +7 -10
- data/app/helpers/lesli/general_helper.rb +1 -1
- data/app/helpers/lesli/navigation_helper.rb +17 -16
- data/app/lib/lesli/system.rb +2 -1
- data/app/mailers/lesli/devise_mailer.rb +1 -1
- data/app/models/concerns/account_initializer.rb +9 -0
- data/app/models/lesli/account.rb +1 -0
- data/app/models/lesli/application_lesli_record.rb +1 -1
- data/app/models/lesli/shared/dashboard.rb +162 -0
- data/app/models/lesli/system_controller.rb +1 -0
- data/app/operators/lesli/controller_operator.rb +148 -0
- data/app/views/devise/passwords/new.html.erb +1 -1
- data/app/views/lesli/partials/_application-lesli-engines.html.erb +1 -1
- data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
- data/config/locales/translations.en.yml +17 -0
- data/config/locales/translations.es.yml +17 -0
- data/config/routes.rb +4 -2
- data/db/seed/development/users.rb +0 -1
- data/db/seeds.rb +16 -29
- data/lib/lesli/version.rb +1 -1
- data/lib/mailer_previews/devise_mailer_preview.rb +7 -0
- data/lib/sass/lesli/layouts/application-navbar.scss +1 -1
- data/lib/tasks/lesli/controllers.rake +1 -91
- data/lib/tasks/lesli/db.rake +36 -6
- data/lib/tasks/lesli/dev.rake +66 -0
- data/lib/tasks/lesli/engine.rake +59 -0
- data/lib/tasks/lesli/{role.rake → privileges.rake} +3 -3
- data/lib/tasks/lesli_tasks.rake +5 -0
- data/lib/vue/application.js +2 -1
- data/lib/vue/devise/passwords.js +8 -8
- data/lib/vue/devise/registrations.js +2 -2
- data/lib/vue/devise/sessions.js +11 -6
- data/lib/vue/layouts/application-header.vue +6 -1
- data/lib/vue/shared/dashboards/apps/edit.vue +215 -0
- data/lib/vue/{apps → shared}/dashboards/apps/index.vue +3 -5
- data/lib/vue/{apps → shared}/dashboards/apps/show.vue +26 -16
- data/lib/vue/{apps → shared}/dashboards/components/form.vue +31 -43
- data/lib/vue/shared/stores/dashboard.js +251 -0
- data/lib/vue/stores/translations.json +24 -72
- data/lib/vue/stores/{user.js → users.js} +1 -1
- data/lib/webpack/base.js +3 -2
- data/readme.md +1 -1
- metadata +46 -52
- data/lib/vue/apps/dashboards/apps/edit.vue +0 -105
- data/lib/vue/apps/dashboards/components/preview.vue +0 -172
- /data/app/assets/icons/lesli/{cloud-vault.svg → cloud-guard.svg} +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/action.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion/content.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion/element.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion/filters.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion/new.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/discussion.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/file/grid.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/file/list.vue +0 -0
- /data/lib/vue/{apps → shared}/cloudobjects/file.vue +0 -0
- /data/lib/vue/{apps → shared}/dashboards/apps/new.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/chatroom-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/cloud-object-clone-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/cloud-object-file-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/email-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/notification-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/send-cloud-object-file.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/task-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/actions/index.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/checks/form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/checks/index.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/index.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/new.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/apps/show.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/components/associations.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/components/chart.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/components/workflow-form.vue +0 -0
- /data/lib/vue/{apps → shared}/workflows2/components/workflow-status-dropdown.vue +0 -0
@@ -1,105 +0,0 @@
|
|
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 · Your Smart Business Assistant.
|
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://lesli.tech
|
28
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
-
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
31
|
-
// ·
|
32
|
-
|
33
|
-
*/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
// · import vue tools
|
38
|
-
import { onMounted, inject } from "vue"
|
39
|
-
import { useRouter, useRoute } from "vue-router"
|
40
|
-
|
41
|
-
|
42
|
-
// · import stores
|
43
|
-
import { useDashboard } from "Lesli/shared/stores/dashboard"
|
44
|
-
|
45
|
-
|
46
|
-
// · import components
|
47
|
-
import dashboardForm from "../components/form.vue"
|
48
|
-
import dashboardPreview from "../components/preview.vue"
|
49
|
-
|
50
|
-
|
51
|
-
// ·
|
52
|
-
const router = useRouter()
|
53
|
-
const url = inject("url")
|
54
|
-
|
55
|
-
|
56
|
-
// · defining props
|
57
|
-
const props = defineProps({
|
58
|
-
engine: {
|
59
|
-
type: String,
|
60
|
-
required: true,
|
61
|
-
},
|
62
|
-
components: {
|
63
|
-
type: Object,
|
64
|
-
required: true,
|
65
|
-
}
|
66
|
-
})
|
67
|
-
|
68
|
-
|
69
|
-
// · implement stores
|
70
|
-
const storeDashboard = useDashboard()
|
71
|
-
|
72
|
-
|
73
|
-
// · translations
|
74
|
-
const translations = {
|
75
|
-
main: I18n.t(`${props.engine}.dashboards`),
|
76
|
-
dashboards: I18n.t('core.dashboards'),
|
77
|
-
core: I18n.t('core.shared')
|
78
|
-
}
|
79
|
-
|
80
|
-
|
81
|
-
const onDeleteDashboard = () => {
|
82
|
-
storeDashboard.deleteDashboard().then(()=> {
|
83
|
-
router.push(url[props.engine]('dashboards').s)
|
84
|
-
})
|
85
|
-
}
|
86
|
-
|
87
|
-
|
88
|
-
onMounted(() => {
|
89
|
-
storeDashboard.engine = props.engine
|
90
|
-
storeDashboard.getDashboardOptions()
|
91
|
-
})
|
92
|
-
|
93
|
-
</script>
|
94
|
-
<template>
|
95
|
-
<section class="application-component">
|
96
|
-
<lesli-header :title="storeDashboard.dashboard.name">
|
97
|
-
<lesli-button icon="list" :to="url[props.engine]('dashboards')">
|
98
|
-
{{ translations.core.view_btn_list }}
|
99
|
-
</lesli-button>
|
100
|
-
</lesli-header>
|
101
|
-
|
102
|
-
<dashboard-form :engine="props.engine" is-editable></dashboard-form>
|
103
|
-
<dashboard-preview :engine="props.engine" :components="props.components"></dashboard-preview>
|
104
|
-
</section>
|
105
|
-
</template>
|
@@ -1,172 +0,0 @@
|
|
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 · Your Smart Business Assistant.
|
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://lesli.tech
|
28
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
-
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
31
|
-
// ·
|
32
|
-
|
33
|
-
*/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
// · import vue tools
|
38
|
-
import { onMounted, computed } from "vue"
|
39
|
-
|
40
|
-
|
41
|
-
// · import lesli stores
|
42
|
-
import { useDashboard } from "Lesli/shared/stores/dashboard"
|
43
|
-
|
44
|
-
|
45
|
-
// · implement stores
|
46
|
-
const storeDashboard = useDashboard()
|
47
|
-
|
48
|
-
|
49
|
-
// ·
|
50
|
-
const props = defineProps({
|
51
|
-
engine: {
|
52
|
-
type: String,
|
53
|
-
require: true
|
54
|
-
},
|
55
|
-
components: {
|
56
|
-
type: Object,
|
57
|
-
require: true
|
58
|
-
}
|
59
|
-
})
|
60
|
-
|
61
|
-
|
62
|
-
// ·
|
63
|
-
function sizeIncrease(component) {
|
64
|
-
if (component.layout >= 12) {
|
65
|
-
return
|
66
|
-
}
|
67
|
-
component.layout++
|
68
|
-
}
|
69
|
-
|
70
|
-
|
71
|
-
// ·
|
72
|
-
function sizeDecrease(component) {
|
73
|
-
if (component.layout <= 3) {
|
74
|
-
return
|
75
|
-
}
|
76
|
-
component.layout--
|
77
|
-
}
|
78
|
-
|
79
|
-
|
80
|
-
// ·
|
81
|
-
function remove(component) {
|
82
|
-
|
83
|
-
component._destroy = true
|
84
|
-
}
|
85
|
-
|
86
|
-
</script>
|
87
|
-
<template>
|
88
|
-
<div class="columns is-multiline is-variable is-4 dashboard-components">
|
89
|
-
<template v-for="(component, index) in storeDashboard.dashboard.components" :key="index">
|
90
|
-
<div :class="['column', 'is-' + component?.layout]" v-if="!component._destroy">
|
91
|
-
|
92
|
-
<!-- Dashboard widget component when in edition mode -->
|
93
|
-
<div class="edit">
|
94
|
-
|
95
|
-
|
96
|
-
<!-- Dashboard widget preview -->
|
97
|
-
<component :component.sync="component" :is="props.components[component.component_id]">
|
98
|
-
</component>
|
99
|
-
|
100
|
-
|
101
|
-
<!-- Edition controls -->
|
102
|
-
<div class="mt-4 mb-2">
|
103
|
-
<div class="field has-addons is-justify-content-center">
|
104
|
-
<p class="control">
|
105
|
-
<button class="button is-small" @click="sizeDecrease(component)">
|
106
|
-
<span class="icon is-small">
|
107
|
-
<span class="material-icons">
|
108
|
-
remove
|
109
|
-
</span>
|
110
|
-
</span>
|
111
|
-
</button>
|
112
|
-
</p>
|
113
|
-
<p class="control control-label has-text-centered">
|
114
|
-
size
|
115
|
-
</p>
|
116
|
-
<p class="control">
|
117
|
-
<button class="button is-small" @click="sizeIncrease(component)">
|
118
|
-
<span class="icon is-small">
|
119
|
-
<span class="material-icons">
|
120
|
-
add
|
121
|
-
</span>
|
122
|
-
</span>
|
123
|
-
</button>
|
124
|
-
</p>
|
125
|
-
</div>
|
126
|
-
|
127
|
-
<div class="field has-addons is-justify-content-center">
|
128
|
-
<p class="control">
|
129
|
-
<button class="button is-small" @click="sizeDecrease(component)">
|
130
|
-
<span class="icon is-small">
|
131
|
-
<span class="material-icons">
|
132
|
-
chevron_left
|
133
|
-
</span>
|
134
|
-
</span>
|
135
|
-
</button>
|
136
|
-
</p>
|
137
|
-
<p class="control control-label has-text-centered px-4">
|
138
|
-
position
|
139
|
-
</p>
|
140
|
-
<p class="control">
|
141
|
-
<button class="button is-small" @click="sizeIncrease(component)">
|
142
|
-
<span class="icon is-small">
|
143
|
-
<span class="material-icons">
|
144
|
-
chevron_right
|
145
|
-
</span>
|
146
|
-
</span>
|
147
|
-
</button>
|
148
|
-
</p>
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<div class="has-text-centered">
|
152
|
-
<lesli-button small danger icon="delete" @click="remove(component)">
|
153
|
-
remove
|
154
|
-
</lesli-button>
|
155
|
-
</div>
|
156
|
-
</div>
|
157
|
-
</div>
|
158
|
-
</div>
|
159
|
-
</template>
|
160
|
-
</div>
|
161
|
-
</template>
|
162
|
-
<style>
|
163
|
-
.dashboard-components .edit {
|
164
|
-
border-radius: 6px;
|
165
|
-
padding: 1.2rem 1.4rem;
|
166
|
-
border: 1px solid #CCC;
|
167
|
-
background-color: #FFF8F8;
|
168
|
-
}
|
169
|
-
.dashboard-components .edit .control-label {
|
170
|
-
width: 100px;
|
171
|
-
}
|
172
|
-
</style>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|