Skip to content

Commit

Permalink
fix(ui): reflect changes in code after making them in topology (#4901)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored Sep 12, 2024
1 parent d40c5b3 commit f6c9ed8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion ui/src/components/flows/Topology.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:expanded-subflows="expandedSubflows"
view-type="topology"
@expand-subflow="onExpandSubflow($event)"
@on-edit="(event) => emit('on-edit', event, true)"
/>
<el-alert v-else type="warning" :closable="false">
{{ $t("unable to generate graph") }}
Expand All @@ -27,7 +28,7 @@
LowCodeEditor,
},
emits: [
"expand-subflow"
"expand-subflow", "on-edit"
],
props: {
isReadOnly: {
Expand Down
5 changes: 3 additions & 2 deletions ui/src/components/inputs/EditorView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
};
const onEdit = (event, currentIsFlow = false) => {
flowYaml.value = event;
editorUpdate(event)
if (currentIsFlow) {
if (
Expand Down Expand Up @@ -1034,6 +1034,7 @@
@restart-guided-tour="() => persistViewType(editorViewTypes.SOURCE)"
:read-only="isReadOnly"
:navbar="false"
input
/>
<section v-else class="no-tabs-opened">
<div class="img" />
Expand Down Expand Up @@ -1069,7 +1070,7 @@
v-if="flowGraph"
ref="lowCodeEditorRef"
@follow="forwardEvent('follow', $event)"
@on-edit="(e) => onEdit(e, true)"
@on-edit="(event, isFlow) => onEdit(event, isFlow)"
@loading="loadingState"
@expand-subflow="onExpandSubflow"
@swapped-task="onSwappedTask"
Expand Down
10 changes: 5 additions & 5 deletions ui/src/components/inputs/LowCodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
});
return;
}
emit("on-edit", YamlUtils.deleteTask(props.source, event.id, section))
emit("on-edit", YamlUtils.deleteTask(props.source, event.id, section), true)
},
() => {
}
Expand Down Expand Up @@ -197,17 +197,17 @@
if (task === undefined || (task && YamlUtils.parse(event).id === taskEditData.value.oldTaskId)) {
switch (taskEditData.value.action) {
case("create_task"):
emit("on-edit", YamlUtils.insertTask(source, taskEditData.value.insertionDetails[0], event, taskEditData.value.insertionDetails[1]))
emit("on-edit", YamlUtils.insertTask(source, taskEditData.value.insertionDetails[0], event, taskEditData.value.insertionDetails[1]), true)
return;
case("edit_task"):
emit("on-edit", YamlUtils.replaceTaskInDocument(
source,
taskEditData.value.oldTaskId,
event
))
), true)
return;
case("add_flowable_error"):
emit("on-edit", YamlUtils.insertErrorInFlowable(props.source, event, taskEditData.value.taskId))
emit("on-edit", YamlUtils.insertErrorInFlowable(props.source, event, taskEditData.value.taskId), true)
return;
}
} else {
Expand Down Expand Up @@ -276,7 +276,7 @@
const onSwappedTask = (event) => {
emit("swapped-task", event.swappedTasks);
emit("on-edit", event.newSource);
emit("on-edit", event.newSource, true);
}
const message = (event) => {
Expand Down

0 comments on commit f6c9ed8

Please sign in to comment.