diff --git a/ui/src/components/code/segments/Editor.vue b/ui/src/components/code/segments/Editor.vue
index 5869bce2f47..2170a8e733e 100644
--- a/ui/src/components/code/segments/Editor.vue
+++ b/ui/src/components/code/segments/Editor.vue
@@ -2,7 +2,7 @@
-
-
-
-
-
-
-
+
import {ref, shallowRef} from "vue";
- import {Field, Fields, Sections} from "../utils/types";
+ import {Field, Fields, CollapseItem} from "../utils/types";
import Collapse from "../components/collapse/Collapse.vue";
import InputText from "../components/inputs/InputText.vue";
import InputSwitch from "../components/inputs/InputSwitch.vue";
import InputLabel from "../components/inputs/InputLabel.vue";
+ import Editor from "../../inputs/Editor.vue";
import MetadataInputs from "../../flows/MetadataInputs.vue";
import MetadataVariables from "../../flows/MetadataVariables.vue";
@@ -81,72 +65,80 @@
};
const fields = ref({
- main: {
- id: {
- component: shallowRef(InputText),
- value: props.metadata.id,
- label: t("no_code.fields.main.flow_id"),
- required: true,
- disabled: !props.creation,
- },
- namespace: {
- component: shallowRef(InputText),
- value: props.metadata.namespace,
- label: t("no_code.fields.main.namespace"),
- required: true,
- disabled: !props.creation,
- },
- description: {
- component: shallowRef(InputText),
- value: props.metadata.description,
- label: t("no_code.fields.main.description"),
- },
+ id: {
+ component: shallowRef(InputText),
+ value: props.metadata.id,
+ label: t("no_code.fields.main.flow_id"),
+ required: true,
+ disabled: !props.creation,
+ },
+ namespace: {
+ component: shallowRef(InputText),
+ value: props.metadata.namespace,
+ label: t("no_code.fields.main.namespace"),
+ required: true,
+ disabled: !props.creation,
+ },
+ description: {
+ component: shallowRef(InputText),
+ value: props.metadata.description,
+ label: t("no_code.fields.main.description"),
+ },
+ retry: {
+ component: shallowRef(Editor),
+ value: props.metadata.retry,
+ label: t("no_code.fields.general.retry"),
+ navbar: false,
+ input: true,
+ lang: "yaml",
+ style: {height: "100px"},
+ },
+ labels: {
+ component: shallowRef(InputLabel),
+ value: props.metadata.labels,
+ label: t("no_code.fields.general.labels"),
},
- general: {
- retry: {
- component: shallowRef(InputText),
- value: props.metadata.retry,
- label: t("no_code.fields.general.retry"),
- },
- labels: {
- component: shallowRef(InputLabel),
- value: props.metadata.labels,
- label: t("no_code.fields.general.labels"),
- },
- inputs: {
- component: shallowRef(MetadataInputs),
- value: props.metadata.inputs,
- label: t("no_code.fields.general.inputs"),
- inputs: props.metadata.inputs,
- },
- outputs: {
- component: shallowRef(InputText),
- value: props.metadata.outputs,
- label: t("no_code.fields.general.outputs"),
- },
- variables: {
- component: shallowRef(MetadataVariables),
- value: props.metadata.variables,
- label: t("no_code.fields.general.variables"),
- variables: props.metadata.variables,
- },
- // concurrency: {
- // component: shallowRef(InputSwitch), // TODO: To improve slot content
- // value: props.metadata.concurrency,
- // label: t("no_code.fields.general.concurrency"),
- // schema: props.schemas?.definitions?.[CONCURRENCY] ?? {},
- // root: "concurrency",
- // },
- pluginDefaults: {
- component: shallowRef(InputText),
- value: props.metadata.pluginDefaults,
- label: t("no_code.fields.general.plugin_defaults"),
- },
- disabled: {
- component: shallowRef(InputSwitch),
- value: props.metadata.disabled,
- label: t("no_code.fields.general.disabled"),
- },
+ inputs: {
+ component: shallowRef(MetadataInputs),
+ value: props.metadata.inputs,
+ label: t("no_code.fields.general.inputs"),
+ inputs: props.metadata.inputs,
+ },
+ outputs: {
+ component: shallowRef(Editor),
+ value: props.metadata.outputs,
+ label: t("no_code.fields.general.outputs"),
+ navbar: false,
+ input: true,
+ lang: "yaml",
+ style: {height: "100px"},
+ },
+ variables: {
+ component: shallowRef(MetadataVariables),
+ value: props.metadata.variables,
+ label: t("no_code.fields.general.variables"),
+ variables: props.metadata.variables,
+ },
+ // concurrency: {
+ // component: shallowRef(InputSwitch), // TODO: To improve slot content
+ // value: props.metadata.concurrency,
+ // label: t("no_code.fields.general.concurrency"),
+ // schema: props.schemas?.definitions?.[CONCURRENCY] ?? {},
+ // root: "concurrency",
+ // },
+ pluginDefaults: {
+ component: shallowRef(Editor),
+ value: props.metadata.pluginDefaults,
+ label: t("no_code.fields.general.plugin_defaults"),
+ navbar: false,
+ input: true,
+ lang: "yaml",
+ style: {height: "100px"},
+ },
+ disabled: {
+ component: shallowRef(InputSwitch),
+ value: props.metadata.disabled,
+ label: t("no_code.fields.general.disabled"),
},
});
@@ -155,15 +147,9 @@
const title = t(`no_code.sections.${label}`);
return {title, elements};
};
- const sections = ref({
- main: [{title: t("no_code.sections.general")}],
- segments: [
- getSectionTitle("tasks", YamlUtils.parse(props.flow).tasks ?? []),
- getSectionTitle("triggers", YamlUtils.parse(props.flow).triggers ?? []),
- getSectionTitle(
- "error_handlers",
- YamlUtils.parse(props.flow).errors ?? [],
- ),
- ],
- });
+ const sections = ref([
+ getSectionTitle("tasks", YamlUtils.parse(props.flow).tasks ?? []),
+ getSectionTitle("triggers", YamlUtils.parse(props.flow).triggers ?? []),
+ getSectionTitle("error_handlers", YamlUtils.parse(props.flow).errors ?? []),
+ ]);
diff --git a/ui/src/components/code/segments/Task.vue b/ui/src/components/code/segments/Task.vue
index 5ae34b2657b..54a29f4bc5c 100644
--- a/ui/src/components/code/segments/Task.vue
+++ b/ui/src/components/code/segments/Task.vue
@@ -1,15 +1,17 @@
-
+
+
-
+
+
+