mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix: no code without type
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
@update:model-value="onTaskInput"
|
||||
:schema
|
||||
:properties
|
||||
:typeBased="isTaskDefinitionBasedOnType"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -165,7 +166,10 @@
|
||||
// when tab is opened, load the documentation
|
||||
onActivated(() => {
|
||||
if(selectedTaskType.value && parentPath !== "inputs"){
|
||||
pluginsStore.updateDocumentation({type: selectedTaskType.value, ...taskModel.value});
|
||||
pluginsStore.updateDocumentation({
|
||||
cls: selectedTaskType.value,
|
||||
...taskModel.value
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
required?: boolean;
|
||||
schema?: Schema;
|
||||
root?: string;
|
||||
typeBased?: boolean;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -127,11 +128,10 @@
|
||||
|
||||
const filteredProperties = computed<Entry[]>(() => {
|
||||
const propertiesProc = (props.properties ?? props.schema?.properties);
|
||||
const isOutputsContext = props.root?.startsWith("outputs[") || false;
|
||||
return propertiesProc
|
||||
? (Object.entries(propertiesProc) as Entry[]).filter(([key, value]) => {
|
||||
// Allow "type" field for outputs context, filter it out for other contexts
|
||||
const shouldFilterType = key === "type" && !isOutputsContext;
|
||||
const shouldFilterType = key === "type" && props.typeBased;
|
||||
return !shouldFilterType && !Array.isArray(value);
|
||||
})
|
||||
: [];
|
||||
|
||||
Reference in New Issue
Block a user