datasource variables
parent
377093b776
commit
b320ebe2ba
@ -0,0 +1,10 @@
|
||||
import { PipelineInputVarType } from '@/models/pipeline'
|
||||
import { VarType } from '@/app/components/workflow/types'
|
||||
|
||||
export const inputVarTypeToVarType = (type: PipelineInputVarType): VarType => {
|
||||
return ({
|
||||
[PipelineInputVarType.number]: VarType.number,
|
||||
[PipelineInputVarType.singleFile]: VarType.file,
|
||||
[PipelineInputVarType.multiFiles]: VarType.arrayFile,
|
||||
} as any)[type] || VarType.string
|
||||
}
|
||||
Loading…
Reference in New Issue