cob-cli 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/customizations/dashboard.dash.js +11 -0
- package/customizations/dashboard.js +1 -0
- package/customizations/dashboard.simple.js +1 -1
- package/customizations/dashboard.vue.empty.js +1 -1
- package/customizations/keywords.js +3 -2
- package/customizations/keywords.log.js +17 -0
- package/lib/task_lists/customize_copy.js +7 -6
- package/package.json +1 -1
- package/templates/{cob-dashboard-html → dashboards/cob-dashboard-html}/demoDashboard.html +0 -0
- package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/package-lock.json +0 -0
- package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/package.json +0 -0
- package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/App.vue +0 -0
- package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/dashboard.html +0 -0
- package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/main.js +0 -0
- package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/plugins/cobUiVueComponents.js +0 -0
- package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/src/plugins/vuetify.js +0 -0
- package/templates/{cob-dashboard-vue → dashboards/cob-dashboard-vue}/vue.config.js +0 -0
- package/templates/dashboards/dash/dist/css/app.a16bfc97.css +8 -0
- package/templates/dashboards/dash/dist/dashboard.html +20 -0
- package/templates/dashboards/dash/dist/fonts/fa-brands-400.a78ffbbe.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-brands-400.cd2b4095.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-regular-400.b1a1bebb.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-regular-400.e8a1ba41.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-solid-900.55b416a8.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-solid-900.73820155.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.0d6f5f18.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.786e6b33.woff2 +0 -0
- package/templates/dashboards/dash/dist/js/app.b5565900.js +188 -0
- package/templates/dashboards/dash/dist/js/app.b5565900.js.map +1 -0
- package/templates/dashboards/dash/package-lock.json +24340 -0
- package/templates/dashboards/dash/package.json +19 -0
- package/templates/dashboards/dash/src/App.vue +258 -0
- package/templates/dashboards/dash/src/Dashboard.vue +46 -0
- package/templates/dashboards/dash/src/assets/css/all.min.css +6 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.woff2 +0 -0
- package/templates/dashboards/dash/src/collector.js +3782 -0
- package/templates/dashboards/dash/src/components/Board.vue +49 -0
- package/templates/dashboards/dash/src/components/BoardsNav.vue +23 -0
- package/templates/dashboards/dash/src/components/BoardsPage.vue +36 -0
- package/templates/dashboards/dash/src/components/Menu.vue +19 -0
- package/templates/dashboards/dash/src/components/Title.vue +13 -0
- package/templates/dashboards/dash/src/components/Totals.vue +53 -0
- package/templates/dashboards/dash/src/components/TotalsBadge.vue +69 -0
- package/templates/dashboards/dash/src/dashboard.html +34 -0
- package/templates/dashboards/dash/src/input.css +9 -0
- package/templates/dashboards/dash/src/main.js +11 -0
- package/templates/dashboards/dash/src/output.css +1142 -0
- package/templates/dashboards/dash/tailwind.config.js +13 -0
- package/templates/dashboards/dash/vue.config.js +104 -0
- package/templates/frontend/common/css/_dashboard.css +7 -0
- package/templates/frontend/common/css/_dualColumn.css +2 -1
- package/templates/frontend/common/css/_global.css +14 -0
- package/templates/frontend/common/css/_mobile.css +3 -11
- package/templates/frontend/common/css/customizations.__MERGE__.css +1 -0
- package/templates/keywords/audit/backend/scripts/_audit.groovy +2 -1
- package/templates/keywords/audit/frontend/js/cob/_audit.js +5 -1
- package/templates/keywords/log/backend/scripts/_log.groovy +99 -0
- package/templates/keywords/log/frontend/css/_log.css +5 -0
- package/templates/keywords/log/frontend/css/customizations.__MERGE__.css +1 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li :class="wrapperClass">
|
|
3
|
+
<div class="py-4 px-5 space-y-2">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</div>
|
|
6
|
+
</li>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
props: {
|
|
12
|
+
rowSpan: String,
|
|
13
|
+
colSpan: String,
|
|
14
|
+
title: String,
|
|
15
|
+
showTitle: Boolean
|
|
16
|
+
},
|
|
17
|
+
computed: {
|
|
18
|
+
wrapperClass() {
|
|
19
|
+
const c = "w-full bg-cobbg rounded-md border border-cobline" // hover:ring-1 ring-slate-400/50 ring-offset-1;
|
|
20
|
+
|
|
21
|
+
// Force possible dynamic classes to be loaded
|
|
22
|
+
const dynamicRowClasses = {
|
|
23
|
+
1: "md:row-span-1",
|
|
24
|
+
2: "md:row-span-2",
|
|
25
|
+
3: "md:row-span-3",
|
|
26
|
+
4: "md:row-span-4",
|
|
27
|
+
5: "md:row-span-5",
|
|
28
|
+
6: "md:row-span-6",
|
|
29
|
+
full: "md:row-span-full"
|
|
30
|
+
}
|
|
31
|
+
const rspan = this.rowSpan ? " " + dynamicRowClasses[this.rowSpan] : "";
|
|
32
|
+
|
|
33
|
+
// Force possible dynamic classes to be loaded
|
|
34
|
+
const dynamicColClasses = {
|
|
35
|
+
1: "md:col-span-1",
|
|
36
|
+
2: "md:col-span-2",
|
|
37
|
+
3: "md:col-span-3",
|
|
38
|
+
4: "md:col-span-4",
|
|
39
|
+
5: "md:col-span-5",
|
|
40
|
+
6: "md:col-span-6",
|
|
41
|
+
full: "md:col-span-full"
|
|
42
|
+
}
|
|
43
|
+
const cspan = this.colSpan ? " " + dynamicColClasses[this.colSpan] : "";
|
|
44
|
+
|
|
45
|
+
return c + rspan + cspan;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<aside class="overflow-y-auto py-2 px-3 bg-white rounded-lg">
|
|
3
|
+
<ul class="space-y-2">
|
|
4
|
+
<li>
|
|
5
|
+
<a href="#" class="flex items-center p-2 text-gray-700 rounded-lg hover:bg-gray-100">
|
|
6
|
+
<svg class="w-6 h-6 text-gray-400 transition duration-75" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path></svg>
|
|
7
|
+
<span class="ml-3">Dashboard</span>
|
|
8
|
+
</a>
|
|
9
|
+
</li>
|
|
10
|
+
<li>
|
|
11
|
+
<a href="#" class="flex items-center p-2 text-gray-700 rounded-lg hover:bg-gray-100">
|
|
12
|
+
<svg class="w-6 h-6 text-gray-400 transition duration-75" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path></svg>
|
|
13
|
+
<span class="ml-3">Alternative</span>
|
|
14
|
+
</a>
|
|
15
|
+
</li>
|
|
16
|
+
</ul>
|
|
17
|
+
</aside>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul :class="wrapperClass">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</ul>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
props: { gridCols: String },
|
|
10
|
+
computed: {
|
|
11
|
+
wrapperClass() {
|
|
12
|
+
const c = "grid grid-cols-1 gap-2 content-center md:grid-flow-row-dense";
|
|
13
|
+
|
|
14
|
+
// Force possible dynamic classes to be loaded
|
|
15
|
+
const dynamicClasses = {
|
|
16
|
+
1: "md:grid-cols-1",
|
|
17
|
+
2: "md:grid-cols-2",
|
|
18
|
+
3: "md:grid-cols-3",
|
|
19
|
+
4: "md:grid-cols-4",
|
|
20
|
+
5: "md:grid-cols-5",
|
|
21
|
+
6: "md:grid-cols-6",
|
|
22
|
+
7: "md:grid-cols-7",
|
|
23
|
+
8: "md:grid-cols-8",
|
|
24
|
+
9: "md:grid-cols-9",
|
|
25
|
+
10: "md:grid-cols-10",
|
|
26
|
+
11: "md:grid-cols-11",
|
|
27
|
+
12: "md:grid-cols-12",
|
|
28
|
+
none: "md:grid-cols-none"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const gcols = this.gridCols ? " " + dynamicClasses[this.gridCols] : "";
|
|
32
|
+
return c + gcols;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul class="space-y-2 text-slate-700 decoration-slate-700">
|
|
3
|
+
<li v-for="(item, i) in componentData.items" :key="item.text + i"
|
|
4
|
+
:class="'transition ease-in-out duration-300 rounded-md border border-cobline border-l-2 border-l-sky-600 shadow-sm transform hover:translate-x-0.5 '
|
|
5
|
+
+ item.text_style">
|
|
6
|
+
<a :href="item.link" class="flex items-center font-light py-1 px-3">
|
|
7
|
+
<span v-html="item.text"/>
|
|
8
|
+
</a>
|
|
9
|
+
</li>
|
|
10
|
+
</ul>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
props: {
|
|
16
|
+
componentData: Object
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="text-slate-700 uppercase tracking-wider border-b border-b-cobline/50 pb-1 text-xs text-center">
|
|
3
|
+
<span v-html="componentData.title_text"/>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
props: {
|
|
10
|
+
componentData: Object
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<table class="w-full table-auto">
|
|
3
|
+
<thead v-if="headers.length > 0">
|
|
4
|
+
<tr class="uppercase text-xs text-slate-700 tracking-wider underline underline-offset-4">
|
|
5
|
+
<td :class="'py-2 ' + headers_style">{{ headers[0] }}</td>
|
|
6
|
+
<td v-for="header in headers.slice(1)" :key="header"
|
|
7
|
+
:class="'py-2 text-right ' + headers_style">{{ header }}</td>
|
|
8
|
+
</tr>
|
|
9
|
+
</thead>
|
|
10
|
+
<tbody>
|
|
11
|
+
<tr v-for="(line, i) in lines" :key="'line'+i"
|
|
12
|
+
class="text-slate-700">
|
|
13
|
+
<td :class="'py-2 ' + line.text_style">{{ line.text }}</td>
|
|
14
|
+
<td v-for="(badge, j) in line.values" :key="'badge'+j"
|
|
15
|
+
class="py-2 text-right">
|
|
16
|
+
<TotalsBadge :badge-data="badge" />
|
|
17
|
+
</td>
|
|
18
|
+
</tr>
|
|
19
|
+
</tbody>
|
|
20
|
+
</table>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import TotalsBadge from './TotalsBadge.vue'
|
|
25
|
+
export default {
|
|
26
|
+
components: { TotalsBadge },
|
|
27
|
+
props: { componentData: Object },
|
|
28
|
+
computed: {
|
|
29
|
+
valuesGridClass() {
|
|
30
|
+
const dynamicClasses = {
|
|
31
|
+
1: "grid-cols-1",
|
|
32
|
+
2: "grid-cols-2",
|
|
33
|
+
3: "grid-cols-3",
|
|
34
|
+
4: "grid-cols-4",
|
|
35
|
+
5: "grid-cols-5",
|
|
36
|
+
6: "grid-cols-6",
|
|
37
|
+
7: "grid-cols-7",
|
|
38
|
+
8: "grid-cols-8",
|
|
39
|
+
9: "grid-cols-9",
|
|
40
|
+
10: "grid-cols-10",
|
|
41
|
+
11: "grid-cols-11",
|
|
42
|
+
12: "grid-cols-12",
|
|
43
|
+
none: "grid-cols-none"
|
|
44
|
+
}
|
|
45
|
+
// Grid with cols == amount of values
|
|
46
|
+
return "grid " + dynamicClasses[this.lines[0].values.length]
|
|
47
|
+
},
|
|
48
|
+
headers() { return this.componentData.headers.filter(x => !!x) },
|
|
49
|
+
headers_style() { return this.componentData.headers_style },
|
|
50
|
+
lines() { return this.componentData.lines }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="{'animate-pulse':signalChange}">
|
|
3
|
+
<a :href="badgeData.dash_info.href" :class="valueClass" class="relative inline-flex">
|
|
4
|
+
<span v-html="value"/>
|
|
5
|
+
|
|
6
|
+
<svg v-if="updating" class="absolute animate-spin -top-1 -right-1 h-2 w-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
7
|
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
8
|
+
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
9
|
+
</svg>
|
|
10
|
+
</a>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
props: {
|
|
18
|
+
badgeData: Object
|
|
19
|
+
},
|
|
20
|
+
data () {
|
|
21
|
+
return {
|
|
22
|
+
signalChange: false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
watch: {
|
|
26
|
+
state(newState) {
|
|
27
|
+
if(newState == "ready") {
|
|
28
|
+
this.signalChange = true;
|
|
29
|
+
setTimeout( () => this.signalChange = false,8000)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
computed: {
|
|
34
|
+
updating() {
|
|
35
|
+
return this.badgeData.dash_info.state == "updating" || this.badgeData.dash_info.state == "loading"
|
|
36
|
+
},
|
|
37
|
+
value() {
|
|
38
|
+
if(this.badgeData.dash_info.state == "loading") return "L"
|
|
39
|
+
if(this.badgeData.dash_info.state == "error") return "E"
|
|
40
|
+
if(isNaN(this.badgeData.dash_info.value)) {
|
|
41
|
+
return this.badgeData.dash_info.value
|
|
42
|
+
} else {
|
|
43
|
+
return new Intl.NumberFormat('en-US', {}).format(this.badgeData.dash_info.value)
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
state() {
|
|
47
|
+
return this.badgeData.dash_info.state
|
|
48
|
+
},
|
|
49
|
+
valueClass() {
|
|
50
|
+
let c = "relative transition ease-in-out px-2 py-1 rounded-md text-center font-mono font-semibold transition border ring-offset-1 hover:ring-2"
|
|
51
|
+
|
|
52
|
+
const lookup = {
|
|
53
|
+
"Info": "text-sky-600 border-sky-600 bg-sky-200/10 ring-sky-600",
|
|
54
|
+
"Success": "text-lime-500 border-lime-500 bg-lime-200/10 ring-lime-500",
|
|
55
|
+
"Warning": "text-amber-500 border-amber-500 bg-amber-200/10 ring-amber-500",
|
|
56
|
+
"Important": "text-rose-600 border-rose-600 bg-rose-200/10 ring-rose-600",
|
|
57
|
+
|
|
58
|
+
"Gray": "text-gray-400 border-gray-200 bg-gray-200/10 ring-gray-200",
|
|
59
|
+
"Fallback": "text-slate-700 ring-slate-700",
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if(this.badgeData.dash_info.state == "loading") return c + " " + lookup["Warning"]
|
|
63
|
+
if(this.badgeData.dash_info.state == "error") return c + " " + lookup["Important"]
|
|
64
|
+
|
|
65
|
+
return c + " " + (this.badgeData.dash_info.value == 0 ? lookup["Gray"] : lookup[this.badgeData.style] ? lookup[this.badgeData.style] : lookup["Fallback"])
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
7
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
8
|
+
|
|
9
|
+
<% } %>
|
|
10
|
+
<% for (var css in htmlWebpackPlugin.files.css) { %>
|
|
11
|
+
<link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="preload" as="style">
|
|
12
|
+
<link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
|
|
13
|
+
<% } %>
|
|
14
|
+
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
|
|
15
|
+
<link href="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>" rel="preload" as="script">
|
|
16
|
+
<% } %>
|
|
17
|
+
<% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<% } %>
|
|
21
|
+
<style>section.custom-resource{visibility: hidden;opacity:0;}</style>
|
|
22
|
+
<div id="app"></div>
|
|
23
|
+
<script>
|
|
24
|
+
// mimes: .cob-app tem estilos globais que se aplicam a elementos vuetify que mudam o aspecto previsto
|
|
25
|
+
let section = document.getElementsByClassName("custom-resource")[0];
|
|
26
|
+
section && section.classList.remove("cob-app"); //TODO: validar que isto é a melhor opção (considerar remover class na ui-all)
|
|
27
|
+
</script>
|
|
28
|
+
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
|
|
29
|
+
<script type="text/javascript" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
|
|
30
|
+
<% } %>
|
|
31
|
+
<% if (htmlWebpackPlugin.options.rmIntegrated == false) { %>
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
|
34
|
+
<% } %>
|