|
@ -18,7 +18,7 @@ import ResourceDeployStatusTag from '@/views/shared/ResourceDeployStatusTag.vue' |
|
|
|
|
|
|
|
|
const dialogRef = ref(); |
|
|
const dialogRef = ref(); |
|
|
const processorIdRef = ref(); |
|
|
const processorIdRef = ref(); |
|
|
const modelValueRef = ref(); |
|
|
const modelValueRef = ref(''); |
|
|
|
|
|
|
|
|
const autoCompletionManager = new AutoCompletionManager(); |
|
|
const autoCompletionManager = new AutoCompletionManager(); |
|
|
const userDefinedFunctionsRef = ref(); |
|
|
const userDefinedFunctionsRef = ref(); |
|
@ -347,53 +347,41 @@ const vertexDefines = [ |
|
|
size: [120, 60], |
|
|
size: [120, 60], |
|
|
}, |
|
|
}, |
|
|
getLabel: (value) => { |
|
|
getLabel: (value) => { |
|
|
|
|
|
let html = '<div style="text-align:left;">' + (value?.inputCommands || '') + '</div>'; |
|
|
|
|
|
html += '<hr/>'; |
|
|
const resourceAbstract = findResourceAbstractById(value.resourceAbstractId); |
|
|
const resourceAbstract = findResourceAbstractById(value.resourceAbstractId); |
|
|
if (resourceAbstract) { |
|
|
if (resourceAbstract) { |
|
|
return resourceAbstract.name + '(V' + resourceAbstract.version + ')'; |
|
|
html += resourceAbstract.name + '(V' + resourceAbstract.version + ')'; |
|
|
} |
|
|
} |
|
|
return ''; |
|
|
html += '<hr/>'; |
|
|
|
|
|
html += '<div style="text-align:left;">' + (value?.outputCommands || '') + '</div>'; |
|
|
|
|
|
return html; |
|
|
}, |
|
|
}, |
|
|
getValue: (dom) => { |
|
|
getValue: (dom) => { |
|
|
|
|
|
let result = { resourceAbstractId: '', inputCommands: '', outputCommands: '' }; |
|
|
if (dom) { |
|
|
if (dom) { |
|
|
const code = dom.getAttribute('code'); |
|
|
const code = dom.getAttribute('code'); |
|
|
const version = dom.getAttribute('version'); |
|
|
const version = dom.getAttribute('version'); |
|
|
const inputCommands = dom.getAttribute('inputCommands'); |
|
|
|
|
|
const outputCommands = dom.getAttribute('outputCommands'); |
|
|
|
|
|
const resourceAbstract = findResourceAbstractByCodeAndVersion(code, version); |
|
|
const resourceAbstract = findResourceAbstractByCodeAndVersion(code, version); |
|
|
if (resourceAbstract) { |
|
|
if (resourceAbstract) { |
|
|
return { |
|
|
result.resourceAbstractId = resourceAbstract.id; |
|
|
resourceAbstractId: resourceAbstract.id, |
|
|
|
|
|
inputCommands: inputCommands, |
|
|
|
|
|
outputCommands: outputCommands, |
|
|
|
|
|
}; |
|
|
|
|
|
} else { |
|
|
|
|
|
return { |
|
|
|
|
|
resourceAbstractId: '', |
|
|
|
|
|
inputCommands: '', |
|
|
|
|
|
outputCommands: '', |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
result.inputCommands = dom.getAttribute('inputCommands') || ''; |
|
|
return { |
|
|
result.outputCommands = dom.getAttribute('outputCommands') || ''; |
|
|
resourceAbstractId: '', |
|
|
|
|
|
inputCommands: '', |
|
|
|
|
|
outputCommands: '', |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
return result; |
|
|
}, |
|
|
}, |
|
|
setValue: (dom, value) => { |
|
|
setValue: (dom, value) => { |
|
|
const resourceAbstract = findResourceAbstractById(value.resourceAbstractId); |
|
|
const resourceAbstract = findResourceAbstractById(value.resourceAbstractId); |
|
|
if (resourceAbstract) { |
|
|
if (resourceAbstract) { |
|
|
dom.setAttribute('code', resourceAbstract.code); |
|
|
dom.setAttribute('code', resourceAbstract.code); |
|
|
dom.setAttribute('version', resourceAbstract.version); |
|
|
dom.setAttribute('version', resourceAbstract.version); |
|
|
dom.setAttribute('inputCommands', value.inputCommands); |
|
|
|
|
|
dom.setAttribute('outputCommands', value.outputCommands); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
dom.setAttribute('code', ''); |
|
|
dom.setAttribute('code', ''); |
|
|
dom.setAttribute('version', ''); |
|
|
dom.setAttribute('version', ''); |
|
|
dom.setAttribute('inputCommands', ''); |
|
|
|
|
|
dom.setAttribute('outputCommands', ''); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
dom.setAttribute('inputCommands', value?.inputCommands || ''); |
|
|
|
|
|
dom.setAttribute('outputCommands', value?.outputCommands || ''); |
|
|
}, |
|
|
}, |
|
|
getFormFields: () => { |
|
|
getFormFields: () => { |
|
|
return [ |
|
|
return [ |
|
@ -460,7 +448,7 @@ const vertexDefines = [ |
|
|
label: $t('re.graph.vertex.configurableResourceAbstract.entity.inputCommands'), |
|
|
label: $t('re.graph.vertex.configurableResourceAbstract.entity.inputCommands'), |
|
|
type: 'w-code-mirror', |
|
|
type: 'w-code-mirror', |
|
|
lang: 'java', |
|
|
lang: 'java', |
|
|
rows: 10, |
|
|
rows: 9, |
|
|
placeholder: true, |
|
|
placeholder: true, |
|
|
lineWrap: true, |
|
|
lineWrap: true, |
|
|
lineBreak: true, |
|
|
lineBreak: true, |
|
|