@kestra-io/ui-libs 0.0.41 → 0.0.42

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kestra-io/ui-libs",
3
- "version": "v0.0.41",
3
+ "version": "v0.0.42",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -200,9 +200,9 @@
200
200
  },
201
201
  hoverTooltip() {
202
202
  if (this.data.node.type.endsWith("SubflowGraphTask")) {
203
- const subflowTask = this.data.node.task;
203
+ const subflowIdContainer = this.data.node.task.subflowId ?? this.data.node.task;
204
204
 
205
- return subflowTask.namespace + " " + subflowTask.flowId;
205
+ return subflowIdContainer.namespace + " " + subflowIdContainer.flowId;
206
206
  }
207
207
 
208
208
  return this.trimmedId;
@@ -66,7 +66,8 @@
66
66
  clusterName() {
67
67
  const taskNode = this.data.taskNode;
68
68
  if (taskNode?.type?.endsWith("SubflowGraphTask")) {
69
- return taskNode.task.namespace + " " + taskNode.task.flowId;
69
+ const subflowIdContainer = taskNode.task.subflowId ?? taskNode.task
70
+ return subflowIdContainer.namespace + " " + subflowIdContainer.flowId;
70
71
  }
71
72
 
72
73
  return Utils.afterLastDot(this.id);
@@ -34,7 +34,7 @@
34
34
  @click="$emit(EVENTS.ADD_ERROR, {task: data.node.task})"
35
35
  >
36
36
  <tooltip :title="Utils.translate('add error handler')">
37
- <AlertOutline class="button-icon" alt="Edit task" />
37
+ <AlertOutline class="button-icon" alt="Add error handler" />
38
38
  </tooltip>
39
39
  </span>
40
40
  <span
@@ -165,11 +165,12 @@
165
165
  },
166
166
  dataWithLink() {
167
167
  if(this.data.node.type.endsWith("SubflowGraphTask") && this.enableSubflowInteraction){
168
+ const subflowIdContainer = this.data.node.task.subflowId ?? this.data.node.task;
168
169
  return {
169
170
  ...this.data,
170
171
  link: {
171
- namespace: this.data.node.task.namespace,
172
- id: this.data.node.task.flowId,
172
+ namespace: subflowIdContainer.namespace,
173
+ id: subflowIdContainer.flowId,
173
174
  executionId: this.taskExecution?.taskRunList
174
175
  .filter(taskRun => taskRun.taskId === this.data.node.task.id && taskRun.outputs?.executionId)
175
176
  ?.[0]?.outputs?.executionId
@@ -282,7 +282,7 @@
282
282
  }
283
283
 
284
284
  const expand = (expandData) => {
285
- const taskTypesWithSubflows = ["io.kestra.core.tasks.flows.Flow", "io.kestra.core.tasks.flows.Subflow", "io.kestra.core.tasks.flows.ForEachItem"];
285
+ const taskTypesWithSubflows = ["io.kestra.core.tasks.flows.Flow", "io.kestra.core.tasks.flows.Subflow", "io.kestra.core.tasks.flows.ForEachItem$ForEachItemExecutable"];
286
286
  if (taskTypesWithSubflows.includes(expandData.type) && !props.expandedSubflows.includes(expandData.id)) {
287
287
  forwardEvent("expand-subflow", [...props.expandedSubflows, expandData.id]);
288
288
  return;
@@ -403,7 +403,9 @@ export default class VueFlowUtils {
403
403
  }
404
404
 
405
405
  const color = this.nodeColor(node, collapsed, flowSource);
406
- const isReadOnlyTask = isReadOnly || readOnlyUidPrefixes.some(prefix => node.uid.startsWith(prefix + "."));
406
+ // If task type includes '$', it's an inner class so it's probably an internal class not supposed to be editable
407
+ // In such case, only the root task will be editable
408
+ const isReadOnlyTask = isReadOnly || node.task?.type?.includes("$") || readOnlyUidPrefixes.some(prefix => node.uid.startsWith(prefix + "."));
407
409
  elements.push({
408
410
  id: node.uid,
409
411
  type: nodeType,