@kestra-io/ui-libs 0.0.22 → 0.0.24
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 +1 -1
- package/src/components/nodes/BasicNode.vue +1 -5
- package/src/components/nodes/ClusterNode.vue +17 -12
- package/src/components/nodes/DotNode.vue +11 -4
- package/src/components/nodes/EdgeNode.vue +2 -1
- package/src/components/topology/Topology.vue +4 -3
- package/src/utils/VueFlowUtils.js +8 -7
package/package.json
CHANGED
|
@@ -111,11 +111,6 @@
|
|
|
111
111
|
data: {
|
|
112
112
|
type: Object,
|
|
113
113
|
required: true
|
|
114
|
-
},
|
|
115
|
-
style: {
|
|
116
|
-
type: Object,
|
|
117
|
-
required: false,
|
|
118
|
-
default: undefined
|
|
119
114
|
}
|
|
120
115
|
},
|
|
121
116
|
methods: {
|
|
@@ -173,6 +168,7 @@
|
|
|
173
168
|
},
|
|
174
169
|
classes() {
|
|
175
170
|
return {
|
|
171
|
+
"unused-path": this.data.unused,
|
|
176
172
|
[`border-${this.borderColor}`]: this.borderColor,
|
|
177
173
|
"disabled": this.data.node.task?.disabled,
|
|
178
174
|
[this.$attrs.class]: true
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<div :class="classes">
|
|
3
|
+
<span class="badge rounded-pill text-truncate text-color" :class="[`bg-${data.color}`]">{{ clusterName }}</span>
|
|
4
|
+
<div class="top-button-div text-white d-flex">
|
|
5
|
+
<span
|
|
6
|
+
v-if="data.collapsable"
|
|
7
|
+
class="rounded-button"
|
|
8
|
+
:class="[`bg-${data.color}`]"
|
|
9
|
+
@click="collapse()"
|
|
10
|
+
>
|
|
11
|
+
<tooltip :title="$t('collapse')">
|
|
12
|
+
<ArrowCollapse class="button-icon" alt="Collapse task" />
|
|
13
|
+
</tooltip>
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
14
16
|
</div>
|
|
15
17
|
</template>
|
|
16
18
|
<script setup>
|
|
@@ -55,6 +57,9 @@
|
|
|
55
57
|
}
|
|
56
58
|
},
|
|
57
59
|
computed: {
|
|
60
|
+
classes() {
|
|
61
|
+
return {"unused-path": this.data.unused}
|
|
62
|
+
},
|
|
58
63
|
clusterName() {
|
|
59
64
|
const taskNode = this.data.taskNode;
|
|
60
65
|
if (taskNode?.type?.endsWith("SubflowGraphTask")) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
2
|
+
<div :class="classes">
|
|
3
|
+
<Handle type="source" class="custom-handle" :position="sourcePosition" />
|
|
4
|
+
<div class="dot">
|
|
5
|
+
<CircleIcon :class="{'text-danger': data.node.error}" class="circle" alt="circle" />
|
|
6
|
+
</div>
|
|
7
|
+
<Handle type="target" class="custom-handle" :position="targetPosition" />
|
|
5
8
|
</div>
|
|
6
|
-
<Handle type="target" class="custom-handle" :position="targetPosition" />
|
|
7
9
|
</template>
|
|
8
10
|
|
|
9
11
|
<script>
|
|
@@ -31,6 +33,11 @@
|
|
|
31
33
|
type: String
|
|
32
34
|
}
|
|
33
35
|
},
|
|
36
|
+
computed: {
|
|
37
|
+
classes() {
|
|
38
|
+
return {"unused-path": this.data.unused};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
34
41
|
}
|
|
35
42
|
</script>
|
|
36
43
|
<style scoped>
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
return {
|
|
36
36
|
"vue-flow__edge-path": true,
|
|
37
37
|
["stroke-" + this.data.color]: this.data.color,
|
|
38
|
+
"unused-path": this.data.unused
|
|
38
39
|
}
|
|
39
40
|
},
|
|
40
41
|
},
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
<template>
|
|
53
54
|
<path
|
|
54
55
|
:id="id"
|
|
55
|
-
:class="
|
|
56
|
+
:class="classes"
|
|
56
57
|
:style="data.haveDashArray ?
|
|
57
58
|
{
|
|
58
59
|
strokeDasharray: '2',
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import SplitCellsHorizontal from "../../assets/icons/SplitCellsHorizontal.vue";
|
|
8
8
|
import {cssVariable} from "../../utils/global.js";
|
|
9
9
|
import {VueFlowUtils, YamlUtils} from "../../index.js";
|
|
10
|
-
import VueflowUtils from "../../utils/VueFlowUtils.js";
|
|
11
10
|
import {CLUSTER_PREFIX, EVENTS} from "../../utils/constants.js";
|
|
12
11
|
import {Background} from "@vue-flow/background";
|
|
13
12
|
import Utils from "../../utils/Utils.js";
|
|
@@ -108,7 +107,7 @@
|
|
|
108
107
|
edgeReplacer.value = {};
|
|
109
108
|
oldCollapsed.forEach(n => collapseCluster(CLUSTER_PREFIX + n, false, false))
|
|
110
109
|
|
|
111
|
-
const elements =
|
|
110
|
+
const elements = VueFlowUtils.generateGraph(
|
|
112
111
|
props.id,
|
|
113
112
|
props.flowId,
|
|
114
113
|
props.namespace,
|
|
@@ -364,5 +363,7 @@
|
|
|
364
363
|
</template>
|
|
365
364
|
|
|
366
365
|
<style scoped lang="scss">
|
|
367
|
-
|
|
366
|
+
:deep(.unused-path) {
|
|
367
|
+
opacity: 0.3;
|
|
368
|
+
}
|
|
368
369
|
</style>
|
|
@@ -349,10 +349,11 @@ export default class VueFlowUtils {
|
|
|
349
349
|
const dagreGraph = this.generateDagreGraph(flowGraph, hiddenNodes, isHorizontal, clustersWithoutRootNode, edgeReplacer, collapsed, clusterToNode);
|
|
350
350
|
|
|
351
351
|
const clusterByNodeUid = {};
|
|
352
|
-
|
|
353
352
|
const clusters = flowGraph.clusters || [];
|
|
354
353
|
const rawClusters = clusters.map(c => c.cluster);
|
|
355
354
|
const readOnlyUidPrefixes = rawClusters.filter(c => c.type.endsWith("SubflowGraphCluster")).map(c => c.taskNode.uid);
|
|
355
|
+
|
|
356
|
+
const nodeByUid = Object.fromEntries(flowGraph.nodes.concat(clusterToNode).map(node => [node.uid, node]));
|
|
356
357
|
for (let cluster of clusters) {
|
|
357
358
|
if (!edgeReplacer[cluster.cluster.uid] && !collapsed.has(cluster.cluster.uid)) {
|
|
358
359
|
if (cluster.cluster.taskNode?.task?.type === "io.kestra.core.tasks.flows.Dag") {
|
|
@@ -381,17 +382,15 @@ export default class VueFlowUtils {
|
|
|
381
382
|
data: {
|
|
382
383
|
collapsable: true,
|
|
383
384
|
color: clusterColor,
|
|
384
|
-
taskNode: cluster.cluster.taskNode
|
|
385
|
+
taskNode: cluster.cluster.taskNode,
|
|
386
|
+
unused: nodeByUid[cluster.cluster.taskNode.uid].unused
|
|
385
387
|
},
|
|
386
388
|
class: `bg-light-${clusterColor}-border rounded p-2`,
|
|
387
389
|
})
|
|
388
390
|
}
|
|
389
391
|
}
|
|
390
392
|
|
|
391
|
-
const nodeByUid = {};
|
|
392
393
|
for (const node of flowGraph.nodes.concat(clusterToNode)) {
|
|
393
|
-
nodeByUid[node.uid] = node;
|
|
394
|
-
|
|
395
394
|
if (!hiddenNodes.includes(node.uid)) {
|
|
396
395
|
const dagreNode = dagreGraph.node(node.uid);
|
|
397
396
|
let nodeType = "task";
|
|
@@ -426,7 +425,8 @@ export default class VueFlowUtils {
|
|
|
426
425
|
expandable: this.isExpandableTask(node, clusterByNodeUid, edgeReplacer),
|
|
427
426
|
isReadOnly: isReadOnlyTask,
|
|
428
427
|
iconComponent: this.isCollapsedCluster(node) ? "webhook" : null,
|
|
429
|
-
executionId: node.executionId
|
|
428
|
+
executionId: node.executionId,
|
|
429
|
+
unused: node.unused
|
|
430
430
|
},
|
|
431
431
|
class: node.type === "collapsedcluster" ? `bg-light-${color}-border rounded` : "",
|
|
432
432
|
})
|
|
@@ -454,7 +454,8 @@ export default class VueFlowUtils {
|
|
|
454
454
|
haveDashArray: nodeByUid[edge.source].type.endsWith("GraphTrigger")
|
|
455
455
|
|| nodeByUid[edge.target].type.endsWith("GraphTrigger")
|
|
456
456
|
|| edge.source.startsWith(TRIGGERS_NODE_UID),
|
|
457
|
-
color: this.getEdgeColor(edge, nodeByUid)
|
|
457
|
+
color: this.getEdgeColor(edge, nodeByUid),
|
|
458
|
+
unused: edge.unused
|
|
458
459
|
},
|
|
459
460
|
style: {
|
|
460
461
|
zIndex: 10,
|