Skip to content

Commit

Permalink
feat: changes related to execution page
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye committed Apr 25, 2024
1 parent b29b722 commit 2770f91
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/components/misc/ExecutionInformations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
return this.execution && this.execution.taskRunList ? this.execution.taskRunList : []
},
taskRuns() {
return this.taskRunList.filter(t => t.taskId === Utils.afterLastDot(this.task.id))
return this.taskRunList.filter(t => t.taskId === Utils.afterLastDot(this.uid))
},
state() {
if (!this.taskRuns) {
Expand Down Expand Up @@ -89,6 +89,10 @@
task: {
type: Object,
default: null
},
uid: {
type: String,
default: null
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/nodes/TaskNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@mouseleave="forwardEvent(EVENTS.MOUSE_LEAVE)"
>
<template #content>
<execution-informations v-if="taskExecution" :execution="taskExecution" :task="data.node.task" :color="color" />
<execution-informations v-if="taskExecution" :execution="taskExecution" :task="data.node.task" :color="color" :uid="data.node.uid" />
</template>
<template #badge-button-before>
<span
Expand Down Expand Up @@ -117,7 +117,7 @@
return undefined;
},
taskRuns() {
return this.taskRunList.filter(t => t.taskId === Utils.afterLastDot(this.data.node.task.id))
return this.taskRunList.filter(t => t.taskId === Utils.afterLastDot(this.data.node.uid))
},
state() {
if (!this.taskRuns) {
Expand Down
8 changes: 4 additions & 4 deletions src/utils/VueFlowUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ export default class VueFlowUtils {
}

static isTaskNode(node) {
return node.task !== undefined && ["GraphTask", "SubflowGraphTask"].some(t => node.type.endsWith(t));
return ["GraphTask", "SubflowGraphTask"].some(t => node.type.endsWith(t));
}

static isTriggerNode(node) {
return node.triggerDeclaration !== undefined && node.type.endsWith("GraphTrigger");
return node.type.endsWith("GraphTrigger");
}

static isCollapsedCluster(node) {
Expand Down Expand Up @@ -299,7 +299,7 @@ export default class VueFlowUtils {

const clustersWithoutRootNode = [CLUSTER_PREFIX + TRIGGERS_NODE_UID];

if (!flowGraph || !this.flowHaveTasks(flowSource)) {
if (!flowGraph || (flowSource && !this.flowHaveTasks(flowSource))) {
elements.push({
id: "start",
type: "dot",
Expand Down Expand Up @@ -402,7 +402,7 @@ export default class VueFlowUtils {
nodeType = "collapsedcluster";
}

const color = this.nodeColor(node, collapsed, flowSource);
const color = this.nodeColor(node, collapsed);
// If task type includes '$', it's an inner class so it's probably an internal class not supposed to be editable
// In such case, only the root task will be editable
const isReadOnlyTask = isReadOnly || node.task?.type?.includes("$") || readOnlyUidPrefixes.some(prefix => node.uid.startsWith(prefix + "."));
Expand Down

0 comments on commit 2770f91

Please sign in to comment.