Skip to content

Commit

Permalink
fix(ui): debug outputs for loops handled in a better way (#4521)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic committed Aug 2, 2024
1 parent c73d832 commit 3e7f059
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/src/components/executions/outputs/Wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
:input="true"
:navbar="false"
:model-value="computedDebugValue"
@save="onDebugExpression($event)"
class="w-100"
/>

Expand Down Expand Up @@ -124,13 +123,15 @@
const debugStackTrace = ref("");
const isJSON = ref(false);
const selectedTask = () => {
const filter = selected.value.length ? selected.value[0] : (cascader.value as any).menuList?.[0]?.panel?.expandingNode?.value;
const filter = selected.value.length ? selected.value[0] : (cascader.value as any).menuList?.[0]?.panel?.expandingNode?.label;
const taskRunList = [...execution.value.taskRunList];
return taskRunList.find(e => e.taskId === filter);
};
const onDebugExpression = (expression) => {
const taskRun = selectedTask();
if(!taskRun) return
const URL = `${apiUrl(store)}/executions/${taskRun?.executionId}/eval/${taskRun.id}`;
store.$http
.post(URL, expression, {headers: {"Content-type": "text/plain",}})
Expand Down

0 comments on commit 3e7f059

Please sign in to comment.