Skip to content

Commit

Permalink
fix: update inserted yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
henrychoy committed Aug 22, 2024
1 parent 11976c9 commit 979b8a2
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/frontend/src/views/CreateEntryPoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,21 @@
const taskGraphError = ref('')
const taskGraphPlaceholderError = computed(() => {
if(entryPoint.value.taskGraph.includes('<step-name>') && entryPoint.value.taskGraph.includes('<input-value>')) {
return 'Replace <step-name> and <input-value> placeholders'
} else if(entryPoint.value.taskGraph.includes('<step-name>')) {
return 'Replace <step-name> placeholders'
} else if(entryPoint.value.taskGraph.includes('<input-value>')) {
return 'Replace <input-value> placeholders'
}
return ''
})
function submit() {
basicInfoForm.value.validate().then(success => {
taskGraphError.value = entryPoint.value.taskGraph.length > 0 ? '' : 'This field is required'
taskGraphError.value = taskGraphPlaceholderError.value
if (success && taskGraphError.value === '') {
addOrModifyEntrypoint()
}
Expand Down Expand Up @@ -458,10 +470,9 @@
function addToTaskGraph(task) {
console.log('task = ', task)
let string = `${task.outputParams.map((param) => param.name)}:\n ${task.name}:`
// let string = `${task.outputParams.map((param) => param.name).join(', ')}:\n ${task.name}:`
let string = `# Replace step-name and input-value placeholders\n<step-name>:\n ${task.name}:`
task.inputParams.forEach((param) => {
string += `\n ${param.name}: $${param.name}`
string += `\n ${param.name}: <input-value>`
})
if(entryPoint.value.taskGraph.trim().length === 0) {
entryPoint.value.taskGraph = ''
Expand Down

0 comments on commit 979b8a2

Please sign in to comment.