@kestra-io/ui-libs 0.0.3 → 0.0.4
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/package.json +6 -2
- package/src/assets/icons/SplitCellsHorizontal.vue +24 -0
- package/src/assets/icons/SplitCellsVertical.vue +24 -0
- package/src/components/index.js +4 -0
- package/src/components/misc/ExecutionInformations.vue +4 -3
- package/src/components/misc/TaskIcon.vue +32 -3
- package/src/components/nodes/BasicNode.vue +71 -24
- package/src/components/nodes/ClusterNode.vue +28 -2
- package/src/components/nodes/DependenciesNode.vue +38 -3
- package/src/components/nodes/EdgeNode.vue +25 -0
- package/src/components/nodes/TaskNode.vue +41 -15
- package/src/components/nodes/TriggerNode.vue +27 -2
- package/src/components/topology/Topology.vue +355 -0
- package/src/index.js +6 -0
- package/src/scss/_variables.scss +68 -11
- package/src/scss/app.scss +2 -0
- package/src/scss/bootstrap-dark.scss +12 -0
- package/src/scss/bootstrap.scss +10 -0
- package/src/utils/VueFlowUtils.js +445 -0
- package/src/utils/YamlUtils.js +78 -1
- package/src/utils/constants.js +17 -0
- package/src/utils/global.js +5 -5
- package/src/utils/state.js +3 -3
- package/src/utils/GraphUtils.js +0 -390
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kestra-io/ui-libs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -22,10 +22,14 @@
|
|
|
22
22
|
"bootstrap": "^5.3.0",
|
|
23
23
|
"buffer": "^6.0.3",
|
|
24
24
|
"humanize-duration": "^3.29.0",
|
|
25
|
+
"js-yaml": "^4.1.0",
|
|
25
26
|
"lodash": "^4.17.21",
|
|
26
27
|
"moment": "^2.29.4",
|
|
27
28
|
"vue": "^3.3.4",
|
|
28
|
-
"vue-material-design-icons": "^5.2.0"
|
|
29
|
+
"vue-material-design-icons": "^5.2.0",
|
|
30
|
+
"vuex": "^4.1.0",
|
|
31
|
+
"yaml": "^2.3.1",
|
|
32
|
+
"vue3-popper": "^1.5.0"
|
|
29
33
|
},
|
|
30
34
|
"devDependencies": {
|
|
31
35
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<g clip-path="url(#clip0_796_3996)">
|
|
4
|
+
<path d="M13.367 1.979C13.7368 1.979 14.0366 2.27881 14.0366 2.64863V13.3626C14.0366 13.7324 13.7368 14.0322 13.367 14.0322H2.65302C2.2832 14.0322 1.9834 13.7324 1.9834 13.3626V2.64863C1.9834 2.27881 2.2832 1.979 2.65302 1.979H13.367ZM7.34039 3.31825H3.32265V12.693H7.34039V10.0145H8.67963V12.693H12.6974V3.31825H8.67963V5.99675H7.34039V3.31825ZM10.0189 5.99675L12.0278 8.00562L10.0189 10.0145V8.67524H6.00114V10.0145L3.99227 8.00562L6.00114 5.99675V7.33599H10.0189V5.99675Z" fill="#CAC5DA" />
|
|
5
|
+
</g>
|
|
6
|
+
<defs>
|
|
7
|
+
<clipPath id="clip0_796_3996">
|
|
8
|
+
<rect width="16" height="16" fill="white" />
|
|
9
|
+
</clipPath>
|
|
10
|
+
</defs>
|
|
11
|
+
</svg>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
name: "SplitCellsHorizontalIcon",
|
|
17
|
+
emits: ["click"]
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
<style scoped>
|
|
21
|
+
svg {
|
|
22
|
+
transform: scale(1.5);
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<g clip-path="url(#clip0_1111_7266)">
|
|
4
|
+
<path d="M1.97852 2.63349C1.97852 2.26366 2.27832 1.96387 2.64814 1.96387L13.3621 1.96387C13.7319 1.96387 14.0317 2.26366 14.0317 2.63349L14.0317 13.3475C14.0317 13.7173 13.7319 14.0171 13.3621 14.0171L2.64814 14.0171C2.27832 14.0171 1.97852 13.7173 1.97852 13.3475L1.97852 2.63349ZM3.31776 8.6601L3.31776 12.6778L12.6925 12.6778L12.6925 8.6601L10.014 8.6601L10.014 7.32085L12.6925 7.32085L12.6925 3.30311L3.31776 3.30311L3.31776 7.32086L5.99626 7.32085L5.99626 8.6601L3.31776 8.6601ZM5.99626 5.98161L8.00513 3.97274L10.014 5.98161L8.67475 5.98161L8.67475 9.99935L10.014 9.99935L8.00513 12.0082L5.99626 9.99935L7.3355 9.99935L7.3355 5.98161L5.99626 5.98161Z" fill="#CAC5DA" />
|
|
5
|
+
</g>
|
|
6
|
+
<defs>
|
|
7
|
+
<clipPath id="clip0_1111_7266">
|
|
8
|
+
<rect width="16" height="16" fill="white" transform="translate(0 16) rotate(-90)" />
|
|
9
|
+
</clipPath>
|
|
10
|
+
</defs>
|
|
11
|
+
</svg>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
name: "SplitCellsVerticalIcon",
|
|
17
|
+
emits: ["click"]
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
<style scoped>
|
|
21
|
+
svg {
|
|
22
|
+
transform: scale(1.5);
|
|
23
|
+
}
|
|
24
|
+
</style>
|
package/src/components/index.js
CHANGED
|
@@ -8,6 +8,9 @@ import BasicNode from "./nodes/BasicNode.vue";
|
|
|
8
8
|
import CollapsedClusterNode from "./nodes/CollapsedClusterNode.vue";
|
|
9
9
|
import DependenciesNode from "./nodes/DependenciesNode.vue"
|
|
10
10
|
|
|
11
|
+
// Topology Component
|
|
12
|
+
import Topology from "./topology/Topology.vue";
|
|
13
|
+
|
|
11
14
|
// misc
|
|
12
15
|
import ExecutionInformations from "./misc/ExecutionInformations.vue";
|
|
13
16
|
import State from "./misc/State.vue";
|
|
@@ -17,5 +20,6 @@ import TaskIcon from "./misc/TaskIcon.vue";
|
|
|
17
20
|
import AddTaskButton from "./buttons/AddTaskButton.vue";
|
|
18
21
|
|
|
19
22
|
export {ClusterNode, DotNode, EdgeNode, TaskNode, TriggerNode, BasicNode, CollapsedClusterNode, DependenciesNode};
|
|
23
|
+
export {Topology}
|
|
20
24
|
export {ExecutionInformations, State, TaskIcon};
|
|
21
25
|
export {AddTaskButton};
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
7
|
<script>
|
|
8
|
-
import Delete from "vue-material-design-icons/Delete.vue";
|
|
9
|
-
import Pencil from "vue-material-design-icons/Pencil.vue";
|
|
10
8
|
import {EVENTS} from "../../utils/constants"
|
|
11
9
|
import moment from "moment";
|
|
12
10
|
import Duration from "./Duration.vue";
|
|
@@ -85,6 +83,10 @@
|
|
|
85
83
|
execution: {
|
|
86
84
|
type: Object,
|
|
87
85
|
default: null
|
|
86
|
+
},
|
|
87
|
+
task: {
|
|
88
|
+
type: Object,
|
|
89
|
+
default: null
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -100,7 +102,6 @@
|
|
|
100
102
|
left: 0;
|
|
101
103
|
top: 50%;
|
|
102
104
|
height: 50%;
|
|
103
|
-
border-left: 1px solid var(--bs-gray-100);
|
|
104
105
|
transform: translateY(-50%);
|
|
105
106
|
z-index: 500;
|
|
106
107
|
}
|
|
@@ -2,18 +2,27 @@
|
|
|
2
2
|
<div
|
|
3
3
|
:class="[color ? `bg-${color}`: '']"
|
|
4
4
|
class="div-icon rounded d-flex justify-content-center"
|
|
5
|
+
data-bs-toggle="tooltip"
|
|
6
|
+
data-bs-placement="top"
|
|
7
|
+
:title="cls"
|
|
5
8
|
>
|
|
6
9
|
<img :src="backgroundImage" alt="task icon">
|
|
7
10
|
</div>
|
|
8
11
|
</template>
|
|
9
12
|
<script>
|
|
13
|
+
import {mapState} from "vuex";
|
|
10
14
|
import {Buffer} from "buffer";
|
|
15
|
+
import {Tooltip} from "bootstrap";
|
|
11
16
|
|
|
12
17
|
export default {
|
|
13
18
|
name: "TaskIcon",
|
|
14
19
|
props: {
|
|
15
|
-
|
|
16
|
-
type:
|
|
20
|
+
customIcon: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: undefined
|
|
23
|
+
},
|
|
24
|
+
cls: {
|
|
25
|
+
type: String,
|
|
17
26
|
default: undefined
|
|
18
27
|
},
|
|
19
28
|
color: {
|
|
@@ -21,7 +30,24 @@
|
|
|
21
30
|
default: undefined
|
|
22
31
|
}
|
|
23
32
|
},
|
|
33
|
+
mounted(){
|
|
34
|
+
const tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle=\"tooltip\"]"));
|
|
35
|
+
this.tooltips = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
36
|
+
return new Tooltip(tooltipTriggerEl, {
|
|
37
|
+
trigger : "hover"
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
},
|
|
41
|
+
beforeUnmount() {
|
|
42
|
+
document.querySelectorAll("[data-bs-toggle=\"tooltip\"]").forEach((el) => {
|
|
43
|
+
const tooltip = Tooltip.getInstance(el);
|
|
44
|
+
if (tooltip) {
|
|
45
|
+
tooltip.dispose();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
24
49
|
computed: {
|
|
50
|
+
...mapState("plugin", ["icons"]),
|
|
25
51
|
backgroundImage() {
|
|
26
52
|
return `data:image/svg+xml;base64,${this.imageBase64}`
|
|
27
53
|
},
|
|
@@ -35,6 +61,9 @@
|
|
|
35
61
|
"<path d=\"M288 32H0v448h384V128l-96-96zm64 416H32V64h224l96 96v288z\" fill=\"#0D1523FF\"/>" +
|
|
36
62
|
"</svg>", "utf8").toString("base64");
|
|
37
63
|
},
|
|
64
|
+
icon() {
|
|
65
|
+
return this.cls ? (this.icons || {})[this.cls] : this.customIcon;
|
|
66
|
+
}
|
|
38
67
|
}
|
|
39
68
|
}
|
|
40
69
|
</script>
|
|
@@ -47,4 +76,4 @@
|
|
|
47
76
|
background-color: var(--bs-white);
|
|
48
77
|
border: 0.4px solid var(--bs-border-color);
|
|
49
78
|
}
|
|
50
|
-
</style>
|
|
79
|
+
</style>
|
|
@@ -5,42 +5,60 @@
|
|
|
5
5
|
@mouseover="mouseover"
|
|
6
6
|
@mouseleave="mouseleave"
|
|
7
7
|
>
|
|
8
|
-
<div v-if="state" class="status-div" :class="[`bg-${stateColor}`]"
|
|
8
|
+
<div v-if="state" class="status-div" :class="[`bg-${stateColor}`]"/>
|
|
9
9
|
<div>
|
|
10
|
-
<TaskIcon :icon="data.icon" :class="taskIconBg"
|
|
10
|
+
<TaskIcon :icon="data.icon" :cls="cls" :class="taskIconBg"/>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="node-content">
|
|
13
13
|
<div class="d-flex justify-content-around">
|
|
14
|
-
<div
|
|
14
|
+
<div
|
|
15
|
+
class="text-truncate task-title"
|
|
16
|
+
data-bs-toggle="tooltip"
|
|
17
|
+
data-bs-placement="top"
|
|
18
|
+
:title="id"
|
|
19
|
+
>
|
|
15
20
|
<span> {{ id }} </span>
|
|
16
21
|
</div>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
<span
|
|
23
|
+
class="d-flex"
|
|
24
|
+
data-bs-toggle="tooltip"
|
|
25
|
+
data-bs-placement="top"
|
|
26
|
+
:title="$t('show description')"
|
|
27
|
+
>
|
|
28
|
+
<InformationOutline
|
|
29
|
+
v-if="description"
|
|
30
|
+
@click="$emit(EVENTS.SHOW_DESCRIPTION, {id: id, description:description})"
|
|
31
|
+
class="description-button mx-2"
|
|
32
|
+
/>
|
|
33
|
+
</span>
|
|
22
34
|
</div>
|
|
23
|
-
<slot name="content"
|
|
35
|
+
<slot name="content"/>
|
|
24
36
|
</div>
|
|
25
37
|
<div class="position-absolute top-0 text-white d-flex top-button-div">
|
|
26
|
-
<slot name="badge-button-before"
|
|
38
|
+
<slot name="badge-button-before"/>
|
|
27
39
|
<span
|
|
28
40
|
v-if="link"
|
|
29
41
|
class="rounded-button"
|
|
30
42
|
:class="[`bg-${data.color}`]"
|
|
31
|
-
@click="$emit(EVENTS.OPEN_LINK,
|
|
43
|
+
@click="$emit(EVENTS.OPEN_LINK, linkData)"
|
|
44
|
+
data-bs-toggle="tooltip"
|
|
45
|
+
data-bs-placement="top"
|
|
46
|
+
:title="$t('open')"
|
|
32
47
|
>
|
|
33
|
-
<OpenInNew class="button-icon" alt="Open in new tab"
|
|
48
|
+
<OpenInNew class="button-icon" alt="Open in new tab"/>
|
|
34
49
|
</span>
|
|
35
50
|
<span
|
|
36
51
|
v-if="expandable"
|
|
37
52
|
class="rounded-button"
|
|
38
53
|
:class="[`bg-${data.color}`]"
|
|
39
54
|
@click="$emit(EVENTS.EXPAND)"
|
|
55
|
+
data-bs-toggle="tooltip"
|
|
56
|
+
data-bs-placement="top"
|
|
57
|
+
:title="$t('expand')"
|
|
40
58
|
>
|
|
41
|
-
<ArrowExpand class="button-icon" alt="Expand task"
|
|
59
|
+
<ArrowExpand class="button-icon" alt="Expand task"/>
|
|
42
60
|
</span>
|
|
43
|
-
<slot name="badge-button-after"
|
|
61
|
+
<slot name="badge-button-after"/>
|
|
44
62
|
</div>
|
|
45
63
|
</div>
|
|
46
64
|
</template>
|
|
@@ -51,6 +69,9 @@
|
|
|
51
69
|
import {EVENTS} from "../../utils/constants.js";
|
|
52
70
|
import ArrowExpand from "vue-material-design-icons/ArrowExpand.vue";
|
|
53
71
|
import OpenInNew from "vue-material-design-icons/OpenInNew.vue";
|
|
72
|
+
import {Tooltip} from "bootstrap";
|
|
73
|
+
import {VueFlowUtils} from "../../index.js";
|
|
74
|
+
import {mapState} from "vuex";
|
|
54
75
|
|
|
55
76
|
export default {
|
|
56
77
|
components: {
|
|
@@ -59,6 +80,22 @@
|
|
|
59
80
|
InformationOutline,
|
|
60
81
|
OpenInNew
|
|
61
82
|
},
|
|
83
|
+
mounted() {
|
|
84
|
+
const tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle=\"tooltip\"]"));
|
|
85
|
+
this.tooltips = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
86
|
+
return new Tooltip(tooltipTriggerEl, {
|
|
87
|
+
trigger: "hover"
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
},
|
|
91
|
+
beforeUnmount() {
|
|
92
|
+
document.querySelectorAll("[data-bs-toggle=\"tooltip\"]").forEach((el) => {
|
|
93
|
+
const tooltip = Tooltip.getInstance(el);
|
|
94
|
+
if (tooltip) {
|
|
95
|
+
tooltip.dispose();
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
},
|
|
62
99
|
emits: [
|
|
63
100
|
EVENTS.EXPAND,
|
|
64
101
|
EVENTS.OPEN_LINK,
|
|
@@ -113,6 +150,7 @@
|
|
|
113
150
|
};
|
|
114
151
|
},
|
|
115
152
|
computed: {
|
|
153
|
+
...mapState("execution", ["execution"]),
|
|
116
154
|
EVENTS() {
|
|
117
155
|
return EVENTS
|
|
118
156
|
},
|
|
@@ -134,17 +172,26 @@
|
|
|
134
172
|
},
|
|
135
173
|
stateColor() {
|
|
136
174
|
switch (this.state) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
175
|
+
case "RUNNING":
|
|
176
|
+
return "primary"
|
|
177
|
+
case "SUCCESS":
|
|
178
|
+
return "success"
|
|
179
|
+
case "WARNING":
|
|
180
|
+
return "warning"
|
|
181
|
+
case "FAILED":
|
|
182
|
+
return "danger"
|
|
183
|
+
default:
|
|
184
|
+
return null;
|
|
147
185
|
}
|
|
186
|
+
},
|
|
187
|
+
linkData() {
|
|
188
|
+
if(this.data.node.task) {
|
|
189
|
+
return {link: VueFlowUtils.linkDatas(this.data.node.task, this.execution)}
|
|
190
|
+
}
|
|
191
|
+
return null
|
|
192
|
+
},
|
|
193
|
+
cls() {
|
|
194
|
+
return this.data.node?.task ? this.data.node.task.type : this.data.node?.trigger ? this.data.node.trigger.type : null
|
|
148
195
|
}
|
|
149
196
|
},
|
|
150
197
|
}
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
class="rounded-button"
|
|
7
7
|
:class="[`bg-${data.color}`]"
|
|
8
8
|
@click="collapse()"
|
|
9
|
+
data-bs-toggle="tooltip"
|
|
10
|
+
data-bs-trigger="hover"
|
|
11
|
+
:title="$t('collapse')"
|
|
9
12
|
>
|
|
10
|
-
<ArrowCollapse class="button-icon" alt="Collapse task"
|
|
13
|
+
<ArrowCollapse class="button-icon" alt="Collapse task"/>
|
|
11
14
|
</span>
|
|
12
15
|
</div>
|
|
13
16
|
</template>
|
|
@@ -24,8 +27,31 @@
|
|
|
24
27
|
|
|
25
28
|
</script>
|
|
26
29
|
<script>
|
|
30
|
+
import {Tooltip} from "bootstrap";
|
|
31
|
+
|
|
27
32
|
export default {
|
|
28
33
|
inheritAttrs: false,
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
tooltips: [],
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
mounted() {
|
|
40
|
+
const tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle=\"tooltip\"]"));
|
|
41
|
+
this.tooltips = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
42
|
+
return new Tooltip(tooltipTriggerEl, {
|
|
43
|
+
placement: "top"
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
},
|
|
47
|
+
beforeUnmount() {
|
|
48
|
+
document.querySelectorAll("[data-bs-toggle=\"tooltip\"]").forEach((el) => {
|
|
49
|
+
const tooltip = Tooltip.getInstance(el);
|
|
50
|
+
if (tooltip) {
|
|
51
|
+
tooltip.dispose();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
29
55
|
}
|
|
30
56
|
</script>
|
|
31
57
|
<style scoped lang="scss">
|
|
@@ -50,4 +76,4 @@
|
|
|
50
76
|
padding: 0.25rem 0.5rem;
|
|
51
77
|
}
|
|
52
78
|
|
|
53
|
-
</style>
|
|
79
|
+
</style>
|
|
@@ -4,12 +4,22 @@
|
|
|
4
4
|
:class="[`border-${data.color}`]"
|
|
5
5
|
class="dependency-node-wrapper rounded-3 border"
|
|
6
6
|
>
|
|
7
|
-
<TaskIcon color="pink" :icon="{icon: icon}" />
|
|
7
|
+
<TaskIcon color="pink" :custom-icon="{icon: icon}" />
|
|
8
8
|
<div class="dependency-text d-flex flex-column">
|
|
9
|
-
<div
|
|
9
|
+
<div
|
|
10
|
+
class="dependency-flow-text text-truncate"
|
|
11
|
+
data-bs-toggle="tooltip"
|
|
12
|
+
data-bs-placement="top"
|
|
13
|
+
:title="data.flowId"
|
|
14
|
+
>
|
|
10
15
|
{{ data.flowId }}
|
|
11
16
|
</div>
|
|
12
|
-
<div
|
|
17
|
+
<div
|
|
18
|
+
class="dependency-namespace-text text-truncate"
|
|
19
|
+
data-bs-toggle="tooltip"
|
|
20
|
+
data-bs-placement="top"
|
|
21
|
+
:title="data.namespace"
|
|
22
|
+
>
|
|
13
23
|
{{ data.namespace }}
|
|
14
24
|
</div>
|
|
15
25
|
</div>
|
|
@@ -21,6 +31,9 @@
|
|
|
21
31
|
class="rounded-button"
|
|
22
32
|
:class="[`bg-${data.color}`]"
|
|
23
33
|
@click="$emit(EVENTS.OPEN_LINK, data)"
|
|
34
|
+
data-bs-toggle="tooltip"
|
|
35
|
+
data-bs-placement="top"
|
|
36
|
+
:title="$t('open')"
|
|
24
37
|
>
|
|
25
38
|
<OpenInNew class="button-icon" alt="Open in new tab" />
|
|
26
39
|
</span>
|
|
@@ -28,6 +41,9 @@
|
|
|
28
41
|
class="rounded-button"
|
|
29
42
|
:class="[`bg-${data.color}`]"
|
|
30
43
|
@click="$emit(EVENTS.EXPAND_DEPENDENCIES, data)"
|
|
44
|
+
data-bs-toggle="tooltip"
|
|
45
|
+
data-bs-placement="top"
|
|
46
|
+
:title="$t('expand')"
|
|
31
47
|
>
|
|
32
48
|
<ArrowExpandAll class="button-icon" alt="Expand task" />
|
|
33
49
|
</span>
|
|
@@ -44,6 +60,7 @@
|
|
|
44
60
|
import OpenInNew from "vue-material-design-icons/OpenInNew.vue";
|
|
45
61
|
import ArrowExpandAll from "vue-material-design-icons/ArrowExpandAll.vue";
|
|
46
62
|
import {EVENTS} from "../../utils/constants.js";
|
|
63
|
+
import {Tooltip} from "bootstrap";
|
|
47
64
|
|
|
48
65
|
export default {
|
|
49
66
|
name: "Dependencies",
|
|
@@ -55,6 +72,22 @@
|
|
|
55
72
|
EVENTS.MOUSE_OVER,
|
|
56
73
|
EVENTS.MOUSE_LEAVE,
|
|
57
74
|
],
|
|
75
|
+
mounted() {
|
|
76
|
+
const tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle=\"tooltip\"]"));
|
|
77
|
+
this.tooltips = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
78
|
+
return new Tooltip(tooltipTriggerEl, {
|
|
79
|
+
trigger: "hover"
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
},
|
|
83
|
+
beforeUnmount() {
|
|
84
|
+
document.querySelectorAll("[data-bs-toggle=\"tooltip\"]").forEach((el) => {
|
|
85
|
+
const tooltip = Tooltip.getInstance(el);
|
|
86
|
+
if (tooltip) {
|
|
87
|
+
tooltip.dispose();
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
},
|
|
58
91
|
computed: {
|
|
59
92
|
EVENTS() {
|
|
60
93
|
return EVENTS
|
|
@@ -112,12 +145,14 @@
|
|
|
112
145
|
.dependency-flow-text {
|
|
113
146
|
font-size: 0.85rem;
|
|
114
147
|
font-weight: 700;
|
|
148
|
+
max-width: 121px;
|
|
115
149
|
}
|
|
116
150
|
|
|
117
151
|
.dependency-namespace-text {
|
|
118
152
|
font-size: 0.625rem;
|
|
119
153
|
font-weight: 400;
|
|
120
154
|
color: #564A75;
|
|
155
|
+
max-width: 121px;
|
|
121
156
|
|
|
122
157
|
html.dark & {
|
|
123
158
|
color: #E3DBFF;
|
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
import {EdgeLabelRenderer, getSmoothStepPath} from "@vue-flow/core";
|
|
4
4
|
import AddTaskButton from "../buttons/AddTaskButton.vue";
|
|
5
5
|
import {EVENTS} from "../../utils/constants.js";
|
|
6
|
+
import {Tooltip} from "bootstrap";
|
|
6
7
|
|
|
7
8
|
export default {
|
|
9
|
+
data() {
|
|
10
|
+
return {
|
|
11
|
+
tooltips: [],
|
|
12
|
+
}
|
|
13
|
+
},
|
|
8
14
|
props: {
|
|
9
15
|
id: String,
|
|
10
16
|
data: Object,
|
|
@@ -32,6 +38,22 @@
|
|
|
32
38
|
path,
|
|
33
39
|
};
|
|
34
40
|
},
|
|
41
|
+
mounted(){
|
|
42
|
+
const tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle=\"tooltip\"]"));
|
|
43
|
+
this.tooltips = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
44
|
+
return new Tooltip(tooltipTriggerEl, {
|
|
45
|
+
trigger : "hover"
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
beforeUnmount() {
|
|
50
|
+
document.querySelectorAll("[data-bs-toggle=\"tooltip\"]").forEach((el) => {
|
|
51
|
+
const tooltip = Tooltip.getInstance(el);
|
|
52
|
+
if (tooltip) {
|
|
53
|
+
tooltip.dispose();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
},
|
|
35
57
|
inheritAttrs: false,
|
|
36
58
|
};
|
|
37
59
|
</script>
|
|
@@ -61,6 +83,9 @@
|
|
|
61
83
|
v-if="!data.disabled && data.haveAdd != undefined"
|
|
62
84
|
:add-task="true"
|
|
63
85
|
@click="$emit(EVENTS.ADD_TASK, data.haveAdd)"
|
|
86
|
+
data-bs-toggle="tooltip"
|
|
87
|
+
data-bs-placement="top"
|
|
88
|
+
:title="$t('add task')"
|
|
64
89
|
/>
|
|
65
90
|
</div>
|
|
66
91
|
</EdgeLabelRenderer>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Handle type="source" :position="sourcePosition"
|
|
2
|
+
<Handle type="source" :position="sourcePosition"/>
|
|
3
3
|
<basic-node
|
|
4
4
|
:id="id"
|
|
5
5
|
:data="data"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
@mouseleave="forwardEvent(EVENTS.MOUSE_LEAVE)"
|
|
12
12
|
>
|
|
13
13
|
<template #content>
|
|
14
|
-
<execution-informations v-if="data.
|
|
14
|
+
<execution-informations v-if="execution" :execution="execution" :task="data.node.task" :color="color"/>
|
|
15
15
|
</template>
|
|
16
16
|
<template #badge-button-before>
|
|
17
17
|
<span
|
|
@@ -19,36 +19,48 @@
|
|
|
19
19
|
class="rounded-button"
|
|
20
20
|
:class="[`bg-${color}`]"
|
|
21
21
|
@click="$emit(EVENTS.SHOW_LOGS, {id, taskRuns})"
|
|
22
|
+
data-bs-toggle="tooltip"
|
|
23
|
+
data-bs-placement="top"
|
|
24
|
+
:title="$t('show task logs')"
|
|
22
25
|
>
|
|
23
|
-
<TextBoxSearch class="button-icon" alt="Show logs"
|
|
26
|
+
<TextBoxSearch class="button-icon" alt="Show logs"/>
|
|
24
27
|
</span>
|
|
25
28
|
<span
|
|
26
|
-
v-if="!
|
|
29
|
+
v-if="!execution && !data.isReadOnly && data.isFlowable"
|
|
27
30
|
class="rounded-button"
|
|
28
31
|
:class="[`bg-${color}`]"
|
|
29
32
|
@click="$emit(EVENTS.ADD_ERROR, {task: data.node.task})"
|
|
33
|
+
data-bs-toggle="tooltip"
|
|
34
|
+
data-bs-placement="top"
|
|
35
|
+
:title="$t('add error handler')"
|
|
30
36
|
>
|
|
31
|
-
<
|
|
37
|
+
<AlertOutline class="button-icon" alt="Edit task"/>
|
|
32
38
|
</span>
|
|
33
39
|
<span
|
|
34
|
-
v-if="!
|
|
40
|
+
v-if="!execution && !data.isReadOnly"
|
|
35
41
|
class="rounded-button"
|
|
36
42
|
:class="[`bg-${color}`]"
|
|
37
43
|
@click="$emit(EVENTS.EDIT, {task: data.node.task, section: SECTIONS.TASKS})"
|
|
44
|
+
data-bs-toggle="tooltip"
|
|
45
|
+
data-bs-placement="top"
|
|
46
|
+
:title="$t('edit')"
|
|
38
47
|
>
|
|
39
|
-
<Pencil class="button-icon" alt="Edit task"
|
|
48
|
+
<Pencil class="button-icon" alt="Edit task"/>
|
|
40
49
|
</span>
|
|
41
50
|
<span
|
|
42
|
-
v-if="!
|
|
51
|
+
v-if="!execution && !data.isReadOnly"
|
|
43
52
|
class="rounded-button"
|
|
44
53
|
:class="[`bg-${color}`]"
|
|
45
54
|
@click="$emit(EVENTS.DELETE, {id, section: SECTIONS.TASKS})"
|
|
55
|
+
data-bs-toggle="tooltip"
|
|
56
|
+
data-bs-placement="top"
|
|
57
|
+
:title="$t('delete')"
|
|
46
58
|
>
|
|
47
|
-
<Delete class="button-icon" alt="Delete task"
|
|
59
|
+
<Delete class="button-icon" alt="Delete task"/>
|
|
48
60
|
</span>
|
|
49
61
|
</template>
|
|
50
62
|
</basic-node>
|
|
51
|
-
<Handle type="target" :position="targetPosition"
|
|
63
|
+
<Handle type="target" :position="targetPosition"/>
|
|
52
64
|
</template>
|
|
53
65
|
|
|
54
66
|
<script>
|
|
@@ -60,12 +72,29 @@
|
|
|
60
72
|
import Pencil from "vue-material-design-icons/Pencil.vue";
|
|
61
73
|
import Delete from "vue-material-design-icons/Delete.vue";
|
|
62
74
|
import TextBoxSearch from "vue-material-design-icons/TextBoxSearch.vue";
|
|
63
|
-
import
|
|
75
|
+
import AlertOutline from "vue-material-design-icons/AlertOutline.vue"
|
|
76
|
+
import {mapState} from "vuex";
|
|
77
|
+
import {Tooltip} from "bootstrap"
|
|
64
78
|
|
|
65
79
|
export default {
|
|
66
80
|
name: "Task",
|
|
67
81
|
inheritAttrs: false,
|
|
82
|
+
mounted(){
|
|
83
|
+
const tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle=\"tooltip\"]"));
|
|
84
|
+
tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
85
|
+
return new Tooltip(tooltipTriggerEl)
|
|
86
|
+
})
|
|
87
|
+
},
|
|
88
|
+
beforeUnmount() {
|
|
89
|
+
document.querySelectorAll("[data-bs-toggle=\"tooltip\"]").forEach((el) => {
|
|
90
|
+
const tooltip = Tooltip.getInstance(el);
|
|
91
|
+
if (tooltip) {
|
|
92
|
+
tooltip.dispose();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
},
|
|
68
96
|
computed: {
|
|
97
|
+
...mapState("execution", ["execution"]),
|
|
69
98
|
SECTIONS() {
|
|
70
99
|
return SECTIONS
|
|
71
100
|
},
|
|
@@ -75,9 +104,6 @@
|
|
|
75
104
|
color() {
|
|
76
105
|
return this.data.color ?? "primary"
|
|
77
106
|
},
|
|
78
|
-
execution() {
|
|
79
|
-
return this.data.execution
|
|
80
|
-
},
|
|
81
107
|
taskRunList() {
|
|
82
108
|
return this.execution && this.execution.taskRunList ? this.execution.taskRunList : []
|
|
83
109
|
},
|
|
@@ -136,7 +162,7 @@
|
|
|
136
162
|
Handle,
|
|
137
163
|
BasicNode,
|
|
138
164
|
TextBoxSearch,
|
|
139
|
-
|
|
165
|
+
AlertOutline,
|
|
140
166
|
},
|
|
141
167
|
props: {
|
|
142
168
|
data: {
|